88260e1e9a
Build & Deploy / Build & Push Docker Images (push) Has been cancelled
Build & Deploy / Deploy on Server (push) Has been cancelled
Docker Integration / Docker Compose Build (push) Has been cancelled
Frontend CI / Lint, Test & Build (20) (push) Has been cancelled
Frontend CI / Lint, Test & Build (22) (push) Has been cancelled
Add GHCR image build/push and SSH-based server deployment workflow, production compose/env templates, and deployment script. Also fix frontend container healthcheck target and extend Docker CI with frontend health verification. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
36 lines
1.0 KiB
YAML
36 lines
1.0 KiB
YAML
name: Docker Integration
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
docker-build:
|
|
name: Docker Compose Build
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build all services
|
|
run: docker compose -f devops/docker-compose.yml build
|
|
|
|
- name: Start services
|
|
run: |
|
|
docker compose -f devops/docker-compose.yml up -d db backend frontend
|
|
sleep 30
|
|
|
|
- name: Verify backend health
|
|
run: |
|
|
docker compose -f devops/docker-compose.yml exec -T backend node -e "const h=require('http');h.get('http://localhost:5000/health',(r)=>{let d='';r.on('data',c=>d+=c);r.on('end',()=>{console.log(d);process.exit(r.statusCode===200?0:1)})}).on('error',e=>{console.error(e);process.exit(1)})"
|
|
|
|
- name: Verify frontend health
|
|
run: |
|
|
curl -fsS http://localhost:3000 >/dev/null
|
|
|
|
- name: Cleanup
|
|
if: always()
|
|
run: docker compose -f devops/docker-compose.yml down -v
|