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
cd /app
export PYTHONUSERBASE=/root/.local
# si no existe directorio de ambiente, se crea
if [ ! -d ./libs ]; then
python -m venv libs
. ./libs/bin/activate
pip install -r requirements.txt
if [[ ! -d /root/.local/bin ]]; then
pip install --user -r /app/myproject/requirements.txt
fi
# activar ambiente con dependencias
. ./libs/bin/activate
if [[ ! -d ./myproject ]]; then
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
fi
# 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
cssselect2==0.7.0
Django==3.2
django-classy-tags==4.0.0
django-cms==3.11.3
django-filer==3.0.3
@ -25,7 +27,7 @@ html5lib==1.1
lxml==4.9.3
packaging==23.1
Pillow==10.0.0
psycopg2==2.9.6
psycopg2-binary==2.9.6
pytz==2023.3
reportlab==4.0.4
six==1.16.0

View File

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