diff --git a/.github/workflows/deploy_gcp_prod.yaml b/.github/workflows/deploy_gcp_prod.yaml index d08e9d7..37493b9 100644 --- a/.github/workflows/deploy_gcp_prod.yaml +++ b/.github/workflows/deploy_gcp_prod.yaml @@ -85,6 +85,13 @@ jobs: NEXUS_STANDALONE=true PRISMA_PRIVATE_URI=${{ secrets.MONGODB_PRIVATE_URI_PROD }} PRISMA_PUBLIC_URI=${{ secrets.MONGODB_PUBLIC_URI_PROD }} + SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN_PROD }} + SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN_PROD }} + NEXT_PUBLIC_SENTRY_DSN=${{ secrets.NEXT_PUBLIC_SENTRY_DSN_PROD }} + SENTRY_PROJECT=${{ secrets.SENTRY_PROJECT_PROD }} + SENTRY_ORG=${{ secrets.SENTRY_ORG_PROD }} + VERCEL_GIT_COMMIT_SHA=${{ github.sha }} + - name: hypnos::deploy_prod::docker::Generate artifact attestation uses: actions/attest-build-provenance@v1 diff --git a/Dockerfile b/Dockerfile index 8dc48b2..ce6eb3b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -80,6 +80,12 @@ ARG MONGODB_PUBLIC_URI ARG NEXUS_MODE ARG NEXUS_KEEPALIVE +ARG SENTRY_AUTH_TOKEN +ARG SENTRY_PROJECT +ARG SENTRY_ORG +ARG NEXT_PUBLIC_SENTRY_DSN +ARG VERCEL_GIT_COMMIT_SHA + # ENV FROM ARGS VARS ENV AUTH_GITHUB_ID=$AUTH_GITHUB_ID ENV AUTH_GITHUB_SECRET=$AUTH_GITHUB_SECRET @@ -120,6 +126,12 @@ ENV MONGODB_PUBLIC_URI=$MONGODB_PUBLIC_URI ENV NEXUS_MODE=$NEXUS_MODE ENV NEXUS_KEEPALIVE=$NEXUS_KEEPALIVE +ENV SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN +ENV SENTRY_PROJECT=$SENTRY_PROJECT +ENV SENTRY_ORG=$SENTRY_ORG +ENV NEXT_PUBLIC_SENTRY_DSN=$NEXT_PUBLIC_SENTRY_DSN +ENV VERCEL_GIT_COMMIT_SHA=$VERCEL_GIT_COMMIT_SHA + RUN \ if [ -f yarn.lock ]; then yarn run build:vm; \ @@ -176,6 +188,12 @@ ARG MONGODB_PUBLIC_URI ARG NEXUS_MODE ARG NEXUS_KEEPALIVE +ARG SENTRY_AUTH_TOKEN +ARG SENTRY_PROJECT +ARG SENTRY_ORG +ARG NEXT_PUBLIC_SENTRY_DSN +ARG VERCEL_GIT_COMMIT_SHA + # ENV FROM ARGS VARS ENV AUTH_GITHUB_ID=$AUTH_GITHUB_ID ENV AUTH_GITHUB_SECRET=$AUTH_GITHUB_SECRET @@ -216,6 +234,12 @@ ENV MONGODB_PUBLIC_URI=$MONGODB_PUBLIC_URI ENV NEXUS_MODE=$NEXUS_MODE ENV NEXUS_KEEPALIVE=$NEXUS_KEEPALIVE +ENV SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN +ENV SENTRY_PROJECT=$SENTRY_PROJECT +ENV SENTRY_ORG=$SENTRY_ORG +ENV NEXT_PUBLIC_SENTRY_DSN=$NEXT_PUBLIC_SENTRY_DSN +ENV VERCEL_GIT_COMMIT_SHA=$VERCEL_GIT_COMMIT_SHA + RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs diff --git a/lib/auth/constants.ts b/lib/auth/constants.ts index 4d7fe1c..0cf0ec3 100644 --- a/lib/auth/constants.ts +++ b/lib/auth/constants.ts @@ -114,6 +114,7 @@ export const authConfig = { const { user, isNewUser } = props; try { if (isNewUser) { + console.log('Events: Running side-effects'); await allUsersSideEffects({ user }); } } catch (e) { @@ -127,6 +128,7 @@ export const authConfig = { async signIn(props) { const { user } = props; try { + console.log('Callback: Running side-effects'); await allUsersSideEffects({ user }); } catch (e) { console.warn(`Code 004: Log-in side-effects failed. If it's a new user, plese ignore: ${e}`);