test: deploy test #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.8' | |
services: | |
mysql: | |
image: mysql:5.7 | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: password123 # root 비밀번호 설정 | |
MYSQL_DATABASE: cano | |
MYSQL_USER: root # MySQL 유저 설정 | |
MYSQL_PASSWORD: password123 # root 비밀번호 설정 | |
ports: | |
- "3306:3306" | |
volumes: | |
- mysql-data:/var/lib/mysql # Docker Volume 사용 | |
springboot-app: | |
build: | |
context: . | |
dockerfile: Dockerfile | |
restart: always | |
environment: | |
SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3306/cano | |
SPRING_DATASOURCE_USERNAME: root # root 유저로 연결 | |
SPRING_DATASOURCE_PASSWORD: password123 # 비밀번호 설정 | |
ports: | |
- "8080:8080" | |
depends_on: | |
- mysql | |
volumes: | |
mysql-data: # Docker Volume 정의 |