diff --git a/Dockerfile b/Dockerfile index 918e049..ae6b20c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,12 +10,13 @@ RUN chmod 0644 /etc/cron.d/django_crons_jobs && crontab /etc/cron.d/django_crons RUN apk update && apk add --no-cache mariadb-connector-c-dev && apk add --no-cache mariadb-connector-c-dev gcc g++ libxslt-dev musl-dev nodejs npm git docker libffi-dev libffi curl libxml2-dev libxslt-dev py3-lxml mariadb python3-dev -RUN pip install --no-cache-dir -r requirements.txt -RUN python manage.py makemigrations && python manage.py migrate +RUN python -m venv venv && source venv/bin/activate && pip install --no-cache-dir -r requirements.txt +RUN source venv/bin/activate && python manage.py makemigrations && python manage.py migrate EXPOSE 8080 -CMD ["python", "manage.py", "runserver", "0.0.0.0:8080"] +#CMD ["python", "manage.py", "runserver", "0.0.0.0:8080"] +CMD ["./start.sh"] #CMD ["./startup.sh"] diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..fb10f7b --- /dev/null +++ b/start.sh @@ -0,0 +1,2 @@ +source /app/venv/bin/activate +python /app/manage.py runserver 0.0.0.0:8080 \ No newline at end of file