-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
80 lines (74 loc) · 1.91 KB
/
docker-compose.yml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
version: "3.9"
services:
### Prefect Database
database:
image: postgres:15.1-alpine
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=orion
expose:
- 5432
volumes:
- db:/var/lib/postgresql/data
profiles: ["orion"]
### MinIO for flow storage
minio:
image: minio/minio:latest
entrypoint: ["minio", "server", "--address", "0.0.0.0:9000", "--console-address", "0.0.0.0:9001", "/data"]
volumes:
- "minio:/data"
ports:
- 9000:9000
- 9001:9001
profiles: ["minio"]
### Prefect Orion API
orion:
image: prefecthq/prefect:2.7.6-python3.11
restart: always
volumes:
- prefect:/root/.prefect
entrypoint: ["prefect", "orion", "start"]
environment:
- PREFECT_ORION_API_HOST=0.0.0.0
- PREFECT_ORION_DATABASE_CONNECTION_URL=postgresql+asyncpg://postgres:postgres@database:5432/orion
ports:
- 4200:4200
depends_on:
- database
profiles: ["orion"]
## Prefect Agent
agent:
build:
context: .
dockerfile: ./config/agent/Dockerfile
restart: always
entrypoint: ["prefect", "agent", "start", "-q", "default"]
environment:
- PREFECT_API_URL=http://orion:4200/api
# Use PREFECT_API_KEY if connecting the agent to Prefect Cloud
# - PREFECT_API_KEY=YOUR_API_KEY
profiles: ["agent"]
### Prefect CLI
cli:
build:
context: .
dockerfile: ./config/runner/Dockerfile
entrypoint: "bash"
working_dir: "/root/flows"
volumes:
- "./dataflows/flows:/root/flows"
- "./requirements.txt:/root/requirements.txt"
environment:
- PREFECT_API_URL=http://orion:4200/api
# Use PREFECT_API_KEY to use the CLI to interact with Prefect Cloud
# - PREFECT_API_KEY=YOUR_API_KEY
profiles: ["cli"]
volumes:
prefect:
db:
minio:
networks:
default:
name: prefect-network