forked from UniD3-Hackathon-Team11/team11_BE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
24 lines (24 loc) · 1004 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
version: "3" #docker version 3 사용
services: #service들 정의
webapp:
container_name: webapp
build: #image를 DockerFile 기반으로 사용한다
context: . #DockerFile이 있는 디렉토리
dockerfile: Dockerfile #기존에 설정해둔 DockerFile을 지정히여 build 된 jar 파일을 container에 올린다.
restart: always #컨테이너 재실행
ports:
- 8080:8080
# environment: #환경 설정(database연결 및 profile 지정)
# SPRING_DATASOURCE_URL: jdbc:mysql://database:3306/starbucks_db_test?useSSL=false&serverTimezone=UTC&useLegacyDatetimeCode=false&allowPublicKeyRetrieval=true
# SPRING_DATASOURCE_USERNAME: root
# SPRING_DATASOURCE_PASSWORD: 1234
# SPRING_PROFILES_ACTIVE: dev #사용할 profile 지정
# mysql:
# image: mysql
# restart: unless-stopped
# container_name: mysql_hack
# environment:
# MYSQL_ROOT_PASSWORD: mypassword
# MYSQL_DATABASE: hackathon
# ports:
# - "3307:3306"