-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
117 lines (111 loc) · 3.18 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
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
109
110
111
112
113
114
115
116
117
version: "3.8"
services:
database:
image: postgres:latest
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: springcanteen
ports:
- "5432:5432"
volumes:
- db_file:/var/lib/postgresql/data
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U root -d springcanteen"]
interval: 1s
timeout: 5s
retries: 20
networks:
- backend
backend:
build: ./backend/springcanteen
restart: on-failure
volumes:
- ./backend/springcanteen:/app
- backend_data:/app/data
depends_on:
database:
condition: service_healthy
environment:
SPRING_APPLICATION_JSON: '{
"spring.datasource.url" : "jdbc:postgresql://database:5432/springcanteen",
"spring.datasource.username" : "root",
"spring.datasource.password" : "root",
"spring.jpa.properties.hibernate.dialect" : "org.hibernate.dialect.PostgreSQLDialect",
"spring.jpa.hibernate.ddl-auto" : "update",
"jwt.secret_key" : "413F4428472B4B6250655368566D5970337336763979244226452948404D6351",
"jwt.expirationtime.access" : "1200000",
"jwt.expirationtime.refresh" : "172800000",
"springdoc.api-docs.path" : "/api/docs",
"springdoc.swagger-ui.path" : "/api/docs"
}'
healthcheck:
test: curl --fail --silent localhost:8080/actuator/health || exit 1
interval: 2s
timeout: 30s
retries: 200
start_period: 10s
networks:
- backend
- frontend
labels:
- traefik.enable=true
- traefik.http.routers.backend.rule=PathPrefix(`/api`, `/websocket`)
- traefik.http.services.backend.loadbalancer.server.port=8080
- traefik.http.routers.backend.entrypoints=web
kiosk:
build: ./frontend/SpringKiosk/material-ui-vite-ts
restart: on-failure
depends_on:
backend:
condition: service_healthy
networks:
- frontend
labels:
- traefik.enable=true
- traefik.http.routers.kiosk.rule=PathPrefix(`/`)
- traefik.http.services.kiosk.loadbalancer.server.port=5173
- traefik.http.routers.kiosk.entrypoints=web
environment:
- VITE_HOST=localhost
digital-signage:
build: ./frontend/DigitalSignage
restart: on-failure
depends_on:
backend:
condition: service_healthy
networks:
- frontend
labels:
- traefik.enable=true
- traefik.http.routers.digital-signage.rule=PathPrefix(`/signage`)
- traefik.http.services.digital-signage.loadbalancer.server.port=5173
- traefik.http.routers.digital-signage.entrypoints=web
environment:
- VITE_HOST=localhost
traefik:
image: traefik:v2.11
ports:
- "80:80"
- "8080:8080"
depends_on:
backend:
condition: service_healthy
kiosk:
condition: service_started
digital-signage:
condition: service_started
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "./proxy/traefik.yml:/etc/traefik/traefik.yml"
restart: unless-stopped
networks:
- backend
- frontend
volumes:
db_file:
backend_data:
networks:
backend:
frontend: