File size: 1,131 Bytes
3bce488 af2cd84 3bce488 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
services:
api:
build:
context: .
dockerfile: docker/Dockerfile
ports:
- "8000:8000"
volumes:
- ./models:/app/models
- ./reports:/app/reports
- ./data:/app/data
env_file:
- .env
restart: always
depends_on:
- prefect-server
prefect-server:
image: prefecthq/prefect:2-python3.9
entrypoint: [ "prefect", "server", "start", "--host", "0.0.0.0" ]
ports:
- "4200:4200"
environment:
- PREFECT_UI_URL=http://127.0.0.1:4200/api
- PREFECT_API_URL=http://127.0.0.1:4200/api
- PREFECT_API_DATABASE_CONNECTION_URL=postgresql+asyncpg://prefect:prefect@postgres:5432/prefect
depends_on:
- postgres
volumes:
- prefect_data:/root/.prefect
postgres:
image: postgres:15
environment:
- POSTGRES_USER=prefect
- POSTGRES_PASSWORD=prefect
- POSTGRES_DB=prefect
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U prefect" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
prefect_data:
postgres_data:
|