-
Notifications
You must be signed in to change notification settings - Fork 356
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
98 lines (93 loc) · 2.14 KB
/
docker-compose.yaml
File metadata and controls
98 lines (93 loc) · 2.14 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
services:
client:
build:
context: ./client
dockerfile: Dockerfile
target: development
container_name: code-a2z-client
ports:
- '5173:5173'
env_file:
- ./client/.env
volumes:
- ./client/src:/app/src
- ./client/public:/app/public
- client_node_modules:/app/node_modules
depends_on:
- server
restart: unless-stopped
networks:
- code-a2z-network
server:
build:
context: ./server
dockerfile: Dockerfile
target: development
container_name: code-a2z-server
ports:
- '8000:8000'
depends_on:
mongo:
condition: service_healthy
env_file:
- ./server/.env
environment:
- MONGODB_URL=mongodb://mongo:27017/code-a2z
- VITE_CLIENT_DOMAIN=http://localhost:5173
volumes:
- ./server/src:/app/src
- ./server/logs:/app/logs
restart: unless-stopped
healthcheck:
test:
[
'CMD',
'wget',
'--no-verbose',
'--tries=1',
'--spider',
'http://localhost:8000/monitor/health',
]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- code-a2z-network
mongo:
image: mongo:8-noble
container_name: code-a2z-mongo
ports:
- '27017:27017'
volumes:
- mongo-data:/data/db
restart: unless-stopped
healthcheck:
test: ['CMD', 'mongosh', '--eval', "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
- code-a2z-network
mongo-express:
image: mongo-express:latest
container_name: code-a2z-mongo-express
ports:
- '8081:8081'
environment:
- ME_CONFIG_MONGODB_URL=mongodb://mongo:27017
- ME_CONFIG_BASICAUTH_USERNAME=${MONGO_EXPRESS_USER:-admin}
- ME_CONFIG_BASICAUTH_PASSWORD=${MONGO_EXPRESS_PASSWORD:-changeme}
- ME_CONFIG_MONGODB_ENABLE_ADMIN=true
depends_on:
- mongo
restart: unless-stopped
networks:
- code-a2z-network
volumes:
mongo-data:
client_node_modules:
networks:
code-a2z-network:
driver: bridge