fix: docker deployment failed because of new nextjs config (#1688)

This commit is contained in:
Matti Nannt
2023-11-27 18:44:23 +01:00
committed by GitHub
parent 4f8a94bfe7
commit 24a3af210a
2 changed files with 18 additions and 3 deletions

View File

@@ -27,6 +27,16 @@ jobs:
id-token: write
steps:
- name: Generate Random NEXTAUTH_SECRET
run: |
SECRET=$(openssl rand -hex 32)
echo "NEXTAUTH_SECRET=$SECRET" >> $GITHUB_ENV
- name: Generate Random ENCRYPTION_KEY
run: |
SECRET=$(openssl rand -hex 32)
echo "ENCRYPTION_KEY=$SECRET" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@v3

View File

@@ -8,9 +8,7 @@ const nextConfig = {
assetPrefix: process.env.ASSET_PREFIX_URL || undefined,
output: "standalone",
experimental: {
serverActions: {
allowedOrigins: [process.env.WEBAPP_URL.replace(/https?:\/\//, "")],
},
serverActions: true,
},
transpilePackages: ["@formbricks/database", "@formbricks/ee", "@formbricks/ui", "@formbricks/lib"],
images: {
@@ -104,6 +102,13 @@ const nextConfig = {
},
};
// set actions allowed origins
if (process.env.WEBAPP_URL) {
nextConfig.experimental.serverActions = {
allowedOrigins: [process.env.WEBAPP_URL.replace(/https?:\/\//, "")],
};
}
const sentryOptions = {
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options