-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-prod.yml
42 lines (38 loc) · 1.5 KB
/
docker-compose-prod.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
39
40
41
42
version: '3.8'
services:
api:
build:
context: .
dockerfile: Dockerfile.prod
restart: unless-stopped
env_file:
- .env
command: bash -c 'python manage.py migrate && gunicorn -w 12 iblGpt.wsgi -b 0.0.0.0:${PORT} --limit-request-line 0'
networks:
- ibl-chatbot
- traefik-proxy
ports:
- "${PORT}:${PORT}"
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-proxy"
## HTTP
- "traefik.http.routers.${TRAEFIK_APP_ID}.entrypoints=web"
- "traefik.http.routers.${TRAEFIK_APP_ID}.rule=Host(`${HOST}`)"
- "traefik.http.routers.${TRAEFIK_APP_ID}.service=${TRAEFIK_APP_ID}-secure"
- "traefik.http.services.${TRAEFIK_APP_ID}.loadbalancer.server.port=${PORT}"
# Redirect
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.${TRAEFIK_APP_ID}.middlewares=https-redirect"
## HTTPS
- "traefik.http.routers.${TRAEFIK_APP_ID}-secure.entrypoints=websecure"
- "traefik.http.routers.${TRAEFIK_APP_ID}-secure.rule=Host(`${HOST}`)"
- "traefik.http.routers.${TRAEFIK_APP_ID}-secure.tls=${HTTPS_ROUTER_TLS_MODE}"
- "traefik.http.routers.${TRAEFIK_APP_ID}-secure.tls.certresolver=default"
- "traefik.http.routers.${TRAEFIK_APP_ID}-secure.service=${TRAEFIK_APP_ID}-secure"
- "traefik.http.services.${TRAEFIK_APP_ID}-secure.loadbalancer.server.port=${PORT}"
networks:
ibl-chatbot:
driver: bridge
traefik-proxy:
external: true