-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (42 loc) · 1.09 KB
/
docker-compose.yml
File metadata and controls
44 lines (42 loc) · 1.09 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
version: "3.8"
services:
db:
image: mysql:8.4.0
volumes:
- ./mysql/init:/docker-entrypoint-initdb.d
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- LANG=${LANG}
restart: always
networks:
- ${NETWORK_NAME}
was:
build:
context: .
dockerfile: docker/Dockerfile_Was
# image: boylonglegs/gonghak-was:local
environment:
- DB_URL=${DB_NAME}
- DB_PORT=${DB_PORT}
- DB_NAME=${SCHEMA_NAME}
depends_on:
- ${DB_NAME} # db 컨테이너가 실행된 후, was가 실행됨
networks:
- ${NETWORK_NAME}
nginx:
build: # 도커파일을 통해 이미지를 빌드할 때, 사용
context: . # 도커 빌드 컨텍스트는 루트 경로로 지정
dockerfile: docker/Dockerfile_Nginx
# image: gonghak-proxy:local
environment:
- WAS_HOST=${WAS_NAME}
ports:
- 80:80
depends_on:
- ${WAS_NAME} # was 컨테이너가 실행된 후, nginx가 실행됨
networks:
- ${NETWORK_NAME}
networks:
gonghak:
driver: bridge