Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE] 무중단 배포를 위해 도커 컴포즈 파일 수정 #789

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 31 additions & 5 deletions backend/be_app-docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,40 @@
services:

springboot:
container_name: coduo_springboot-app
springboot-blue:
container_name: coduo_springboot-app-blue
image: ${DOCKER_REPO_NAME}/springboot-app:test-latest
platform: linux/arm64
ports:
- ${SERVER_BINDING_PORT}
- ${BLUE_SERVER_BINDING_PORT}
volumes:
- ${SERVER_LOGS_PATH}/springboot-app:/logs
- ${SERVER_LOGS_PATH}/springboot-app/backup:/logs/backup
- ${SERVER_LOGS_PATH}/springboot-app/blue:/logs
- ${SERVER_LOGS_PATH}/springboot-app/backup/blue:/logs/backup
environment:
SPRING_DATASOURCE_REPLICA_MASTER_JDBC-URL: ${MASTER_DB_URL}
SPRING_DATASOURCE_REPLICA_MASTER_USERNAME: ${MASTER_DB_USERNAME}
SPRING_DATASOURCE_REPLICA_MASTER_PASSWORD: ${MASTER_DB_PASSWORD}
SPRING_DATASOURCE_REPLICA_SLAVE_JDBC-URL: ${SLAVE_DB_URL}
SPRING_DATASOURCE_REPLICA_SLAVE_USERNAME: ${SLAVE_DB_USERNAME}
SPRING_DATASOURCE_REPLICA_SLAVE_PASSWORD: ${SLAVE_DB_PASSWORD}
SPRING_JPA_HIBERNATE_DDL-AUTO: ${DDL_AUTO}
OAUTH_GITHUB_CLIENT_ID: ${CLIENT_ID}
OAUTH_GITHUB_CLIENT_SECRET: ${CLIENT_SECRET}
OAUTH_GITHUB_REDIRECT_URI: ${CLIENT_REDIRECT_URI}
JWT_SIGN_KEY: ${JWT_KEY}
EC2_PREFIX: ${INSTANCE_NAME}
restart: on-failure
networks:
- coduo_net

springboot-green:
container_name: coduo_springboot-app-green
image: ${DOCKER_REPO_NAME}/springboot-app:test-latest
platform: linux/arm64
ports:
- ${GREEN_SERVER_BINDING_PORT}
volumes:
- ${SERVER_LOGS_PATH}/springboot-app/green:/logs
- ${SERVER_LOGS_PATH}/springboot-app/backup/green:/logs/backup
environment:
SPRING_DATASOURCE_REPLICA_MASTER_JDBC-URL: ${MASTER_DB_URL}
SPRING_DATASOURCE_REPLICA_MASTER_USERNAME: ${MASTER_DB_USERNAME}
Expand Down