-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathdocker-compose.yaml
136 lines (127 loc) · 4.03 KB
/
docker-compose.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
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
# Start the Objectiv Pipeline.
#
# By default uses images from eu.gcr.io/objectiv-production
# To use locally built images set the OBJECTIV_CONTAINER_URL variable to just "objectiv"
# To use a specific image version instead of latest set OBJECTIV_CONTAINER_TAG
# WARNING: The postgres configuration here doesn't actually check passwords! This is for local testing only
x-db_env_variables: &db_env_variables
# warning: never put production credentials in here!
POSTGRES_USER: 'objectiv'
POSTGRES_PASSWORD: 'no_password_set'
POSTGRES_DB: 'objectiv'
POSTGRES_HOSTNAME: 'objectiv_postgres'
POSTGRES_PORT: 5432
version: "3.4"
services:
objectiv_website:
container_name: objectiv_website
image: ${OBJECTIV_CONTAINER_URL-objectiv}/website:${OBJECTIV_CONTAINER_TAG-latest}
depends_on:
- objectiv_collector
ports:
- "127.0.0.1:8080:80"
networks:
- obj
healthcheck:
test: [ "CMD", "printf", "\"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/80" ]
interval: 30s
timeout: 2s
retries: 3
objectiv_collector:
container_name: objectiv_collector
depends_on:
- objectiv_postgres
# default image: eu.gcr.io/objectiv-production/backend:latest
image: ${OBJECTIV_CONTAINER_URL-objectiv}/backend:${OBJECTIV_CONTAINER_TAG-latest}
working_dir: /services
entrypoint: bash -c "objectiv-db-init; ./entry_point.sh"
ports:
- "127.0.0.1:8081:8081"
networks:
- obj
restart: unless-stopped
volumes:
- ${SCHEMA_EXTENSION_DIRECTORY-./backend/tests/test_data/schemas1}/:/schema-extensions/
environment:
<<: *db_env_variables
SCHEMA_EXTENSION_DIRECTORY: /schema-extensions/
PORT: 8081
healthcheck:
test: ["CMD", "printf", "\"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/8081"]
interval: 30s
timeout: 2s
retries: 3
objectiv_postgres:
container_name: objectiv_postgres
image: postgres:latest
networks:
- obj
restart: unless-stopped
ports:
- "127.0.0.1:5432:5432"
environment:
<<: *db_env_variables
# WARNING: Disabling authentication here
POSTGRES_HOST_AUTH_METHOD: 'trust'
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U objectiv" ]
interval: 10s
timeout: 2s
retries: 5
objectiv_notebook:
container_name: objectiv_notebook
# default image: eu.gcr.io/objectiv-production/notebook:latest
image: ${OBJECTIV_CONTAINER_URL-objectiv}/notebook:${OBJECTIV_CONTAINER_TAG-latest}
ports:
- "127.0.0.1:8888:8888"
- "127.0.0.1:8053:8053"
networks:
- obj
restart: unless-stopped
depends_on:
# we make it depend on the other instances
# so we have the best chance of the db being up in time
- objectiv_postgres
- objectiv_collector
environment:
<<: *db_env_variables
METABASE_URL: "http://objectiv_metabase:3000"
METABASE_WEB_URL: "http://localhost:3000"
METABASE_USERNAME: "[email protected]"
METABASE_PASSWORD: "metabase1"
METABASE_DASHBOARD_ID: 1 # 1-model-hub
METABASE_DATABASE_ID: 2 # objectiv database
METABASE_COLLECTION_ID: 2 # 2-objectiv
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8888" ]
interval: 30s
timeout: 2s
retries: 3
objectiv_metabase:
container_name: objectiv_metabase
image: ${OBJECTIV_CONTAINER_URL-objectiv}/metabase:${OBJECTIV_CONTAINER_TAG-latest}
ports:
- "127.0.0.1:3000:3000"
networks:
- obj
restart: unless-stopped
depends_on:
# depend on notebook, as that will init the db
- objectiv_postgres
- objectiv_notebook
environment:
MB_DB_TYPE: postgres
MB_DB_DBNAME: metabase
MB_DB_PORT: 5432
MB_DB_USER: metabase
MB_DB_PASS: metabase
MB_DB_HOST: objectiv_postgres
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:3000" ]
interval: 30s
timeout: 2s
retries: 3
# use bridged networking, so we can access services provided from the host
networks:
obj:
driver: bridge