Compare commits
2 Commits
d59563e132
...
e241d429d0
| Author | SHA1 | Date | |
|---|---|---|---|
| e241d429d0 | |||
| 9fb64d0259 |
@@ -9,9 +9,9 @@ ENV PYTHONDONTWRITEBYTECODE 1
|
|||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
|
|
||||||
COPY requirements.txt ${APP_HOME}
|
COPY requirements.txt ${APP_HOME}
|
||||||
COPY gunicorn-cfg.py ${APP_HOME}
|
#COPY gunicorn-cfg.py ${APP_HOME}
|
||||||
COPY run.sh ${APP_HOME}
|
#COPY run.sh ${APP_HOME}
|
||||||
RUN chmod +x ${APP_HOME}/run.sh
|
#RUN chmod +x ${APP_HOME}/run.sh
|
||||||
|
|
||||||
|
|
||||||
# install python dependencies
|
# install python dependencies
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ services:
|
|||||||
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
||||||
MYSQL_USER: ${MYSQL_USER}
|
MYSQL_USER: ${MYSQL_USER}
|
||||||
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
||||||
|
volumes:
|
||||||
|
- .:/app:rw
|
||||||
|
- ./staticfiles:/app/static
|
||||||
|
- ./mediafiles:/app/media
|
||||||
command: bash -c 'cd /app && ./run.sh'
|
command: bash -c 'cd /app && ./run.sh'
|
||||||
depends_on:
|
depends_on:
|
||||||
mysql:
|
mysql:
|
||||||
|
|||||||
3
run.sh
Normal file → Executable file
3
run.sh
Normal file → Executable file
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
cd src &&
|
||||||
python manage.py migrate &&
|
python manage.py migrate &&
|
||||||
python manage.py fill_empty_db &&
|
python manage.py fill_empty_db &&
|
||||||
gunicorn --config gunicorn-cfg.py kalskeborec.wsgi
|
gunicorn --config ../gunicorn-cfg.py kalskeborec.wsgi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user