mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 22:01:09 +02:00
🚀 ci(picture): add picture app to CI/CD deployment pipeline
- Add picture-backend and picture-web to CI Docker build matrix - Add picture services to staging deployment workflow - Add picture-backend to production deployment workflow - Create Dockerfile and docker-entrypoint.sh for picture-web - Fix picture-backend Dockerfile port (3003→3006) and health endpoint - Add picture routes to Caddyfile.staging - Add REPLICATE_API_TOKEN and MANA_CORE_SERVICE_KEY env vars
This commit is contained in:
parent
74654e652a
commit
dcdc15f154
8 changed files with 285 additions and 2 deletions
|
|
@ -1,5 +1,10 @@
|
|||
version: '3.9'
|
||||
|
||||
# To add more services:
|
||||
# 1. Add service block below
|
||||
# 2. Add to cd-production.yml workflow_dispatch options
|
||||
# 3. Add Caddy routes to production Caddyfile
|
||||
|
||||
services:
|
||||
# ============================================
|
||||
# Backend Services (Production)
|
||||
|
|
@ -235,6 +240,53 @@ services:
|
|||
cpus: '0.5'
|
||||
memory: 256M
|
||||
|
||||
picture-backend:
|
||||
image: ${DOCKER_REGISTRY:-ghcr.io/memo-2023}/picture-backend:${PICTURE_VERSION:-latest}
|
||||
container_name: picture-backend-prod
|
||||
restart: always
|
||||
depends_on:
|
||||
mana-core-auth:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
PORT: 3006
|
||||
DATABASE_URL: ${PICTURE_DATABASE_URL}
|
||||
MANA_CORE_AUTH_URL: http://mana-core-auth:3001
|
||||
# Replicate API for AI image generation
|
||||
REPLICATE_API_TOKEN: ${REPLICATE_API_TOKEN}
|
||||
# S3/MinIO storage
|
||||
S3_ENDPOINT: ${S3_ENDPOINT}
|
||||
S3_REGION: ${S3_REGION}
|
||||
S3_ACCESS_KEY: ${S3_ACCESS_KEY}
|
||||
S3_SECRET_KEY: ${S3_SECRET_KEY}
|
||||
MANACORE_STORAGE_PUBLIC_URL: ${MANACORE_STORAGE_PUBLIC_URL}
|
||||
# Credit system
|
||||
MANA_CORE_SERVICE_KEY: ${MANA_CORE_SERVICE_KEY}
|
||||
APP_ID: picture
|
||||
ports:
|
||||
- "127.0.0.1:3007:3006"
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3006/api/v1/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
networks:
|
||||
- manacore-prod
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
max-file: "5"
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2'
|
||||
memory: 1G
|
||||
reservations:
|
||||
cpus: '1'
|
||||
memory: 512M
|
||||
|
||||
# ============================================
|
||||
# Monitoring (Optional but recommended)
|
||||
# ============================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue