-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (48 loc) · 1.22 KB
/
docker-compose.yml
File metadata and controls
52 lines (48 loc) · 1.22 KB
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
version: '3.8'
services:
app:
image: eclipse-temurin:21-jre-alpine
container_name: my-spring-app
volumes:
- ../build/libs/coin-0.0.1-SNAPSHOT.jar:/app/coin-0.0.1-SNAPSHOT.jar
- /etc/localtime:/etc/localtime:ro
working_dir: /app
command: ["java", "-jar", "coin-0.0.1-SNAPSHOT.jar", "--spring.profiles.active=dev,it,mariadb-local"]
ports:
- "8080:8080"
- "5005:5005"
env_file:
- ./local.properties
environment:
- TZ=Asia/Seoul
- JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
depends_on:
mariadb:
condition: service_healthy
networks:
- app-network
mariadb:
image: mariadb:latest
container_name: mariadb
ports:
- "3306:3306"
env_file:
- ./local.properties
environment:
- TZ=Asia/Seoul
volumes:
- mariadb_data:/var/lib/mysql
- ./mariadb/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ]
interval: 10s
timeout: 5s
retries: 10
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
mariadb_data:
driver: local