-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
41 lines (41 loc) · 1.13 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
version: "3"
services:
db:
container_name: sfe-mysql
image: mysql:8.0
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
TZ: "Asia/Seoul"
volumes:
- ./db:/var/lib/mysql
ports:
- "${MYSQL_HOST_PORT}:3306"
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
networks:
- sfe-net
redis:
container_name: sfe-redis
image: redis
ports:
- "${REDIS_HOST_PORT}:6379"
app:
container_name: sfe-server
build:
context: .
dockerfile: Dockerfile
ports:
- "${SPRING_HOST_PORT}:${SPRING_CONTAINER_PORT}"
depends_on:
- db
environment:
SPRING_DATASOURCE_URL: ${SPRING_DATASOURCE_URL}
SPRING_DATASOURCE_USERNAME: ${SPRING_DATASOURCE_USERNAME}
SPRING_DATASOURCE_PASSWORD: ${SPRING_DATASOURCE_PASSWORD}
networks:
- sfe-net
networks:
sfe-net:
driver: bridge