Files
planet/docker-compose.deploy.yml
T
linkong 842cba4dc7
ci / backend (push) Has been cancelled
ci / frontend (push) Has been cancelled
release / images (push) Has been cancelled
release / client_release (push) Has been cancelled
ci / delivery (push) Has been cancelled
release: bump version to 0.77.0
2026-11-20 16:59:38 +08:00

112 lines
3.0 KiB
YAML

services:
postgres:
image: postgres:15
container_name: planet_deploy_postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-planet_db}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
redis:
image: redis:7-alpine
container_name: planet_deploy_redis
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
aiprovider:
image: ${AI_PROVIDER_IMAGE_NAME:-planet-aiprovider:latest}
build:
context: .
dockerfile: aiprovider/Dockerfile
args:
PYTHON_IMAGE: ${PYTHON_IMAGE:-python:3.14-slim}
UV_IMAGE: ${UV_IMAGE:-ghcr.io/astral-sh/uv:latest}
env_file:
- ./aiprovider/.env
container_name: planet_deploy_aiprovider
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:8010/health"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
backend:
image: ${BACKEND_IMAGE_NAME:-planet-backend:latest}
build:
context: .
dockerfile: backend/Dockerfile
args:
PYTHON_IMAGE: ${PYTHON_IMAGE:-python:3.14-slim}
UV_IMAGE: ${UV_IMAGE:-ghcr.io/astral-sh/uv:latest}
secrets:
- planet_uv_config
env_file:
- ./backend/.env
container_name: planet_deploy_backend
environment:
DATABASE_URL: ${DATABASE_URL:-postgresql+asyncpg://postgres:postgres@postgres:5432/planet_db}
REDIS_URL: ${REDIS_URL:-redis://redis:6379/0}
AI_PROVIDER_BASE_URL: ${AI_PROVIDER_BASE_URL:-http://aiprovider:8010}
ports:
- "${PLANET_BACKEND_PORT:-8000}:8000"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
aiprovider:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:8000/health"]
interval: 15s
timeout: 5s
retries: 5
restart: unless-stopped
admin:
image: ${ADMIN_IMAGE_NAME:-planet-admin:latest}
build:
context: ./frontend
dockerfile: Dockerfile
args:
BUN_IMAGE: ${BUN_IMAGE:-oven/bun:1-alpine}
NGINX_IMAGE: ${NGINX_IMAGE:-nginx:1.27-alpine}
PLANET_FRONTEND_TARGET: admin
container_name: planet_deploy_admin
environment:
PLANET_BACKEND_UPSTREAM: backend:8000
ports:
- "${PLANET_ADMIN_PORT:-3000}:3000"
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/health"]
interval: 15s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
postgres_data:
redis_data:
secrets:
planet_uv_config:
file: ${PLANET_UV_CONFIG_FILE:-/dev/null}