-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
38 lines (35 loc) · 965 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
version: "3.5"
services:
python:
image: "python:${PYTHON_TAG}"
container_name: "${PROJECT_NAME}_python"
stop_grace_period: 60s
restart: always
build:
dockerfile: Dockerfile
context: ./server
args:
PYTHON_TAG: $PYTHON_TAG
volumes:
- ./server:/app
command: gunicorn app:app -b :8080 --worker-class aiohttp.GunicornWebWorker --reload --access-logfile -
ports:
- "${PYTHON_PORT}:8080"
labels:
- "traefik.http.routers.${PROJECT_NAME}_python=Host(`python.${PROJECT_BASE_URL}`)"
nginx:
image: nginx:$NGINX_TAG
container_name: "${PROJECT_NAME}_nginx"
restart: always
depends_on:
- python
ports:
- ${NGINX_PORT}:80
volumes:
- ./server:/var/www/html
- ./services/nginx/conf.d:/etc/nginx/conf.d
labels:
- "traefik.http.routers.${PROJECT_NAME}_nginx=Host(`nginx.${PROJECT_BASE_URL}`)"
networks:
default:
name: vue_python