-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
100 lines (90 loc) · 2.32 KB
/
docker-compose.yml
File metadata and controls
100 lines (90 loc) · 2.32 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
# docker-compose.yml
name: fitdesk
networks:
internal: {}
volumes:
mongo_data: {}
services:
# --- Mongo (toujours dispo) ---
mongo:
image: mongo:7
environment:
MONGO_INITDB_DATABASE: ${MONGO_DB}
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
MONGO_APP_USER: ${MONGO_APP_USER}
MONGO_APP_PASSWORD: ${MONGO_APP_PASSWORD}
volumes:
- mongo_data:/data/db
- ./mongo/mongo-init:/docker-entrypoint-initdb.d:ro
networks: [internal]
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.runCommand({ ping: 1 })"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
# --- Apps + nginx (prod seulement) ---
nginx:
profiles: ["prod"]
image: nginx:1.27-alpine
ports:
- "80:80"
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d:ro
- ./nginx/includes:/etc/nginx/includes:ro
networks: [internal]
restart: unless-stopped
mongo_express:
profiles: ["prod"]
image: mongo-express:1
environment:
ME_CONFIG_MONGODB_SERVER: mongo
ME_CONFIG_MONGODB_ENABLE_ADMIN: "true"
ME_CONFIG_MONGODB_AUTH_DATABASE: admin
ME_CONFIG_MONGODB_ADMINUSERNAME: ${MONGO_USER}
ME_CONFIG_MONGODB_ADMINPASSWORD: ${MONGO_PASSWORD}
ME_CONFIG_BASICAUTH_USERNAME: admin
ME_CONFIG_BASICAUTH_PASSWORD: ${MONGOEXPRESS_ADMIN_PASSWORD}
networks: [internal]
ports: ["8081:8081"]
restart: unless-stopped
api:
profiles: ["prod"]
build: ./api
env_file: .env
environment:
NODE_ENV: prod
APP_ADMIN_PASSWORD: ${APP_ADMIN_PASSWORD}
DB_CONN_STRING: ${DB_CONN_STRING}
networks: [internal]
expose: ["3000"]
restart: unless-stopped
frontoffice:
profiles: ["prod"]
build: ./frontoffice
env_file: .env
networks: [internal]
expose: ["80"]
restart: unless-stopped
backoffice:
profiles: ["prod"]
build: ./backoffice
env_file: .env
networks: [internal]
expose: ["80"]
restart: unless-stopped
showcase:
profiles: ["prod"]
build: ./showcase
env_file: .env
networks: [internal]
expose: ["80"]
restart: unless-stopped
mobile:
profiles: ["prod"]
build: ./mobile
env_file: .env
networks: [internal]
expose: ["80"]
restart: unless-stopped