Skip to content

Instantly share code, notes, and snippets.

@joshk0
Created February 22, 2021 23:40
Show Gist options
  • Save joshk0/6fc847e50cf3d8d14865f69f2649d9a8 to your computer and use it in GitHub Desktop.
Save joshk0/6fc847e50cf3d8d14865f69f2649d9a8 to your computer and use it in GitHub Desktop.
cloud run cube.js
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"]
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