2018-08-19 03:15:39 -07:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
web:
|
2019-12-08 14:56:47 +08:00
|
|
|
image: development
|
2018-08-19 03:15:39 -07:00
|
|
|
build: .
|
|
|
|
|
working_dir: /app
|
|
|
|
|
command: >
|
|
|
|
|
bash -c "python manage.py migrate
|
|
|
|
|
&& python3 manage.py collectstatic --noinput
|
2018-08-19 04:24:28 -07:00
|
|
|
&& gunicorn pinry.wsgi:application -b 0.0.0.0:8000 --timeout 30"
|
2018-08-19 03:15:39 -07:00
|
|
|
ports:
|
|
|
|
|
- "127.0.0.1:2048:8000"
|
|
|
|
|
environment:
|
|
|
|
|
- SECRET_KEY=CHANGE-ME
|
|
|
|
|
user: ${CURRENT_UID}
|
|
|
|
|
volumes:
|
|
|
|
|
- .:/app
|
|
|
|
|
restart: always
|
2019-12-08 14:56:47 +08:00
|
|
|
build_frontend:
|
|
|
|
|
image: development
|
|
|
|
|
build: .
|
|
|
|
|
working_dir: /app/pinry-spa/
|
|
|
|
|
command: >
|
|
|
|
|
bash -c "yarn install && yarn build"
|
|
|
|
|
user: ${CURRENT_UID}
|
|
|
|
|
volumes:
|
|
|
|
|
- .:/app
|
2019-12-09 15:51:40 +08:00
|
|
|
restart: "no"
|