File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy GetCloser
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+
9+ # 같은 브랜치 동시 실행 시 이전 잡 취소(경쟁 배포 방지)
10+ concurrency :
11+ group : cert-${{ github.ref }}
12+ cancel-in-progress : true
13+
14+ jobs :
15+ # ========================================
16+ # 🚀 Deploy GetCloser Service
17+ # ========================================
18+ deploy-prod :
19+ if : github.ref_name == 'main'
20+ name : 🚀 Deploy GetCloser
21+ runs-on : oracle
22+ environment : getcloser
23+ defaults :
24+ run :
25+ working-directory : ./getcloser
26+
27+ steps :
28+ - name : Checkout branch
29+ uses : actions/checkout@v3
30+
31+ - name : Set up Docker Buildx
32+ uses : docker/setup-buildx-action@v3
33+
34+ - name : Create .env file for PROD
35+ run : |
36+ set -e
37+ echo "DB_USER=${{ secrets.DB_USER }}" > .env
38+ echo "DB_PASSWORD=${{ secrets.DB_PASSWORD }}" >> .env
39+ echo "DB_DATABASE=${{ vars.DB_DATABASE }}" >> .env
40+ echo "APP_HOST=${{ vars.APP_HOST }}" >> .env
41+
42+ - name : 🚀 Deploy to PROD
43+ run : |
44+ docker compose -f docker-compose.yaml -p getcloser-${{ github.ref_name }} down --remove-orphans || true
45+ docker compose -f docker-compose.yaml -p getcloser-${{ github.ref_name }} up -d --build
Original file line number Diff line number Diff line change 1- FRONTEND_PORT = 8080
2- BACKEND_PORT = 8000
1+ # === Database Config ===
32DB_USER = user
43DB_PASSWORD = password
54DB_DATABASE = app_db
6- SECRET_KEY = secret_key
7- ACCESS_TOKEN_EXPIRE_MINUTES = 60
8- APP_HOST = www.example.com
5+
6+ # === Auth (currently unused) ===
7+ # SECRET_KEY=secret_key
8+ # ACCESS_TOKEN_EXPIRE_MINUTES=60
9+
10+ # === App Host ===
11+ APP_HOST = localhost
You can’t perform that action at this time.
0 commit comments