forked from codesquad-members-2023/be-java-cafe-max
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
34 lines (34 loc) · 943 Bytes
/
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
version: "3.8"
services:
app:
container_name: be-java-cafe-max
image: yhkim951107/be-java-cafe-max:latest
depends_on:
- db
ports:
- 8080:8080
volumes:
- cafe_app:/app
env_file:
- .env
environment:
SPRING_DATASOURCE_DRIVERCLASSNAME: com.mysql.cj.jdbc.Driver
SPRING_DATASOURCE_URL: jdbc:mysql://${MYSQL_HOST}:${MYSQL_PORT}/${MYSQL_DATABASE}?useSSL=false&allowPublicKeyRetrieval=true
SPRING_DATASOURCE_USERNAME: ${MYSQL_USERNAME}
SPRING_DATASOURCE_PASSWORD: ${MYSQL_USER_PASSWORD}
db:
container_name: be-java-cafe-max-mysql-db
image: mysql
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_USER_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
TZ: Asia/Seoul
volumes:
- ./db/mysql/conf.d:/etc/mysql/conf.d
- ./db/mysql/initdb.d:/docker-entrypoint-initdb.d
env_file:
- .env
volumes:
cafe_app: