-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
51 lines (48 loc) · 1.15 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
version: '3.8'
services:
mysqldb:
container_name: mysqldb
image: mysql:8.0.31
hostname: mysqldb
restart: unless-stopped
env_file: ./.env
environment:
- MYSQL_ROOT_PASSWORD=$MYSQLDB_ROOT_PASSWORD
- MYSQL_DATABASE=$MYSQLDB_DATABASE
- MYSQL_USER=$MYSQLDB_USER
- MYSQL_PASSWORD=$MYSQLDB_PASSWORD
ports:
- "3306:3306"
networks:
- ak-bench-java
flyway:
image: flyway/flyway
command: -url=$MYSQL_URL -user=$MYSQLDB_USER -password=$MYSQLDB_PASSWORD -baselineOnMigrate=true -connectRetries=60 migrate
volumes:
- ./init_scripts:/flyway/sql
depends_on:
- mysqldb
networks:
- ak-bench-java
app:
container_name: rest-api
image: answer-king-rest-api_app
env_file: ./.env
depends_on:
- mysqldb
build: ./.
restart: unless-stopped
ports:
- "8080:8080"
- "5005:5005"
environment:
- "SPRING_PROFILES_ACTIVE=docker"
- "JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
volumes:
- .m2:/root/.m2
networks:
- ak-bench-java
volumes:
db:
networks:
ak-bench-java: