forked from cube-js/cube
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (29 loc) · 1.78 KB
/
Copy pathDockerfile
File metadata and controls
36 lines (29 loc) · 1.78 KB
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
# Extend official Cube image — only override BlueFunda branding assets
FROM cubejs/cube:latest
# Replace Cube logo with BlueFunda logo in the pre-built playground
COPY packages/cubejs-playground/public/bluefunda-logo.svg \
/cube/node_modules/@cubejs-backend/server-core/playground/cube-core-logo-adapted_for_dark_bg.svg
# Replace favicons with BlueFunda favicon
COPY packages/cubejs-playground/public/favicon.ico \
/cube/node_modules/@cubejs-backend/server-core/playground/favicon.ico
COPY packages/cubejs-playground/public/favicon-16x16.png \
/cube/node_modules/@cubejs-backend/server-core/playground/favicon-16x16.png
COPY packages/cubejs-playground/public/favicon-32x32.png \
/cube/node_modules/@cubejs-backend/server-core/playground/favicon-32x32.png
# Replace browser tab title "Cube Playground" → "BlueFunda Analytics"
RUN sed -i 's/<title>Cube Playground<\/title>/<title>BlueFunda Analytics<\/title>/g' \
/cube/node_modules/@cubejs-backend/server-core/playground/index.html
# Inject SSO logout button next to the Slack icon in the Cube header
COPY sso-logout.js \
/cube/node_modules/@cubejs-backend/server-core/playground/sso-logout.js
RUN sed -i 's|</body>|<script src="./sso-logout.js"></script></body>|' \
/cube/node_modules/@cubejs-backend/server-core/playground/index.html
# Install jq and curl for Vault JSON parsing in the entrypoint script
RUN apt-get update -qq && apt-get install -y --no-install-recommends jq curl \
&& rm -rf /var/lib/apt/lists/*
# Vault entrypoint: fetches PostgreSQL credentials from Vault before starting Cube
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
# CMD must be re-declared — Docker resets it to null when ENTRYPOINT is overridden
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["cubejs", "server"]