for deploy
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
services:
|
||||
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: trumpsignal
|
||||
POSTGRES_USER: trumpsignal
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U trumpsignal"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
api:
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
DATABASE_URL: postgresql+asyncpg://trumpsignal:${POSTGRES_PASSWORD}@db:5432/trumpsignal
|
||||
FRONTEND_URL: ${FRONTEND_URL}
|
||||
ENCRYPTION_KEY: ${ENCRYPTION_KEY}
|
||||
AI_API_KEY: ${AI_API_KEY}
|
||||
AI_BASE_URL: ${AI_BASE_URL:-https://api.gptsapi.net/v1}
|
||||
AI_MODEL: ${AI_MODEL:-claude-sonnet-4-6}
|
||||
HL_MAINNET: ${HL_MAINNET:-true}
|
||||
ENVIRONMENT: ${ENVIRONMENT:-production}
|
||||
volumes:
|
||||
# Persist SQLite only if you're still using it (dev fallback).
|
||||
# In production with Postgres this volume isn't needed.
|
||||
- api_data:/app/data
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
api_data:
|
||||
Reference in New Issue
Block a user