-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
51 lines (51 loc) · 1.53 KB
/
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
version: "3.8"
services:
mysql-db:
image: 'mysql:8.0'
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_PORT=${MYSQL_PORT}
ports:
- ${MYSQL_PORT_MAP}
volumes:
- mysql-db:/var/lib/mysql
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
timeout: 1s
retries: 40
backend:
build: backend
depends_on:
mysql-db:
condition: service_healthy
ports:
- ${BACKEND_PORT_MAP}
environment:
spring.datasource.driver-class-name: 'com.mysql.cj.jdbc.Driver'
spring.datasource.url: 'jdbc:mysql://${DATABASE_HOST}:${MYSQL_PORT}/${MYSQL_DATABASE}'
spring.datasource.username: ${MYSQL_USER}
spring.datasource.password: ${MYSQL_PASSWORD}
spring.liquibase.url: 'jdbc:mysql://${DATABASE_HOST}:${MYSQL_PORT}/${MYSQL_DATABASE}'
spring.liquibase.user: ${LIQUIBASE_USER}
spring.liquibase.password: ${LIQUIBASE_PASSWORD}
server.port: ${BACKEND_PORT}
jwtSecret: ${JWT_SECRET}
jwtExpirationMs: ${JWT_EXPIRATION_MS}
jwtCookieName: ${JWT_COOKIE_NAME}
applicationAdminPassword: ${APPLICATION_ADMIN_PASSWORD}
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:3000/actuator/health" ]
interval: 1s
timeout: 2s
retries: 60
frontend:
build: frontend
depends_on:
- backend
ports:
- ${FRONTEND_PORT_MAP}
volumes:
mysql-db: