-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
152 lines (147 loc) · 3.92 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
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
148
149
150
151
152
version: '3.7'
x-superset-depends-on:
&superset-depends-on
- postgres
- redis
x-superset-volumes:
&superset-volumes
- ./superset/docker:/app/docker
- superset_home:/app/superset_home
x-superset-env-file:
&superset-env-file
- superset/.env-superset
- .env
x-superset-environment:
&superset-environment
REDIS_HOST: redis
REDIS_PORT: 6379
DATABASE_DIALECT: postgresql
DATABASE_USER: superset
DATABASE_PASSWORD: ${PAH_POSTGRES_PASSWORD:-password}
DATABASE_HOST: postgres
DATABASE_PORT: 5432
DATABASE_DB: superset
services:
redis:
image: redis:latest
container_name: pah_superset_cache
restart: unless-stopped
volumes:
- redis:/data
networks:
- pah_net
postgres:
build:
context: postgres
dockerfile: Dockerfile
restart: unless-stopped
environment:
POSTGRES_USER: ${PAH_POSTGRES_ADMIN_USER:-postgres}
POSTGRES_PASSWORD: ${PAH_POSTGRES_PASSWORD:-password}
PAH_POSTGRES_DB: ${PAH_POSTGRES_DB:-pah}
POSTGRES_MULTIPLE_DATABASES: superset,${PAH_POSTGRES_DB:-pah}
container_name: pah_db
ports:
- '${PAH_DATABASE_PORT:-5432}:5432'
volumes:
- db-data:/var/lib/postgresql/data
networks:
- pah_net
etl:
image: pah/etl:${PAH_PY_VER:-3.10}
restart: unless-stopped
init: true
volumes:
- ./etl:/app/
env_file:
- .env
environment:
PAH_DATABASE_HOST: postgres
PAH_DATABASE_PORT: 5432
PAH_DATABASE_URL: postgresql://${PAH_POSTGRES_DB:-pah}:${PAH_POSTGRES_PASSWORD:-password}@postgres:5432/${PAH_POSTGRES_DB:-pah}
container_name: pah_etl
networks:
- pah_net
depends_on:
- postgres
etl-init:
image: pah/etl-init:${PAH_PY_VER:-3.10}
volumes:
- ./etl:/app/
env_file:
- .env
environment:
PAH_DATABASE_HOST: postgres
PAH_DATABASE_PORT: 5432
PAH_DATABASE_URL: postgresql://${PAH_POSTGRES_DB:-pah}:${PAH_POSTGRES_PASSWORD:-password}@postgres:5432/${PAH_POSTGRES_DB:-pah}
container_name: pah_etl_init
command: [ "/app/scripts/docker-init.sh" ]
networks:
- pah_net
depends_on:
- postgres
superset:
image: pah/superset:${PAH_SUPERSET_VER:-2.0.0}
container_name: pah_superset_app
command: [ "/app/docker/docker-bootstrap.sh", "app-gunicorn" ]
restart: unless-stopped
env_file: *superset-env-file
environment: *superset-environment
ports:
- '${PAH_SUPERSET_PORT:-8088}:8088'
depends_on: *superset-depends-on
volumes: *superset-volumes
networks:
- pah_net
superset-worker:
image: pah/superset-worker:${PAH_SUPERSET_VER:-2.0.0}
container_name: pah_superset_worker
command: [ "/app/docker/docker-bootstrap.sh", "worker" ]
env_file: *superset-env-file
environment: *superset-environment
restart: unless-stopped
depends_on: *superset-depends-on
user: "root"
volumes: *superset-volumes
healthcheck:
test:
[
"CMD-SHELL",
"celery -A superset.tasks.celery_app:app inspect ping"
]
networks:
- pah_net
superset-worker-beat:
image: pah/superset:${PAH_SUPERSET_VER:-2.0.0}
container_name: pah_superset_worker_beat
command: [ "/app/docker/docker-bootstrap.sh", "beat" ]
env_file: *superset-env-file
environment: *superset-environment
restart: unless-stopped
depends_on: *superset-depends-on
user: "root"
volumes: *superset-volumes
healthcheck:
disable: true
networks:
- pah_net
superset-init:
image: pah/superset:${PAH_SUPERSET_VER:-2.0.0}
container_name: pah_superset_init
command: [ "/app/docker/docker-init.sh" ]
env_file: *superset-env-file
environment: *superset-environment
depends_on: *superset-depends-on
user: "root"
volumes: *superset-volumes
healthcheck:
disable: true
networks:
- pah_net
networks:
pah_net:
driver: bridge
volumes:
db-data:
superset_home:
redis: