forked from mergestat/mergestat
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
141 lines (135 loc) · 4.66 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
136
137
138
139
140
141
version: "3.6"
volumes:
db_data:
# grafana_lib:
# grafana_etc:
# grafana_log:
services:
postgres:
image: postgres:14
restart: always
ports:
- 5432:5432
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
worker:
# NOTE: to opt out of basic image pull tracking, comment out the current image
# and uncomment the next line (which will pull from Docker Hub directly).
# image: mergestat/worker:2.2.1-beta
image: devinfraio/devzero-mergestat:sha-33abba2
privileged: true
stop_grace_period: 10m
restart: always
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/metrics"]
interval: 5s
timeout: 5s
retries: 5
environment:
POSTGRES_CONNECTION: postgres://postgres:${POSTGRES_PASSWORD:-password}@postgres:5432/postgres?sslmode=disable
CONCURRENCY: 5
GITHUB_RATE_LIMIT: 1/2
ENCRYPTION_SECRET: ${ENCRYPTION_SECRET:-password}
LOG_LEVEL: debug
DEBUG: 1
PRETTY_LOGS: 1
GITHUB_WORKFLOW_PER_PAGE: 30
GITHUB_WORKFLOW_RUNS_PER_PAGE: 30
GITHUB_WORKFLOW_JOBS_PER_PAGE: 30
ports:
- 3301:8080
# NOTE: Uncomment the following to mount a path on disk to the container to access local git repos.
# When adding a the repo in the UI, use file:///projects/<repo-name> to access the repo.
# volumes:
# - ~/projects:/projects
graphql:
# See NOTE above in worker service.
# image: mergestat/graphql:2.2.1-beta
image: images.mergestat.com/mergestat/graphql:2.2.1-beta
restart: always
depends_on:
postgres:
condition: service_healthy
worker:
# this is to ensure all migrations are run before the API starts up
condition: service_healthy
ports:
- 5433:5433
command:
- "--connection"
- "postgres://postgres:${POSTGRES_PASSWORD:-password}@postgres:5432/postgres?sslmode=disable"
- "--port"
- "5433"
- "--schema"
- "mergestat,sqlq,public"
- "--append-plugins"
- "@graphile-contrib/pg-simplify-inflector,postgraphile-plugin-connection-filter,/graphql/container-sync-jobs/index.js,/graphql/exec-sql/index.js,/graphql/service-credentials/index.js"
- "-o"
- "--subscriptions"
- "--retry-on-init-fail"
- "--dynamic-json"
- "--no-setof-functions-contain-nulls"
- "--no-ignore-rbac"
- "--extended-errors=errcode"
- "--disable-graphiql"
- "--enable-query-batching"
- "--disable-query-log"
- "--legacy-relations=omit"
- "--jwt-secret=${JWT_SECRET:-secret}"
- "--default-role=mergestat_anonymous"
environment:
ENCRYPTION_SECRET: ${ENCRYPTION_SECRET:-password}
DISPLAY_PG_HOSTNAME: localhost
DISPLAY_PG_PORT: 5432
DISPLAY_PG_DATABASE: postgres
DISPLAY_PG_USER: postgres
ui:
# See NOTE above in worker service.
# image: mergestat/console:2.2.1-beta
image: images.mergestat.com/mergestat/console:2.2.1-beta
restart: always
depends_on:
- graphql
ports:
- 3300:3000
environment:
POSTGRAPHILE_API: http://graphql:5433/graphql
POSTGRES_CONNECTION: postgres://postgres:${POSTGRES_PASSWORD:-password}@postgres:5432/postgres?sslmode=disable
JWT_SECRET: ${JWT_SECRET:-secret} # should match - "--jwt-secret=secret" flag in graphql service
INSECURE_SESSION_COOKIE: 1
labels:
shipyard.route: '/'
# grafana:
# image: grafana/grafana-oss:latest
# user: root
# environment:
# PGHOST: postgres
# PGUSER: postgres
# PGPASSWORD: ${POSTGRES_PASSWORD:-password}
# PGDATABASE: postgres
# ports:
# - 3000:3000
# depends_on:
# - postgres
# restart: always
# volumes:
# - grafana_lib:/var/lib/grafana
# - grafana_etc:/etc/grafana
# - grafana_log:/var/log/grafana
# - ./scripts/grafana/grafana.ini:/etc/grafana/grafana.ini
# - ./scripts/grafana/provisioning:/etc/grafana/provisioning
# - ./examples:/var/lib/examples
# - /var/lib/grafana/dashboards/
# entrypoint: [ "bash" ]
# command: > # This is to set the datasource id in the examples to the datasource created for local grafana
# -cx 'cp -r /var/lib/examples/* /var/lib/grafana/dashboards/ && find /var/lib/grafana/dashboards/ -name ''*.json'' | xargs grep -rnl "$${DS_POSTGRES}" | xargs -i@ sed -i "s/\$${DS_POSTGRES}/SXQZgpP7z/g" @ && exec grafana-server --config="/etc/grafana/grafana.ini"'