modificaciones por nuevas dependencias

develop/cms
Francisco Sandoval 2023-08-21 12:18:48 -04:00
parent d54033b5f5
commit e60cd3e2e6
4 changed files with 40 additions and 17 deletions

View File

@ -0,0 +1,23 @@
version: "3"
name: transporte-cms
services:
app:
image: python:3.11-alpine
restart: unless-stopped
volumes:
- ../:/app
- venv:/root/.local
working_dir: /app
environment:
PORT: 8000
#command: ping localhost
command: sh /app/docker/install.sh
networks:
default:
external:
name: transporte_default
volumes:
venv:

View File

@ -1,18 +1,23 @@
#!/bin/sh #!/bin/sh
cd /app
export PYTHONUSERBASE=/root/.local
# si no existe directorio de ambiente, se crea # si no existe directorio de ambiente, se crea
if [ ! -d ./libs ]; then if [[ ! -d /root/.local/bin ]]; then
python -m venv libs pip install --user -r /app/myproject/requirements.txt
. ./libs/bin/activate
pip install -r requirements.txt
fi fi
# activar ambiente con dependencias if [[ ! -d ./myproject ]]; then
. ./libs/bin/activate django-admin startproject myproject
fi
if [ ! -f .env ]; then chmod o+w -R myproject/
if [[ ! -f .env ]] && [[ -f .env.develop ]]; then
cp .env.develop .env cp .env.develop .env
fi fi
# iniciar servidor # iniciar servidor
python ./myproject/manage.py runserver 0.0.0.0:$PORT python myproject/manage.py runserver 0.0.0.0:$PORT

View File

@ -1,6 +1,8 @@
Django==3.2
djangocms-text-ckeditor
python-decouple
asgiref==3.7.2 asgiref==3.7.2
cssselect2==0.7.0 cssselect2==0.7.0
Django==3.2
django-classy-tags==4.0.0 django-classy-tags==4.0.0
django-cms==3.11.3 django-cms==3.11.3
django-filer==3.0.3 django-filer==3.0.3
@ -25,7 +27,7 @@ html5lib==1.1
lxml==4.9.3 lxml==4.9.3
packaging==23.1 packaging==23.1
Pillow==10.0.0 Pillow==10.0.0
psycopg2==2.9.6 psycopg2-binary==2.9.6
pytz==2023.3 pytz==2023.3
reportlab==4.0.4 reportlab==4.0.4
six==1.16.0 six==1.16.0

View File

@ -1,7 +0,0 @@
Django==3.2
django-cms
psycopg2-binary
django-filer
djangocms-text-ckeditor
python-decouple