Files
CustomAuthenticationEntryPoint/docker-compose.yml
beaniejoy c4a1c849cf [#3] cafe api 개발 및 전반적인 container 환경 설정 세팅
- docker compose 활용한 컨테이너 환경 구축
- cafe 관련 api 구축
- flyway migration db 및 seed data 설정
2021-10-09 02:41:20 +09:00

51 lines
1.2 KiB
YAML

version: "3.8"
services:
nginx:
image: nginx
container_name: nginx
ports:
- "80:80"
volumes:
- ./nginx/:/etc/nginx/conf.d/
depends_on:
- app-server-1
- app-server-2
app-server-1:
build:
context: .
dockerfile: Dockerfile
env_file:
- env/app.env
depends_on:
- db-mysql
app-server-2:
build:
context: .
dockerfile: Dockerfile
env_file:
- env/app.env
depends_on:
- db-mysql
migration:
image: flyway/flyway:7.5.1
command: -configFiles=/flyway/conf/flyway.config -locations=filesystem:/flyway/sql -connectRetries=60 migrate
volumes:
- ${PWD}/flyway/db-migration/main:/flyway/sql
- ${PWD}/flyway/conf/flyway_main.conf:/flyway/conf/flyway.config
depends_on:
- db-mysql
seed:
image: flyway/flyway:7.5.1
command: -configFiles=/flyway/conf/flyway.config -locations=filesystem:/flyway/sql -connectRetries=60 migrate
volumes:
- ${PWD}/flyway/db-migration/seed:/flyway/sql
- ${PWD}/flyway/conf/flyway_seed.conf:/flyway/conf/flyway.config
depends_on:
- db-mysql
db-mysql:
image: mysql:5.7.34
ports:
- "3306:3306"
env_file:
- env/mysql.env