forked from WordPress/openverse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
104 lines (98 loc) · 2.52 KB
/
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Common build configuration for Airflow
# Extension field, see https://docs.docker.com/compose/compose-file/compose-file-v3/#extension-fields
x-airflow-common: &airflow-common
profiles:
- catalog
restart: on-failure
depends_on:
- postgres
- s3
image: openverse-catalog
pull_policy: never
env_file:
- .env
build:
target: cat
args: # Automatically inferred from env vars, unless specified
- REQUIREMENTS_FILE=requirements-dev.txt
- CATALOG_PY_VERSION
- CATALOG_AIRFLOW_VERSION
volumes:
- .:/opt/airflow/catalog:z
- catalog-cache:/home/airflow/.cache
services:
# Dev changes for the scheduler
scheduler:
<<: *airflow-common
depends_on:
- upstream_db
- s3
command: scheduler
expose:
- "8793" # Used for fetching logs
environment:
# Upgrade the DB on startup
_AIRFLOW_DB_MIGRATE: "true"
_AIRFLOW_WWW_USER_CREATE: "true"
_AIRFLOW_WWW_USER_USERNAME: airflow
_AIRFLOW_WWW_USER_PASSWORD: airflow
_AIRFLOW_WWW_USER_FIRSTNAME: Air
_AIRFLOW_WWW_USER_LASTNAME: Flow
_AIRFLOW_WWW_USER_EMAIL: [email protected]
# Dev changes for the triggerer
triggerer:
<<: *airflow-common
depends_on:
- upstream_db
- s3
expose:
- "8794" # Used for logs
command: triggerer
# Dev changes for the webserver container
webserver:
<<: *airflow-common
depends_on:
- upstream_db
- s3
- scheduler
- triggerer
command: webserver
ports:
- "${AIRFLOW_PORT}:8080"
s3:
profiles:
- catalog_dependencies
- catalog
image: docker.io/minio/minio:latest
ports:
- "5010:5000"
- "5011:5001"
env_file:
- .env
- ../docker/minio/.env
command: minio server /data --address :5000 --console-address :5001
volumes:
- minio:/data
- ../docker/minio/s3_entrypoint.sh:/opt/minio/s3_entrypoint.sh:ro,z
entrypoint: /opt/minio/s3_entrypoint.sh
healthcheck:
test: "mc ready local"
load_to_s3:
profiles:
- catalog_dependencies
- catalog
image: docker.io/minio/mc:latest
env_file:
- .env
- ../docker/minio/.env
depends_on:
- s3
volumes:
# Buckets for testing provider data imported from s3 are subdirectories under
# /tests/s3-data/
- ./tests/s3-data:/data:rw,z
- ../docker/minio/load_to_s3_entrypoint.sh:/opt/minio/load_to_s3_entrypoint.sh:ro,z
entrypoint: /opt/minio/load_to_s3_entrypoint.sh
volumes:
catalog-cache:
minio: