Piattaforma ITI TECHNOLOGY: monorepo, Medusa, API, sito, area riservata e deploy
Deploy stack su Proxmox / deploy (push) Failing after 3s
Deploy stack su Proxmox / deploy (push) Failing after 3s
Monorepo npm con apps/public (Angular SSR), apps/private (Angular SPA), apps/api (Fastify), packages/shared e packages/styles; Medusa 2.21 in medusa/; infrastruttura Docker (Postgres PostGIS+pgvector, Redis, Caddy, backup) e workflow Gitea Actions per il deploy via SSH a ogni push su master. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018jQyT6dR9czzGwqb7FkG6u
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
name: Deploy stack su Proxmox
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Sul server DEPLOY_PATH è il clone del repo con il .env di produzione
|
||||
# (da .env.prod.example). Il primo deploy (seed Medusa, admin) si fa a mano:
|
||||
# vedi "Deploy (produzione)" in CLAUDE.md.
|
||||
- name: Deploy via SSH (git pull + docker compose up -d --build)
|
||||
uses: appleboy/ssh-action@v1
|
||||
with:
|
||||
host: ${{ secrets.DEPLOY_HOST }}
|
||||
port: ${{ secrets.DEPLOY_PORT }}
|
||||
username: ${{ secrets.DEPLOY_USER }}
|
||||
key: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||
command_timeout: 45m
|
||||
script: |
|
||||
set -e
|
||||
cd "${{ secrets.DEPLOY_PATH }}"
|
||||
test -f .env || { echo "Manca .env in ${{ secrets.DEPLOY_PATH }} (copiare .env.prod.example)"; exit 1; }
|
||||
git fetch origin master
|
||||
git reset --hard origin/master
|
||||
docker compose -f docker-compose.prod.yml build
|
||||
docker compose -f docker-compose.prod.yml up -d --wait --wait-timeout 600 --remove-orphans
|
||||
docker image prune -f
|
||||
Reference in New Issue
Block a user