diff --git a/docs/nix_keyserver_deployment.md b/docs/nix_keyserver_deployment.md --- a/docs/nix_keyserver_deployment.md +++ b/docs/nix_keyserver_deployment.md @@ -24,6 +24,9 @@ COMM_JSONCONFIG_secrets_alchemy='{"key":""}' COMM_JSONCONFIG_secrets_walletconnect='{"key":""}' +# Required for Farcaster login +COMM_JSONCONFIG_secrets_neynar='{"key":""}' + # Example backup configuration that stores up to 10 GiB of backups in /home/comm/backups COMM_JSONCONFIG_facts_backups='{"enabled":true,"directory":"/home/comm/backups","maxDirSizeMiB":10240}' ``` diff --git a/keyserver/Dockerfile b/keyserver/Dockerfile --- a/keyserver/Dockerfile +++ b/keyserver/Dockerfile @@ -22,6 +22,7 @@ ARG HOST_GID ARG COMM_JSONCONFIG_secrets_alchemy ARG COMM_JSONCONFIG_secrets_walletconnect +ARG COMM_JSONCONFIG_secrets_neynar ARG COMM_JSONCONFIG_secrets_geoip_license USER root diff --git a/keyserver/docker-compose.yml b/keyserver/docker-compose.yml --- a/keyserver/docker-compose.yml +++ b/keyserver/docker-compose.yml @@ -9,6 +9,7 @@ - HOST_GID=${HOST_GID} - COMM_JSONCONFIG_secrets_alchemy=${COMM_JSONCONFIG_secrets_alchemy} - COMM_JSONCONFIG_secrets_walletconnect=${COMM_JSONCONFIG_secrets_walletconnect} + - COMM_JSONCONFIG_secrets_neynar=${COMM_JSONCONFIG_secrets_neynar} - COMM_JSONCONFIG_secrets_geoip_license=${COMM_JSONCONFIG_secrets_geoip_license} image: commapp/node-keyserver:1.0 restart: always diff --git a/lib/webpack/shared.cjs b/lib/webpack/shared.cjs --- a/lib/webpack/shared.cjs +++ b/lib/webpack/shared.cjs @@ -97,19 +97,21 @@ } async function getConfigs() { - const [alchemySecret, walletConnectSecret] = await Promise.all([ + const [alchemySecret, walletConnectSecret, neynarSecret] = await Promise.all([ getConfig({ folder: 'secrets', name: 'alchemy' }), getConfig({ folder: 'secrets', name: 'walletconnect' }), + getConfig({ folder: 'secrets', name: 'neynar' }), ]); const alchemyKey = alchemySecret?.key; const walletConnectKey = walletConnectSecret?.key; - return { alchemyKey, walletConnectKey }; + const neynarKey = neynarSecret?.key; + return { alchemyKey, walletConnectKey, neynarKey }; } async function createProdBrowserConfig(baseConfig, babelConfig, envVars) { const browserConfig = createBaseBrowserConfig(baseConfig); const babelRule = getBrowserBabelRule(babelConfig); - const { alchemyKey, walletConnectKey } = await getConfigs(); + const { alchemyKey, walletConnectKey, neynarKey } = await getConfigs(); return { ...browserConfig, mode: 'production', @@ -121,6 +123,7 @@ BROWSER: true, COMM_ALCHEMY_KEY: JSON.stringify(alchemyKey), COMM_WALLETCONNECT_KEY: JSON.stringify(walletConnectKey), + COMM_NEYNAR_KEY: JSON.stringify(neynarKey), ...envVars, }, }), @@ -178,7 +181,7 @@ async function createDevBrowserConfig(baseConfig, babelConfig, envVars) { const browserConfig = createBaseBrowserConfig(baseConfig); const babelRule = getBrowserBabelRule(babelConfig); - const { alchemyKey, walletConnectKey } = await getConfigs(); + const { alchemyKey, walletConnectKey, neynarKey } = await getConfigs(); return { ...browserConfig, mode: 'development', @@ -190,6 +193,7 @@ BROWSER: true, COMM_ALCHEMY_KEY: JSON.stringify(alchemyKey), COMM_WALLETCONNECT_KEY: JSON.stringify(walletConnectKey), + COMM_NEYNAR_KEY: JSON.stringify(neynarKey), ...envVars, }, }), @@ -235,7 +239,7 @@ } async function createNodeServerRenderingConfig(baseConfig, babelConfig) { - const { alchemyKey, walletConnectKey } = await getConfigs(); + const { alchemyKey, walletConnectKey, neynarKey } = await getConfigs(); return { ...baseConfig, name: 'server', @@ -264,6 +268,7 @@ 'process.env': { COMM_ALCHEMY_KEY: JSON.stringify(alchemyKey), COMM_WALLETCONNECT_KEY: JSON.stringify(walletConnectKey), + COMM_NEYNAR_KEY: JSON.stringify(neynarKey), }, }), ],