Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
147 lines (139 loc) · 3.6 KB
/
Copy pathdocker-compose.yml
File metadata and controls
147 lines (139 loc) · 3.6 KB
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: procurescope
services:
postgres:
image: postgres:16.4-alpine
restart: unless-stopped
env_file:
- .env
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
- ./scripts/init-db.sql:/docker-entrypoint-initdb.d/01-init-db.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U procurescope -d procurescope"]
interval: 10s
timeout: 5s
retries: 10
minio:
image: minio/minio:RELEASE.2024-12-18T13-15-44Z
command: server /data --console-address ":9001"
restart: unless-stopped
env_file:
- .env
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio-data:/data
airflow-init:
build:
context: .
dockerfile: Dockerfile
env_file:
- .env
environment:
AIRFLOW__CORE__EXECUTOR: LocalExecutor
AIRFLOW__CORE__LOAD_EXAMPLES: "false"
AIRFLOW__WEBSERVER__EXPOSE_CONFIG: "false"
S3_ENDPOINT_URL: http://minio:9000
command: >
bash -c "airflow db migrate &&
(airflow users list --output table | grep -q \"$AIRFLOW_ADMIN_USERNAME\" ||
airflow users create --username \"$AIRFLOW_ADMIN_USERNAME\"
--password \"$AIRFLOW_ADMIN_PASSWORD\" --firstname Procure
--lastname Scope --role Admin --email admin@example.local)"
depends_on:
postgres:
condition: service_healthy
minio:
condition: service_started
airflow-webserver:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
env_file:
- .env
environment:
AIRFLOW__CORE__EXECUTOR: LocalExecutor
AIRFLOW__CORE__LOAD_EXAMPLES: "false"
AIRFLOW__WEBSERVER__EXPOSE_CONFIG: "false"
S3_ENDPOINT_URL: http://minio:9000
command: webserver
ports:
- "8080:8080"
depends_on:
airflow-init:
condition: service_completed_successfully
volumes:
- airflow-logs:/opt/airflow/logs
airflow-scheduler:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
env_file:
- .env
environment:
AIRFLOW__CORE__EXECUTOR: LocalExecutor
AIRFLOW__CORE__LOAD_EXAMPLES: "false"
S3_ENDPOINT_URL: http://minio:9000
command: scheduler
depends_on:
airflow-init:
condition: service_completed_successfully
volumes:
- airflow-logs:/opt/airflow/logs
metabase:
image: metabase/metabase:v0.53.6
restart: unless-stopped
environment:
MB_DB_TYPE: postgres
MB_DB_DBNAME: metabase
MB_DB_PORT: "5432"
MB_DB_USER: procurescope
MB_DB_PASS: ${POSTGRES_PASSWORD}
MB_DB_HOST: postgres
ports:
- "3000:3000"
depends_on:
postgres:
condition: service_healthy
ingest:
build:
context: .
dockerfile: Dockerfile
profiles: ["manual"]
env_file:
- .env
environment:
S3_ENDPOINT_URL: http://minio:9000
command: ["python", "-m", "procurescope.cli", "ingest"]
depends_on:
postgres:
condition: service_healthy
minio:
condition: service_started
dbt:
build:
context: .
dockerfile: Dockerfile
profiles: ["manual"]
env_file:
- .env
environment:
DBT_HOST: postgres
DBT_USER: procurescope
DBT_PASSWORD: ${POSTGRES_PASSWORD}
DBT_DATABASE: procurescope
DBT_SCHEMA: analytics
DBT_PORT: "5432"
command: ["dbt", "build", "--project-dir", "/opt/airflow/app/dbt", "--profiles-dir", "/opt/airflow/app/dbt"]
depends_on:
postgres:
condition: service_healthy
volumes:
postgres-data:
minio-data:
airflow-logs: