Cleanup: remove unused code, add CI/CD workflow
Some checks failed
Deploy Backend / deploy (push) Failing after 2m30s
Some checks failed
Deploy Backend / deploy (push) Failing after 2m30s
- Remove flask-sse, Redis (unused) - Remove ImageService, file_utils (unused) - Remove /download-posters route (frontend handles download client-side) - Remove LETTERBOXD_API_URL, secure_filename (dead imports) - Fix duplicate TMDBService instantiation - Simplify config.py (remove REDIS_URL) - Fix gunicorn user home dir for control socket - Add .gitignore for __pycache__ - Add .gitea/workflows/deploy.yml for tag-based CI/CD
This commit is contained in:
33
.gitea/workflows/deploy.yml
Normal file
33
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
name: Deploy Backend
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Extract version tag
|
||||
run: echo "VERSION_TAG=${GITHUB_REF_NAME}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
docker build \
|
||||
-t poster-picker-backend:latest \
|
||||
-t poster-picker-backend:${{ env.VERSION_TAG }} .
|
||||
|
||||
- name: Stop old container
|
||||
run: |
|
||||
cd ~/dev-server/poster-picker
|
||||
docker compose stop backend || true
|
||||
|
||||
- name: Start new container
|
||||
run: |
|
||||
cd ~/dev-server/poster-picker
|
||||
docker compose up -d --no-build backend
|
||||
Reference in New Issue
Block a user