managarten/apps/picture/apps/backend/docker-compose.yml
Till-JS c561c4c8d8 feat(picture): migrate from Supabase to NestJS backend API
- 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>
2025-11-27 14:47:23 +01:00

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