-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-prod.yml
More file actions
108 lines (105 loc) · 2.41 KB
/
docker-compose-prod.yml
File metadata and controls
108 lines (105 loc) · 2.41 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
version: "3.9"
services:
# Mongo DB Container
db:
container_name: mongo-db-prod
image: mongo:6.0
environment:
MONGO_INITDB_ROOT_USERNAME: "${MONGO_INITDB_ROOT_USERNAME}"
MONGO_INITDB_ROOT_PASSWORD: "${MONGO_INITDB_ROOT_PASSWORD}"
volumes:
- mongodb_data_container_prod:/data/db
networks:
- db-prod-network
restart: always
# Backend Container
backend:
container_name: back-prod
image: backend:prod
environment:
- DB_CONNECTION_STRING
- JWT_SECRET
- FORGET_PASSWORD_SECRET
- SU_PASS
- SU_EMAIL
- SU_USERNAME
- EMAIL_USER
- EMAIL_PASS
- GOOGLE_CREDIENTIALS_CLIENT_ID_flutter_android
- GOOGLE_CREDIENTIALS_CLIENT_ID_flutter_web
- GOOGLE_CREDIENTIALS_CLIENT_ID_web
networks:
- db-prod-network
- proxy-network
depends_on:
- db
restart: always
volumes:
- backend_assets:/app/assets/
# Static Content
static-resources:
container_name: resources-prod
image: nginx:latest
restart: always
volumes:
- backend_assets:/usr/share/nginx/html/assets
networks:
- proxy-network
# Frontend Container
frontend:
container_name: front-prod
image: frontend:prod
environment:
- REACT_APP_BASE_URL
- REACT_APP_GOOGLE_ID
- REACT_APP_GOOGLE_SECRET
- REACT_APP_GITHUB_ID
- REACT_APP_GITHUB_SECRET
restart: always
networks:
- proxy-network
depends_on:
- backend
# Cross Platform Container
crossplatform:
container_name: cross-prod
image: cross:prod
environment:
- BASE_URL
- MEDIA_URL
restart: always
networks:
- proxy-network
depends_on:
- backend
# Proxy
webserver:
container_name: proxy-nginx-prod
image: myproxy:prod
ports:
- 80:80
- 443:443
restart: always
networks:
- proxy-network
volumes:
- certbot_www_volume:/var/www/certbot/
- certbot_conf_volume:/etc/nginx/ssl/
depends_on:
- frontend
- crossplatform
# SSL Certificate (One Time Only)
certbot:
container_name: proxy-certbot-prod
image: certbot/certbot:latest
volumes:
- certbot_www_volume:/var/www/certbot/
- certbot_conf_volume:/etc/letsencrypt/
volumes:
mongodb_data_container_prod:
certbot_conf_volume:
certbot_www_volume:
backend_assets:
networks:
db-prod-network:
proxy-network: