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
51 lines
1.8 KiB
YAML
51 lines
1.8 KiB
YAML
# Infrastruttura di sviluppo locale: Postgres (PostGIS + pgvector) e Redis.
|
|
# Avvio: npm run infra:up — variabili lette da .env nella root.
|
|
name: iti-technology-dev
|
|
|
|
services:
|
|
postgres:
|
|
build: ./infra/postgres
|
|
image: iti-technology/postgres:16-3.4-pgvector
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:?POSTGRES_USER mancante in .env}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD mancante in .env}
|
|
POSTGRES_DB: ${POSTGRES_DB:-postgres}
|
|
APP_DB_NAME: ${APP_DB_NAME:?APP_DB_NAME mancante in .env}
|
|
APP_DB_USER: ${APP_DB_USER:?APP_DB_USER mancante in .env}
|
|
APP_DB_PASSWORD: ${APP_DB_PASSWORD:?APP_DB_PASSWORD mancante in .env}
|
|
MEDUSA_DB_NAME: ${MEDUSA_DB_NAME:?MEDUSA_DB_NAME mancante in .env}
|
|
MEDUSA_DB_USER: ${MEDUSA_DB_USER:?MEDUSA_DB_USER mancante in .env}
|
|
MEDUSA_DB_PASSWORD: ${MEDUSA_DB_PASSWORD:?MEDUSA_DB_PASSWORD mancante in .env}
|
|
ports:
|
|
- "${POSTGRES_PORT:-5432}:5432"
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
- ./infra/postgres/init:/docker-entrypoint-initdb.d:ro
|
|
healthcheck:
|
|
# -h 127.0.0.1: durante l'init il server temporaneo ascolta solo sul socket,
|
|
# così il container risulta healthy solo a init completato
|
|
test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 -U \"$$POSTGRES_USER\" -d \"$$POSTGRES_DB\""]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
start_period: 30s
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
restart: unless-stopped
|
|
command: ["redis-server", "--appendonly", "yes"]
|
|
ports:
|
|
- "${REDIS_PORT:-6379}:6379"
|
|
volumes:
|
|
- redis-data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 20
|
|
|
|
volumes:
|
|
postgres-data:
|
|
redis-data:
|