services: db: image: postgres container_name: postgres-db environment: POSTGRES_DB: ${DATABASE} POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} ports: - ${DB_PORT} volumes: - postgres_data:/var/lib/postgresql/data clickhouse: image: clickhouse/clickhouse-server:latest container_name: clickhouse-db environment: CLICKHOUSE_USER: ${CLICKHOUSE_USER} CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD} ports: - "8123:8123" - "9000:9000" volumes: - clickhouse_data:/var/lib/clickhouse fastapi: build: . container_name: fastapi-app ports: - "8000:8000" depends_on: - db - clickhouse volumes: - .:/app volumes: postgres_data: clickhouse_data: