-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yml
43 lines (42 loc) · 1.2 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
43
version: "3.9"
services:
api:
restart: always
build:
context: api
dockerfile: Dockerfile
command: gunicorn --bind=0.0.0.0:8000 --workers=2 --threads=4 --reload _project.wsgi
env_file:
- .env
labels:
- traefik.enable=true
- traefik.http.routers.api.rule=PathPrefix(`/api`)
- traefik.http.services.api.loadbalancer.server.port=8000
- traefik.http.routers.api.tls=true
app:
restart: always
build:
context: app
dockerfile: Dockerfile.prod
command: npm run start
env_file:
- .env
labels:
- traefik.enable=true
- traefik.http.routers.app.rule=PathPrefix(`/`)
- traefik.http.services.app.loadbalancer.server.port=3000
- traefik.http.routers.app.tls=true
traefik:
image: traefik:v2.5
command:
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
- --entrypoints.web.http.redirections.entryPoint.to=websecure
- --entrypoints.web.http.redirections.entryPoint.scheme=https
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro