Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
87 lines (79 loc) · 2.14 KB
/
Copy pathdocker-compose.yml
File metadata and controls
87 lines (79 loc) · 2.14 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
version: '3.8'
x-airflow-common: &airflow-common
build: .
env_file:
- .env
environment: &airflow-common-env
AIRFLOW__CORE__EXECUTOR: LocalExecutor
AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@postgres/airflow
AIRFLOW__CORE__FERNET_KEY: ''
AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION: 'true'
AIRFLOW__CORE__LOAD_EXAMPLES: 'false'
NEO4J_URI: bolt://neo4j:7687
NEO4J_USER: neo4j
NEO4J_PASSWORD: ${NEO4J_PASSWORD}
volumes:
- ./dags:/opt/airflow/dags
- ./data:/opt/airflow/data
- ./logs:/opt/airflow/logs
depends_on:
postgres:
condition: service_healthy
neo4j:
condition: service_started
services:
postgres:
image: postgres:13
environment:
POSTGRES_USER: airflow
POSTGRES_PASSWORD: airflow
POSTGRES_DB: airflow
ports:
- "5432:5432"
healthcheck:
test: ["CMD", "pg_isready", "-U", "airflow"]
interval: 5s
retries: 5
volumes:
- postgres_data:/var/lib/postgresql/data
neo4j:
image: neo4j:2026.01.3
environment:
NEO4J_AUTH: ${NEO4J_USER:-neo4j}/${NEO4J_PASSWORD}
NEO4J_ACCEPT_LICENSE_AGREEMENT: "yes"
ports:
- "7474:7474" # HTTP Browser
- "7687:7687" # Bolt port
volumes:
- neo4j_data:/data
airflow-init:
<<: *airflow-common
command:
- bash
- -c
- >
airflow pools set pubmed_api_pool 2 "Rate-limit para API do PubMed/NCBI" &&
airflow pools set gemini_api_pool 4 "Limite de concorrencia para a API do Gemini (evita rajadas / DeadlineExceeded)"
environment:
<<: *airflow-common-env
_AIRFLOW_DB_UPGRADE: 'true'
_AIRFLOW_WWW_USER_CREATE: 'true'
_AIRFLOW_WWW_USER_USERNAME: admin
_AIRFLOW_WWW_USER_PASSWORD: admin
airflow-webserver:
<<: *airflow-common
command: webserver
ports:
- "8080:8080"
depends_on:
airflow-init:
condition: service_completed_successfully
airflow-scheduler:
<<: *airflow-common
command: scheduler
depends_on:
airflow-init:
condition: service_completed_successfully
volumes:
neo4j_data:
postgres_data: