Created
February 22, 2021 23:40
-
-
Save joshk0/6fc847e50cf3d8d14865f69f2649d9a8 to your computer and use it in GitHub Desktop.
cloud run cube.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM binxio/gcp-get-secret AS gcp-get-secret | |
FROM cubejs/cube:latest | |
COPY --from=gcp-get-secret /gcp-get-secret /usr/local/bin/ | |
# Add all our local schema definitions | |
COPY schema /cube/conf/schema | |
COPY cube.js /cube/conf/cube.js | |
# Retrieve any secrets such as the CUBEJS_API_SECRET | |
ENTRYPOINT ["/usr/local/bin/gcp-get-secret"] | |
# Friendly reminder: This is the ENTRYPOINT of the upstream cubejs image not the CMD | |
CMD ["cubejs", "server"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: serving.knative.dev/v1 | |
kind: Service | |
metadata: | |
name: cube | |
# redacted | |
spec: | |
template: | |
metadata: | |
# redacted | |
spec: | |
containerConcurrency: 80 | |
timeoutSeconds: 300 | |
serviceAccountName: [email protected] | |
containers: | |
- image: gcr.io/REDACTED/cube:master_8a2ab69e | |
ports: | |
- containerPort: 4000 | |
env: | |
- name: CUBEJS_API_SECRET | |
value: gcp:///cubejs_api_secret | |
- name: CUBEJS_CACHE_AND_QUEUE_DRIVER | |
value: memory | |
- name: CUBEJS_DB_TYPE | |
value: bigquery | |
- name: CUBEJS_DB_BQ_PROJECT_ID | |
value: REDACTED | |
resources: | |
limits: | |
cpu: 1000m | |
memory: 256Mi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment