add CI/CD workflows, production docker-compose, and update dev compose with Gitea registry and monitoring improvements
This commit is contained in:
1 parent
df7a1b33cc
commit
6995763ccb
7 files changed
+580
-5
No files matched your search
@@ -0,0 +1,49 @@
|
||||
name: CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: [self-hosted, linux, docker]
|
||||
environment: production
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to Gitea Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.allucanget.biz
|
||||
username: ${{ secrets.GITEA_USERNAME }}
|
||||
password: ${{ secrets.GITEA_TOKEN }}
|
||||
|
||||
- name: Pull latest images
|
||||
run: |
|
||||
docker pull git.allucanget.biz/zwitschi/linearvoid/playout:latest || true
|
||||
docker pull git.allucanget.biz/zwitschi/linearvoid/chat:latest || true
|
||||
docker pull git.allucanget.biz/zwitschi/linearvoid/frontend:latest || true
|
||||
docker pull git.allucanget.biz/zwitschi/linearvoid/nginx:latest || true
|
||||
|
||||
- name: Deploy with docker-compose
|
||||
run: |
|
||||
docker compose -f docker-compose.prod.yml pull
|
||||
docker compose -f docker-compose.prod.yml up -d --remove-orphans
|
||||
|
||||
- name: Health check
|
||||
run: |
|
||||
sleep 10
|
||||
curl -f http://localhost:8080/health || exit 1
|
||||
curl -f http://localhost:3000/health || exit 1
|
||||
curl -f http://localhost:8081/health || exit 1
|
||||
|
||||
- name: Cleanup old images
|
||||
run: |
|
||||
docker image prune -f --filter "until=24h"
|
||||
Reference in new issue
Block a user