-
Notifications
You must be signed in to change notification settings - Fork 16
/
docker-compose.yml
60 lines (54 loc) · 953 Bytes
/
docker-compose.yml
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
name: mern-app
services:
mongo:
image: mongo:7.0.12
volumes:
- mongo_data:/data/db
networks:
- mern-app
api:
build:
context: ./backend
target: production
restart: unless-stopped
env_file:
- ./backend/.env
networks:
- mern-app
depends_on:
- mongo
frontend:
build:
context: ./frontend
target: production
args:
VITE_API_URL: https://api.${DOMAIN_NAME}
restart: unless-stopped
networks:
- mern-app
depends_on:
- api
caddy:
build:
context: ./caddy
dockerfile: Dockerfile
ports:
- 80:80
- 443:443
environment:
DOMAIN_NAME: ${DOMAIN_NAME}
volumes:
- caddy_data:/data
- caddy_config:/config
networks:
- mern-app
depends_on:
- frontend
- api
volumes:
mongo_data:
caddy_data:
caddy_config:
networks:
mern-app:
driver: bridge