-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
55 lines (54 loc) · 1.19 KB
/
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
version: "3.3"
services:
nginx:
image: nginx:1.20.0-alpine
volumes:
- frontend_dist:/usr/share/nginx/html:ro
- ./nginx.conf:/etc/nginx/conf.d/default.conf
depends_on:
- frontend
- backend
labels:
- "traefik.enable=true"
- "traefik.http.routers.breatheindia.rule=Host(`breathe-india.com`)"
networks:
- web
- internal
restart: always
frontend:
build: ./breathe-india-frontend
image: localhost:5000/breathe-india/frontend:latest
volumes:
- frontend_dist:/app/nginx_volume
depends_on:
- backend
networks:
- internal
# don't restart cuz this one simply copies its files
# to nginx and exits
backend:
build: ./breathe-india-backend
image: localhost:5000/breathe-india/backend:latest
env_file:
- ./backend.env
depends_on:
- postgres
networks:
- internal
restart: always
postgres:
image: postgres:13.2-alpine
env_file:
- ./postgres.env
volumes:
- ./postgres-data:/var/lib/postgresql/data
networks:
- internal
restart: always
volumes:
frontend_dist: {}
networks:
web:
external: true
internal:
external: false