-
Notifications
You must be signed in to change notification settings - Fork 1
/
airflow.yaml
108 lines (99 loc) · 2.85 KB
/
airflow.yaml
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
version: '3.4'
x-common: &common
image: apache/airflow:2.3.4
user: "${AIRFLOW_UID:-50000}:0" #user: "${AIRFLOW_UID}:0"
env_file:
- .env
volumes:
- ./dags:/opt/airflow/dags
- ./logs:/opt/airflow/logs
- ./plugins:/opt/airflow/plugins
- ./data:/opt/airflow/data
- ./models:/opt/airflow/models
- /var/run/docker.sock:/var/run/docker.sock
x-depends-on: &depends-on
depends_on:
postgres:
condition: service_healthy
airflow-init:
condition: service_completed_successfully
services:
postgres:
image: postgres:13
container_name: postgres-m3
ports:
- "5434:5432"
healthcheck:
test: ["CMD", "pg_isready", "-U", "milestone_3"]
interval: 5s
retries: 5
volumes :
#- ./irfan_ddl.sql:/docker-entrypoint-initdb.d/init.sql #sesuai dengan file csv di file irfan_ddl.sql
- ./P2M3_reynaldi_evans_adam_data_raw.csv:/dags/P2M3_reynaldi_evans_adam_data_raw.csv #sesuai dengan file csv di file irfan_ddl.sql
env_file:
- .env
scheduler:
<<: [*common, *depends-on]
# <<: *depends-on
container_name: airflow-scheduler-m3
command: scheduler
restart: on-failure
ports:
- "8793:8793"
webserver:
<<: [*common, *depends-on]
# <<: *depends-on
container_name: airflow-webserver-m3
restart: always
command: webserver
ports:
- "8080:8080"
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8080/health"]
interval: 30s
timeout: 30s
retries: 5
airflow-init:
<<: *common
container_name: airflow-init-m3
entrypoint: /bin/bash
command:
- -c
- |
mkdir -p /sources/logs /sources/dags /sources/plugins
chown -R "${AIRFLOW_UID}:0" /sources/{logs,dags,plugins}
exec /entrypoint airflow version
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.11.1
container_name: elasticsearch-m3
restart: always
environment:
- xpack.security.enabled=false
- discovery.type=single-node
- xpack.reporting.capture.browser.chromium.disableSandbox=False
- xpack.reporting.enabled:False
ulimits:
memlock:
soft: 50000 #-1 Gunakan semua memori atau 262144 = 256mb
hard: 50000 #-1
nofile:
soft: 65536 #atur memori 65536
hard: 65536 ##atur memori 65536
cap_add:
- IPC_LOCK
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
ports:
- 9200:9200
kibana:
container_name: kibana-m3
image: docker.elastic.co/kibana/kibana:8.11.1
restart: always
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200 # address of elasticsearch docker container which kibana will connect
ports:
- 5601:5601
depends_on:
- elasticsearch # kibana will start when elasticsearch has started
volumes:
elasticsearch-data: