French-Coach / docker-compose.yml
Asma-F's picture
Deploy: French Coach app (MiniCPM4.1-8B ZeroGPU + React frontend)
4fd1234 verified
Raw
History Blame Contribute Delete
1.28 kB
services:
db:
image: postgres:16
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: frenchcoach
volumes:
- pgdata:/var/lib/postgresql/data
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
app:
build: .
ports:
- "7860:7860"
env_file: .env
environment:
# Override DATABASE_URL so the app uses the 'db' service name inside Docker
DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD}@db:5432/frenchcoach
depends_on:
db:
condition: service_healthy
# Custom-UI app (UI_UPGRADE_PLAN.md). This is the Space entrypoint
# (app_file: app_custom.py in README.md); locally it runs alongside the
# themed-Blocks `app` service, so it's pinned off the default 7860 port.
app-custom:
build: .
command: python app_custom.py
ports:
- "7861:7861"
env_file: .env
environment:
DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD}@db:5432/frenchcoach
CUSTOM_UI_PORT: "7861"
depends_on:
db:
condition: service_healthy
volumes:
pgdata: