-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
108 lines (100 loc) · 2.37 KB
/
docker-compose.yaml
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
101
102
103
104
105
106
107
108
services:
postgres:
container_name: hs-tms_postgres
image: postgres:15
restart: always
volumes:
- ./backend/init.sql:/docker-entrypoint-initdb.d/init.sql
- postgres_data:/var/lib/postgresql/data
environment:
- TZ=Europe/Lisbon
- PGTZ=Europe/Lisbon
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- PGDATA=/var/lib/postgresql/data/pgdata
networks:
- backend
postgres-demo:
container_name: hs-tms_postgres-demo
image: postgres:15
restart: always
volumes:
- ./backend/init-demo.sql:/docker-entrypoint-initdb.d/init.sql
- postgres-demo_data:/var/lib/postgresql/data
environment:
- TZ=Europe/Lisbon
- PGTZ=Europe/Lisbon
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- PGDATA=/var/lib/postgresql/data/pgdata
networks:
- backend
redis:
container_name: hs-tms_redis
image: redis:7.2
restart: always
volumes:
- redis_data:/data
environment:
- TZ=Europe/Lisbon
networks:
- backend
backend:
container_name: hs-tms_backend
build: ./backend
restart: always
depends_on:
- postgres
- redis
volumes:
- ./backend/src:/usr/src/app/backend/src
- ./backend/storage:/usr/src/app/backend/storage
- ./backend/init-demo.sql:/usr/src/app/backend/init-demo.sql
- backend_storage:/var/lib/hs-tms/storage
environment:
- TZ=Europe/Lisbon
networks:
- backend
- caddy-backend
frontend:
container_name: hs-tms_frontend
build: ./frontend
restart: always
depends_on:
- backend
volumes:
- ./frontend/src:/usr/src/app/frontend/src
- ./frontend/dist:/usr/src/app/frontend/dist
environment:
- TZ=Europe/Lisbon
networks:
- caddy-frontend
caddy:
container_name: hs-tms_caddy
image: caddy:2.7
restart: unless-stopped
cap_add:
- NET_ADMIN
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile.${ENVIRONMENT}:/etc/caddy/Caddyfile
- caddy_data:/data
- ./frontend/dist:/var/www
networks:
- caddy-backend
- caddy-frontend
networks:
backend:
driver: bridge
caddy-backend:
driver: bridge
caddy-frontend:
driver: bridge
volumes:
postgres_data:
postgres-demo_data:
redis_data:
backend_storage:
caddy_data: