-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
90 lines (85 loc) · 2.76 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
81
82
83
84
85
86
87
88
89
90
services:
zpodapi:
container_name: ${COMPOSE_PROJECT_NAME}-zpodapi
build:
context: .
dockerfile: ./zpodapi/dockerfile
target: dev
depends_on:
- zpodpostgres
env_file:
- .env
environment:
- COLUMNS
- HISTFILE=/commandhistory/.zpodapi_bash_history
- PYDEVD_DISABLE_FILE_VALIDATION=1
init: true
ports:
- ${ZPODAPI_HOSTPORT:-127.0.0.1:8000}:8000
- ${ZPODAPI_DEBUG_HOSTPORT:-127.0.0.1:5678}:5678
restart: always
tty: true
# user: "${UID}:${GID}"
volumes:
- ./zpodapi/scripts:/zpodcore/scripts:cached
- ./zpodapi/tests:/zpodcore/tests:cached
- ./zpodapi/src/zpodapi:/zpodcore/src/zpodapi:cached
- ./zpodcommon/src/zpodcommon:/zpodcore/src/zpodcommon:cached
- ${ZPODCORE_LIBRARY_PATH}:/library
- ${ZPODCORE_PRODUCTS_PATH}:/products
- ./logs:/zpodcore/logs:cached
- zpod_vol_history:/commandhistory
zpodpostgres:
container_name: ${COMPOSE_PROJECT_NAME}-zpodpostgres
environment:
- POSTGRES_PASSWORD=${ZPODCORE_POSTGRES_PASSWORD}
build:
context: .
dockerfile: ./zpodpostgres/dockerfile
command: [ "postgres", "--log_checkpoints=0" ]
ports:
- ${ZPODAPI_POSTGRES_HOSTPORT:-127.0.0.1:5432}:5432
restart: always
volumes:
- zpod_vol_postgres:/var/lib/postgresql/data
# Prefect Server API
zpodengineserver:
container_name: ${COMPOSE_PROJECT_NAME}-zpodengineserver
image: prefecthq/prefect:2.19.2-python3.12
depends_on:
- zpodpostgres
entrypoint: [ "prefect", "server", "start" ]
environment:
# Keeping those variables for potential future tuning
- PREFECT_API_DATABASE_TIMEOUT=30
- PREFECT_API_DATABASE_CONNECTION_TIMEOUT=15
- PREFECT_API_DATABASE_CONNECTION_URL=postgresql+asyncpg://postgres:${ZPODCORE_POSTGRES_PASSWORD}@zpodpostgres/prefect
- PREFECT_API_URL=http://${ZPODENGINE_HOSTPORT:-127.0.0.1:4200}/api
- PREFECT_SERVER_API_HOST=0.0.0.0
- TELEMETRY_ENABLED=false
ports:
- ${ZPODENGINE_HOSTPORT:-127.0.0.1:4200}:4200
restart: always
volumes:
- zpod_vol_prefect:/root/.prefect
# Prefect Worker
zpodengineworker:
container_name: ${COMPOSE_PROJECT_NAME}-zpodengineworker
build:
context: .
dockerfile: ./zpodengine/dockerfile-worker
depends_on:
- zpodpostgres
- zpodengineserver
entrypoint: /zpodcore/bootstrap/start_worker.sh
environment:
- PREFECT_API_URL=http://zpodengineserver:4200/api
- PREFECT_TASK_INTROSPECTION_WARN_THRESHOLD=0
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./zpodengine/bootstrap:/zpodcore/bootstrap:cached
volumes:
zpod_vol_history: null
zpod_vol_postgres: null
zpod_vol_prefect: null