mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-20 23:06:41 +02:00
- Migrate image generation from Supabase Edge Functions to NestJS - Add profiles and image-likes schemas - Refactor mobile auth context for backend API - Update all mobile hooks and services for API integration - Add Docker configuration for deployment - Remove Supabase functions and migrations - Add migration plan documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
72 lines
1.9 KiB
YAML
72 lines
1.9 KiB
YAML
services:
|
|
# PostgreSQL Database
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: picture-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: ${DB_USER:-picture}
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-picturepassword}
|
|
POSTGRES_DB: ${DB_NAME:-picture}
|
|
ports:
|
|
- "${DB_PORT:-5434}:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./init-db:/docker-entrypoint-initdb.d
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-picture} -d ${DB_NAME:-picture}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# Picture Backend API
|
|
backend:
|
|
build:
|
|
context: ../../../..
|
|
dockerfile: apps/picture/apps/backend/Dockerfile
|
|
container_name: picture-backend
|
|
restart: unless-stopped
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
# Database
|
|
DATABASE_URL: postgresql://${DB_USER:-picture}:${DB_PASSWORD:-picturepassword}@postgres:5432/${DB_NAME:-picture}
|
|
DB_HOST: postgres
|
|
DB_PORT: 5432
|
|
DB_USER: ${DB_USER:-picture}
|
|
DB_PASSWORD: ${DB_PASSWORD:-picturepassword}
|
|
DB_NAME: ${DB_NAME:-picture}
|
|
|
|
# Replicate API
|
|
REPLICATE_API_TOKEN: ${REPLICATE_API_TOKEN}
|
|
|
|
# Supabase (for storage only)
|
|
SUPABASE_URL: ${SUPABASE_URL}
|
|
SUPABASE_SERVICE_ROLE_KEY: ${SUPABASE_SERVICE_ROLE_KEY}
|
|
|
|
# Mana Core Auth
|
|
MANA_CORE_AUTH_URL: ${MANA_CORE_AUTH_URL:-http://host.docker.internal:3001}
|
|
|
|
# Webhook for Replicate callbacks
|
|
WEBHOOK_BASE_URL: ${WEBHOOK_BASE_URL}
|
|
|
|
# Server
|
|
PORT: 3003
|
|
NODE_ENV: production
|
|
ports:
|
|
- "${BACKEND_PORT:-3003}:3003"
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3003/api/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
start_period: 30s
|
|
retries: 3
|
|
|
|
volumes:
|
|
postgres_data:
|
|
driver: local
|
|
|
|
networks:
|
|
default:
|
|
name: picture-network
|