25 lines
896 B
YAML
25 lines
896 B
YAML
name: Deploy Fitness App
|
|
on:
|
|
push:
|
|
branches: [ "master" ]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
volumes:
|
|
- /opt/fitness:/opt/fitness
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build & Deploy
|
|
run: |
|
|
docker build -f Dockerfile.api -t fitness-api:latest .
|
|
docker build -f Dockerfile.web -t fitness-web:latest .
|
|
docker stop fitness-api fitness-web 2>/dev/null || true
|
|
docker rm fitness-api fitness-web 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 |