-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
86 lines (81 loc) · 2.55 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
version: "3"
services:
localstack:
image: localstack/localstack:3.1
container_name: "localstack"
ports:
- "127.0.0.1:4566:4566"
- "127.0.0.1:4510-4559:4510-4559"
environment:
DEBUG: ${DEBUG:-0}
AWS_DEFAULT_REGION: eu-west-2
SERVICES: sqs, s3
postgres:
image: postgres:10-alpine
environment:
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow
local-runner:
image: amazon/mwaa-local:2_8
user: 1000:1000
restart: always
depends_on:
- postgres
environment:
- LOAD_EX=n
- EXECUTOR=Local
- AIRFLOW_CONN_AWS_DEFAULT=aws://a:a@?host=http://localstack:4566®ion_name=eu-west-2
- AWS_ACCESS_KEY_ID=dummyaccess
- AWS_SECRET_ACCESS_KEY=dummysecret
- AWS_DEFAULT_REGION=eu-west-2
- AWS_PROFILE=default
- DEFAULT_PASSWORD=test
- S3_DAGS_PATH=""
- S3_PLUGINS_PATH=""
- S3_REQUIREMENTS_PATH=""
- GITHUB_ORG_ID=""
- OAUTH_APP_ID=""
- OAUTH_APP_SECRET=""
volumes:
- "${PWD}/dags:/usr/local/airflow/dags"
- "${PWD}/plugins:/usr/local/airflow/plugins"
- type: bind
source: "${PWD}/dags/webserver_config.py"
target: "/usr/local/airflow/webserver_config.py"
- type: bind
source: "${PWD}/dags/security_manager.py"
target: "/usr/local/airflow/security_manager.py"
- type: bind
source: "${PWD}/requirements.txt"
target: "/usr/local/airflow/requirements/requirements.txt"
ports:
- "8080:8080"
command: local-runner
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
interval: 30s
timeout: 30s
retries: 3
aws-cli:
image: mesosphere/aws-cli
container_name: "aws-cli"
volumes:
- ./landing:/tmp/landing:ro
environment:
- AWS_ACCESS_KEY_ID=dummyaccess
- AWS_SECRET_ACCESS_KEY=dummysecret
- AWS_DEFAULT_REGION=eu-west-2
entrypoint: /bin/sh -c
command: >
"
echo Waiting for localstack service start...;
echo add code in here to add setup to localstack;
while ! nc -z localstack 4566;
do
sleep 1;
done;
echo Connected!;
"
depends_on:
- localstack