42 lines
946 B
YAML
42 lines
946 B
YAML
version: '3.8'
|
||
|
||
services:
|
||
db:
|
||
image: postgres
|
||
container_name: postgres-db
|
||
environment:
|
||
POSTGRES_DB: ${DATABASE}
|
||
POSTGRES_USER: ${POSTGRES_USER}
|
||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||
ports:
|
||
- "5432:5432"
|
||
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:
|