Files
fitness-app/.gitea/workflows/deploy.yaml
T
robre 913bfd2f67
Build and Deploy Fitness App / build-and-deploy (push) Failing after 15s
Fix: Docker-Befehle korrigiert, direktes docker run
2026-05-09 13:22:26 +02:00

31 lines
1.0 KiB
YAML

name: Build and Deploy Fitness App
on:
push:
branches: [ "master" ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
volumes:
- /opt/fitness:/opt/fitness
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Build Backend Image
run: |
docker build -f apps/api/Dockerfile -t fitness-api:latest .
- name: Build Frontend Image
run: |
docker build -f apps/web/Dockerfile -t fitness-web:latest .
- name: Restart Application
run: |
cd /opt/fitness || mkdir -p /opt/fitness
docker stop fitness-web fitness-api 2>/dev/null || true
docker run -d --name fitness-api --network fitness_proxy-net -v fitness-data:/app/data fitness-api:latest
docker run -d --name fitness-web --network fitness_proxy-net -e VIRTUAL_HOST=robre.de,www.robre.de -e LETSENCRYPT_HOST=robre.de,www.robre.de -e VIRTUAL_PORT=80 fitness-web:latest