Skip to content

Commit

Permalink
[Chore] 도커 컴포즈 .env로 시크릿화
Browse files Browse the repository at this point in the history
  • Loading branch information
JIHYUN2EE committed Aug 31, 2024
1 parent 7cc0966 commit a01165c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
docker-compose -f docker-compose.yml up --build -d
#name: CI/CD Pipeline for Spring Project
#name: CI/CD Pipeline for Spring Project - 이거는 도커파일만 이용해서 사용한 방식
## 트리거 설정: 해당 브랜치로 풀리퀘스트가 머지될 때 트리거
#on:
# push:
Expand Down
11 changes: 6 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ version: '3'
services:
app:
image: jihyun2ee/fitpet:latest
## 이게 필수세요~ env_file 등록!
env_file:
- .env ## 이게 필수. 이게 안 되어있었음.
- .env
environment:
SPRING_PROFILES_ACTIVE: prod
PROD_MYSQL_HOST: fitpet.cb26miuuaa9v.ap-southeast-2.rds.amazonaws.com
PROD_MYSQL_DB_NAME: fitpet
PROD_MYSQL_USERNAME: admin
PROD_MYSQL_PASSWORD: 12345555
PROD_MYSQL_HOST: ${PROD_MYSQL_HOST}
PROD_MYSQL_DB_NAME: ${PROD_MYSQL_DB_NAME}
PROD_MYSQL_USERNAME: ${PROD_MYSQL_USERNAME}
PROD_MYSQL_PASSWORD: ${PROD_MYSQL_PASSWORD}
ports:
- "8080:8080"
networks:
Expand Down

0 comments on commit a01165c

Please sign in to comment.