Merge branch 'develop'
This commit is contained in:
+6
-2
@@ -18,5 +18,9 @@ RUN apk add --no-cache --virtual .build-deps python3-dev build-base linux-header
|
|||||||
&& pip install -r requirements.production.txt \
|
&& pip install -r requirements.production.txt \
|
||||||
&& apk del .build-deps
|
&& apk del .build-deps
|
||||||
|
|
||||||
ENTRYPOINT ["sh", "-c", "echo 'Django running on http://localhost:8000 in production mode' \
|
RUN python manage.py collectstatic --noinput
|
||||||
&& gunicorn -w 4 -b 0.0.0.0:8000 sikweb.wsgi"]
|
|
||||||
|
# run migrate
|
||||||
|
# python manage.py migrate --noinput
|
||||||
|
|
||||||
|
ENTRYPOINT ["sh", "-c", "./production_entrypoint.sh"]
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Collect static files
|
||||||
|
echo "Collect static files"
|
||||||
|
python manage.py collectstatic --noinput
|
||||||
|
|
||||||
|
# Apply database migrations
|
||||||
|
echo "Apply database migrations"
|
||||||
|
python manage.py migrate
|
||||||
|
|
||||||
|
# Start server
|
||||||
|
echo "Django running on http://localhost:8000 in production mode"
|
||||||
|
gunicorn -w 4 -b 0.0.0.0:8000 sikweb.wsgi
|
||||||
@@ -4,6 +4,7 @@ services:
|
|||||||
image: registry.gitlab.com/sahkoinsinoorikilta/vtmk/web2.0-backend:latest
|
image: registry.gitlab.com/sahkoinsinoorikilta/vtmk/web2.0-backend:latest
|
||||||
ports:
|
ports:
|
||||||
- 8000:8000
|
- 8000:8000
|
||||||
|
network_mode: host
|
||||||
environment:
|
environment:
|
||||||
SECRET_KEY: /run/secrets/DJANGO_SECRET_KEY
|
SECRET_KEY: /run/secrets/DJANGO_SECRET_KEY
|
||||||
TG_BOT_TOKEN: /run/secrets/DJANGO_TG_BOT_TOKEN
|
TG_BOT_TOKEN: /run/secrets/DJANGO_TG_BOT_TOKEN
|
||||||
|
|||||||
Reference in New Issue
Block a user