honcho/docker-compose.yml.example

48 lines
1.0 KiB
Plaintext

version: "3.8"
services:
api:
image: honcho:latest
build:
context: .
dockerfile: Dockerfile
depends_on:
database:
condition: service_healthy
ports:
- 8000:8000
volumes:
- .:/app
env_file:
- .env
deriver:
build:
context: .
dockerfile: Dockerfile
entrypoint: ["python", "-m", "src.deriver"]
depends_on:
database:
condition: service_healthy
volumes:
- .:/app
env_file:
- .env
database:
image: ankane/pgvector
restart: always
ports:
- 5432:5432
environment:
- POSTGRES_DB=honcho
- POSTGRES_USER=testuser
- POSTGRES_PASSWORD=testpwd
- POSTGRES_HOST_AUTH_METHOD=trust
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
- ./data:/var/lib/postgresql/data/
healthcheck:
test: ["CMD-SHELL", "pg_isready -U testuser -d honcho"]
interval: 5s
timeout: 5s
retries: 5