feature/ci-cd #1

Merged
homeburger merged 53 commits from feature/ci-cd into main 2026-02-28 23:04:37 -06:00
3 changed files with 88 additions and 0 deletions
Showing only changes of commit 5a309e45fe - Show all commits

View File

@@ -0,0 +1,32 @@
name: Build and Deploy API
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: docker
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Validate Registry
run: |
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login git.bxvard.net -u ${{ secrets.REGISTRY_USERNAME }} --password-stdin
- name: Build Docker image
run: |
docker build -t git.bxvard.net/homeburger/agologum-api:latest ./api
- name: Push image
run: |
docker push git.vxbard.net/homeburger/agologum-api:latest
- name: Deploy container
run: |
docker compose -f docker-compose.prod.yaml pull agologum-api
docker compose -f docker-compose.prod.yaml up -d agologum-api

View File

@@ -0,0 +1,33 @@
name: Build and Deploy Frontend
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: docker
steps:
- uses: actions/checkout@v3
- name: Login to Registry
run: |
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login yourdomain.com \
-u ${{ secrets.REGISTRY_USERNAME }} \
--password-stdin
- name: Build image
run: |
docker build -t yourdomain.com/owner/frontend:latest .
- name: Push
run: |
docker push yourdomain.com/owner/frontend:latest
- name: Deploy
run: |
docker compose -f /path/to/docker-compose.yml pull frontend
docker compose -f /path/to/docker-compose.yml up -d frontend

23
docker-compose.prod.yaml Normal file
View File

@@ -0,0 +1,23 @@
services:
api:
image: git.vxbard.net/homeburger/agologum-api:latest
container_name: agologum-api
restart: always
ports:
- "5000:80"
networks:
- web
client:
image: git.vxbard.net/homeburger/agologum-client:latest
container_name: agologum-client
restart: always
ports:
- "8080:80"
networks:
- web
networks:
web:
external: true