-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-prod.yml
More file actions
84 lines (84 loc) · 2.4 KB
/
docker-compose-prod.yml
File metadata and controls
84 lines (84 loc) · 2.4 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
version: '2'
services:
# api:
# build: ./api
# volumes:
# - ./api/src:/app
# - /etc/letsencrypt:/etc/letsencrypt
# environment:
# - SQLALCHEMY_DATABASE_URI=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
# - JWT_SECRET=${JWT_KEY}
# - JWT_ISSUER=skilmu
# - DEBUG=0
# - MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}
# - MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
# - HOST=${HOST}
# - HOST_IP=${HOST_IP}
# - HOST_STORAGE=${HOST_STORAGE}
# - HOST_MQTT=${HOST_MQTT}
# - MAIL_PASSWORD=${MAIL_PASSWORD}
# depends_on:
# - db
# restart: unless-stopped
# expose:
# - "80"
# command: gunicorn -b 0.0.0.0:80 main:app
# labels:
# - "traefik.frontend.rule=Host:mtutor.codingcamp.id,mops.codingcamp.id;PathPrefixStrip:/api"
api-v2:
build: ./api-v2
volumes:
- ./api-v2/src:/app
- /etc/letsencrypt:/etc/letsencrypt
environment:
- MONGO_JSON=${MONGO_JSON}
- JWT_SECRET=${JWT_KEY}
- JWT_ISSUER=skilmu
- DEBUG=0
- HOST_MQTT=${HOST_MQTT}
- MAIL_PASSWORD=${MAIL_PASSWORD}
depends_on:
- db
restart: unless-stopped
expose:
- "80"
command: gunicorn -b 0.0.0.0:80 main:app
labels:
- "traefik.frontend.rule=Host:mtutor.codingcamp.id,mops.codingcamp.id;PathPrefixStrip:/api"
tutor:
image: nginx
volumes:
- $PWD/nginx-default.conf:/etc/nginx/conf.d/default.conf:ro
- ./web/tutor/dist:/usr/share/nginx/html:ro
restart: unless-stopped
labels:
- "traefik.frontend.rule=Host:mtutor.codingcamp.id"
ops:
image: nginx
volumes:
- ./web/ops/dist:/usr/share/nginx/html:ro
restart: unless-stopped
labels:
- "traefik.frontend.rule=Host:mops.codingcamp.id"
proxy:
image: traefik
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events
- $PWD/traefik.toml:/etc/traefik/traefik.toml
- /etc/letsencrypt:/etc/letsencrypt
restart: unless-stopped
command: --api --docker
api-docs:
image: swaggerapi/swagger-ui
environment:
- API_URL=https://${HOST}/api/api-docs
- BASE_URL=/api
- PORT=80
expose:
- "80"
labels:
- "traefik.frontend.rule=Host:mtutor.codingcamp.id,mops.codingcamp.id;PathPrefixStrip:/docs"