-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
65 changed files
with
2,693 additions
and
42 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
encryptionsalt: v1:1DwWI+bI55I=:v1:tpqziDy1t6GntGld:l3IA3E6yuXwTfNlPX8Lxe59IqDG7QA== | ||
config: | ||
infra:airtablePat: | ||
secure: v1:xxnGOjci0H2TTfIY:p5/SIY+vels8uuUTUCJYRW3JIIYJNF9Jmr1m8usCqYgjU073BMKjQ+uq3dUb42f1iNeOs0A124ZIzDjxv9f1cJNaOd8gfvAxQf1oA1WC/A/CqnHyoNFIG6zpE1C0gNtu+u8= | ||
infra:alertsSlackBotToken: | ||
secure: v1:KHo0xEvyljpu6RQu:FxDE6U4NfjkQTTCE+yLJKpF2tnjiNqGM4eWfgnSMgD+3RKyicTHqUuVKYyEQdNYj9YZkokYeD6X0eB277AYJHQUV3ZhbrrO/vA== | ||
infra:containerRegistryDockerConfigJson: | ||
secure: v1:lycjX7rEaALQ9R/z:sZY2d07ja/BvKImmficAenAbHtUZ/fRgnq1VUrD9whc4PEwv8RM952po7asuECsQHPF7/nSAheMWH4dk2n039ylID933zQ9lMSh9AbDP5hsw6Td+X+KSwyYBZlSx6RdYfzAf8F7dRk6Rd+varZXql+rKpwfhpcXoEd9OMHR/niMQIBOQk5mUqc/m2FUMkWptCYMJpfYUQu4x9oqA52hG39Ojbdr7NDf+ZiedXWIJFmniCTdOZRNUWDgnkXI2fGkPI0yr1O8cr68aS2WmrvtVYDfheaKJZd9kZ4avug== | ||
infra:dbPassword: | ||
secure: v1:ERZRodNiiPzZWbC2:sG0lmdI7kUxxeD3krcFFzUg/SOa4bsXBwigCyoh8xAZvNFFopFPeSAR+TMUyrfE/YHt+XDHHKFuAm319k2j+gL+aYYtP3g83PhTOojEQSJI= | ||
infra:meetZoomClientSecret: | ||
secure: v1:jPYJIQX1CoHF/Zmm:KTKen2BLFJ2UpCuIOXE5kdUh0OynxG/UbVbTD4h0Ft5X2UFFRYPp1iSVGd8Rxd+o | ||
vultr:apiKey: | ||
secure: v1:V4H9p6vQNMJM4KEQ:G/T2vskLJtn5ZtO9Ry7TfstCV0lwGmCQIwb6twGs9j9VJq5FWG249dYKg/RuJFOXl6eDZg== |
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import './containerRegistry'; | ||
import './secrets'; | ||
import './ingress'; | ||
import './certManager'; | ||
import './services'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import * as k8s from '@pulumi/kubernetes'; | ||
import { core } from '@pulumi/kubernetes/types/input'; | ||
import { provider } from './provider'; | ||
import { config } from '../config'; | ||
|
||
// These Pulumi secrets will be converted to K8s secrets automatically | ||
const toK8s = [ | ||
'airtablePat', | ||
'alertsSlackBotToken', | ||
'meetZoomClientSecret', | ||
] as const; | ||
|
||
export const envVarSources = toK8s.reduce((obj, key) => { | ||
const resource = new k8s.core.v1.Secret(`${key.toLowerCase()}-secret`, { | ||
metadata: { | ||
name: `${key.toLowerCase()}-secret`, | ||
}, | ||
stringData: { | ||
value: config.requireSecret(key), | ||
}, | ||
}, { provider }); | ||
|
||
// eslint-disable-next-line no-param-reassign | ||
obj[key] = { secretKeyRef: { name: resource.metadata.name, key: 'value' } }; | ||
return obj; | ||
}, {} as Record<typeof toK8s[number], core.v1.EnvVarSource>); | ||
|
||
export const containerRegistrySecret = new k8s.core.v1.Secret('vultr-cr-secret', { | ||
metadata: { | ||
name: 'vultr-cr-credentials', | ||
}, | ||
data: { | ||
'.dockerconfigjson': config.requireSecret('containerRegistryDockerConfigJson'), | ||
}, | ||
type: 'kubernetes.io/dockerconfigjson', | ||
}, { provider }); |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Airtable: https://support.airtable.com/docs/creating-and-using-api-keys-and-access-tokens | ||
AIRTABLE_PERSONAL_ACCESS_TOKEN= | ||
|
||
# Zoom | ||
NEXT_PUBLIC_ZOOM_CLIENT_ID=lX1NBglbQWO2ERYSS1xdfA | ||
ZOOM_CLIENT_SECRET= | ||
|
||
# BlueDot Impact Slack, #tech-dev-alerts | ||
ALERTS_SLACK_CHANNEL_ID=C04SFUECECU | ||
# For (local) BlueBot see https://airtable.com/appnNmNoNMB6crg6I/tbllthJ2YSPDsKWCt/viwfjWLvplq6Xw93D/recqurdJTPWzm5y4W | ||
# For (prod) BlueBot see https://api.slack.com/apps/A04PV2GAQRY/install-on-team | ||
# Starts 'xoxb-' | ||
ALERTS_SLACK_BOT_TOKEN= |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Airtable | ||
AIRTABLE_PERSONAL_ACCESS_TOKEN=FAKE_TOKEN | ||
|
||
# Zoom | ||
NEXT_PUBLIC_ZOOM_CLIENT_ID=FAKE_CLIENT_ID | ||
ZOOM_CLIENT_SECRET=FAKE_CLIENT_SECRET | ||
|
||
# Slack | ||
ALERTS_SLACK_CHANNEL_ID=C04SFUECECU | ||
ALERTS_SLACK_BOT_TOKEN=FAKE_TOKEN |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM node:lts-alpine@sha256:7e227295e96f5b00aa79555ae166f50610940d888fc2e321cf36304cbd17d7d6 AS base | ||
|
||
RUN apk update && apk add --no-cache dumb-init | ||
|
||
WORKDIR /app | ||
|
||
ENV NODE_ENV production | ||
ENV NEXT_TELEMETRY_DISABLED 1 | ||
|
||
# Set the correct permission for prerender cache | ||
RUN mkdir .next | ||
RUN chown node:node .next | ||
|
||
ARG APP_NAME | ||
ENV APP_NAME=${APP_NAME} | ||
|
||
COPY --chown=node:node .next/standalone ./ | ||
COPY --chown=node:node public ./apps/${APP_NAME}/public | ||
COPY --chown=node:node .next/static ./apps/${APP_NAME}/.next/static | ||
|
||
USER node | ||
|
||
EXPOSE 8080 | ||
|
||
CMD HOSTNAME="0.0.0.0" PORT="8080" dumb-init node ./apps/${APP_NAME}/server.js |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** @type {import('next').NextConfig} */ | ||
module.exports = { | ||
transpilePackages: ['@bluedot/ui'], | ||
reactStrictMode: true, | ||
output: 'standalone', | ||
|
||
// We already run eslint as a separate step | ||
eslint: { | ||
ignoreDuringBuilds: true, | ||
}, | ||
|
||
poweredByHeader: false, | ||
headers: async () => { | ||
return [ | ||
// See https://developers.zoom.us/docs/meeting-sdk/web/sharedarraybuffer/ | ||
{ | ||
source: '/', | ||
headers: [ | ||
{ | ||
key: 'Cross-Origin-Embedder-Policy', | ||
value: 'require-corp', | ||
}, | ||
{ | ||
key: 'Cross-Origin-Opener-Policy', | ||
value: 'same-origin', | ||
}, | ||
], | ||
}, | ||
{ | ||
source: '/:path*', | ||
headers: [ | ||
{ | ||
key: 'X-Bluedot-Version', | ||
// eslint-disable-next-line turbo/no-undeclared-env-vars | ||
value: process.env.VERSION_TAG || 'unknown', | ||
}, | ||
], | ||
}, | ||
]; | ||
}, | ||
}; |
Oops, something went wrong.