-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (38 loc) · 960 Bytes
/
docker-compose.yml
File metadata and controls
38 lines (38 loc) · 960 Bytes
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
services:
client:
build:
context: ./client
target: production
container_name: client-container
restart: unless-stopped
ports:
- "5173:5173"
- "4173:4173"
environment:
- VITE_API_URL=http://localhost:4000
- Environment=production
depends_on:
- server
server:
build:
context: ./server
target: production
container_name: server-container
restart: unless-stopped
ports:
- "4000:4000"
environment:
- PORT=4000
- MONGO_URL=mongodb://mongo-container:27017
- Environment=production
depends_on:
- mongo-container
mongo-container:
image: mongo:latest
container_name: mongo-container
volumes:
- mongo-data:/data/db
# No ports section needed here as both server and mongo-container are running on the same network (bridge By default created by dockercompose)!
restart: unless-stopped
volumes:
mongo-data: