- Added 'depends_on' for the frontend service to ensure it starts after the backend service. - Updated Nginx configuration to proxy API and media requests to the backend, enhancing client access under the same host URL. - Included health check endpoint for backend service in Nginx configuration to monitor service status.
24 lines
771 B
YAML
24 lines
771 B
YAML
name: Deploy Production
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Deploy to Production
|
|
run: |
|
|
set -e
|
|
echo "=== Deploying Shinkan to PRODUCTION ==="
|
|
cd /home/lars/docker/shinkan
|
|
git fetch origin main || git clone http://192.168.2.144:3000/Lars/shinkan-jinkendo.git .
|
|
git reset --hard origin/main
|
|
docker compose build --no-cache
|
|
docker compose up -d
|
|
sleep 5
|
|
curl -sf http://localhost:8003/api/version && echo "✓ PROD API (direkt) healthy"
|
|
curl -sf http://localhost:3003/api/version && echo "✓ PROD API über Frontend-Nginx (wie Browser) healthy"
|
|
echo "=== Shinkan PROD Deploy complete ==="
|