forked from Zenysis/Harmony
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
119 lines (119 loc) · 3.37 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
name: harmony-dev
services:
postgres:
image: postgres:13.7-alpine
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: zenysis
POSTGRES_DB: postgres
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- "5432:5432"
volumes:
- pgdata-volume:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres -d postgres" ]
start_period: 0s
interval: 10s
timeout: 30s
retries: 3
redis:
image: redis
ports:
- 6379:6379
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 10s
timeout: 30s
start_period: 0s
retries: 3
volumes:
- redis-volume:/data
hasura:
image: hasura/graphql-engine:v2.11.3.cli-migrations-v2
ports:
- 8088:8080
environment:
HASURA_GRAPHQL_ENABLE_TELEMETRY: "false"
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
HASURA_GRAPHQL_MIGRATIONS_SERVER_TIMEOUT: 500
HASURA_GRAPHQL_DATABASE_URL: postgresql://postgres:zenysis@postgres:5432/${ZEN_ENV}-local
healthcheck:
test: "timeout 10s bash -c ':> /dev/tcp/127.0.0.1/8080'"
interval: 30s
timeout: 30s
start_period: 0s
retries: 3
depends_on:
postgres:
condition: service_healthy
volumes:
- ./graphql/hasura/metadata/versions/latest:/hasura-metadata
web:
image: harmony-dev-web:latest
build:
dockerfile: Dockerfile_dev
volumes:
# Map source code to host so that we can edit files and see changes immediately.
- .:/app
# Don't map venv and node modules to host. We need to use the container version.
- web_venv:/app/venv
- web_venv_pypy3:/app/venv_pypy3
- web_node_modules:/app/node_modules
environment:
- ZEN_HOME=/app
- PYTHONPATH=/app:/usr/bin
- DATABASE_URL=postgresql://postgres:zenysis@postgres:5432/${ZEN_ENV}-local
- ZEN_ENV=${ZEN_ENV}
- DRUID_HOST=${DRUID_HOST}
- HASURA_HOST=${HASURA_HOST-http://hasura:8080}
- FLASK_APP=web.server.app_base
- FLASK_ENV=development
ports:
- "5000:5000"
depends_on:
postgres:
condition: service_healthy
pipeline:
image: harmony-dev-web:latest
profiles:
- pipeline
build:
dockerfile: Dockerfile_dev
volumes:
# Map source code to host so that we can edit files and see changes immediately.
- .:/app
# Don't map venv and node modules to host. We need to use the container version.
- web_venv:/app/venv
- web_venv_pypy3:/app/venv_pypy3
- web_node_modules:/app/node_modules
- druid_shared:/home/share
environment:
- DATABASE_URL=postgresql://postgres:zenysis@postgres:5432/${ZEN_ENV}-local
- ZEN_ENV=${ZEN_ENV}
- DRUID_HOST=${DRUID_HOST}
- COMMAND=${COMMAND-echo Specify a pipeline command, e.g. "./pipeline/br/generate/zeus_generate run"}
- PYTHONPATH=/app
depends_on:
postgres:
condition: service_healthy
user: ${PIPELINE_USER:-1000}:${PIPELINE_GROUP:-1000}
command:
[
"/bin/bash",
"-c",
"./docker/dev/scripts/start_pipeline.sh"
]
volumes:
pgdata-volume:
redis-volume:
web_venv:
web_venv_pypy3:
web_node_modules:
druid_shared:
driver: local
driver_opts:
type: none
o: bind
device: ${DRUID_SHARED_FOLDER:-/home/share}