-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
87 lines (82 loc) · 2.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
version: "3"
services:
mysql:
image: mysql:8.0
container_name: mysql
environment:
MYSQL_ROOT_PASSWORD: 'simple'
MYSQL_ROOT_HOST: '%'
MYSQL_DATABASE: 'mvc'
TZ: Asia/Seoul
expose:
- "3307"
ports:
- "3307:3306"
volumes:
- ./infra/docker/mysql/initdb.d/init.sql:/docker-entrypoint-initdb.d/init.sql
#- ./mysql-init.d:/docker-entrypoint-initdb.d
#volumes:
#- mysql-data:/var/lib/mysql
app:
build:
context: .
dockerfile: Dockerfile
restart: always
container_name: spring-boot-app
ports:
- "8080:8080"
environment:
#SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3307/mvc?autoReconnect=true&allowMultiQueries=true&validationInterval=60000&useSSL=false&allowPublicKeyRetrieval=true&jdbcCompliantTruncation=false
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: rootpassword
depends_on:
- mysql
volumes:
mysql-data:
##version: '3'
#services:
## redis:
## image: redis
## ports:
## - "6379:6379"
# mysql:
# image: mysql:8.0
# container_name: mysql
# ports:
# - "43306:3306"
# environment:
# MYSQL_DATABASE: mvc
# MYSQL_ROOT_HOST: '%'
# MYSQL_ROOT_PASSWORD: root
# TZ: Asia/Seoul
# volumes:
# - ./infra/docker/mysql/db:/var/lib/mysql
# - ./infra/docker/mysql/initdb.d/init.sql:/docker-entrypoint-initdb.d/init.sql
# #- /etc/localtime:/etc/localtime:ro
# #- ./mysql/conf.d:/etc/mysql/conf.d
# command:
# - '--character-set-server=utf8mb4'
# - '--collation-server=utf8mb4_unicode_ci'
### - ./db/config.d:/etc/mysql/conf.d
### - ./db/data:/var/lib/mysql
### - ./db/config:/etc/mysql/my.conf
### - ./db/init.d:/docker-entrypoint-initdb.d
# healthcheck:
# test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
# interval: 3s
# timeout: 20s
# retries: 10
# springbootapp:
# image: ji0513ji/game-server:latest
# restart: always
# build: .
# #dockerfile: Dockerfile
# ports:
# - "8080:8080"
# depends_on:
# #- redis
# mysql:
# condition: service_healthy
## environment:
## - SPRING_PROFILES_ACTIVE=prodDB
#