File tree Expand file tree Collapse file tree 3 files changed +39
-1
lines changed
Expand file tree Collapse file tree 3 files changed +39
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to Production
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ deploy :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ # Step 1: Checkout the code
14+ - name : Checkout Code
15+ uses : actions/checkout@v3
16+
17+ # Step 2: Set up SSH to connect to the VPS
18+ - name : Set up SSH
19+ uses :
webfactory/[email protected] 20+ with :
21+ ssh-private-key : ${{ secrets.VPS_SSH_KEY }}
22+
23+ # Step 3: Deploy the app on the VPS
24+ - name : Deploy to VPS
25+ run : |
26+ ssh -o StrictHostKeyChecking=no ${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }} << 'EOF'
27+ cd /home/shlacker2020/Batcave/CPT_ANYTHING/api_looter
28+ docker compose down
29+ docker compose up --build -d
30+ docker exec -it api_looter_web python -m app.seed
31+ EOF
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -27,5 +27,13 @@ services:
2727 volumes :
2828 - .:/app
2929
30+ watchtower :
31+ image : containrrr/watchtower
32+ container_name : watchtower
33+ restart : always
34+ volumes :
35+ - /var/run/docker.sock:/var/run/docker.sock
36+ command : --cleanup --schedule "0 0 * * *"
37+
3038volumes :
3139 pgdata :
You can’t perform that action at this time.
0 commit comments