From ca0badc79219246b3d6f279281b7f437dd47dc2b Mon Sep 17 00:00:00 2001 From: Colin Griffin Date: Tue, 8 Nov 2022 14:01:58 -0500 Subject: [PATCH 01/11] update readme and env example --- .env.example | 3 +++ README.md | 37 ++++++++++++++++++++++++++++++++++--- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 26ce814..e086427 100644 --- a/.env.example +++ b/.env.example @@ -14,6 +14,9 @@ LICENSE= NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000 +# Configure NEXTAUTH_URL manually if needed, otherwise it will resolve to {NEXT_PUBLIC_WEBAPP_URL}/api/auth +# NEXTAUTH_URL=http://localhost:3000/api/auth + # It is highly recommended that the NEXTAUTH_SECRET must be overridden and very unique # Use `openssl rand -base64 32` to generate a key NEXTAUTH_SECRET=secret diff --git a/README.md b/README.md index beb5cf4..49ccc15 100644 --- a/README.md +++ b/README.md @@ -125,8 +125,9 @@ These variables must also be provided at runtime | Variable | Description | Required | Default | | --- | --- | --- | --- | +| CALCOM_LICENSE_KEY | Enterprise License Key | optional | | | NEXT_PUBLIC_WEBAPP_URL | Base URL of the site. NOTE: if this value differs from the value used at build-time, there will be a slight delay during container start (to update the statically built files). | optional | `http://localhost:3000` | -| CALCOM_LICENSE_KEY | Enterprise License Key | | | +| NEXTAUTH_URL | Location of the auth server. By default, this is the Cal.com docker instance itself. | optional | `{NEXT_PUBLIC_WEBAPP_URL}/api/auth` | | NEXTAUTH_SECRET | must match build variable | required | `secret` | | CALENDSO_ENCRYPTION_KEY | must match build variable | required | `secret` | | DATABASE_URL | database url with credentials | required | `postgresql://unicorn_user:magical_password@database:5432/calendso` | @@ -145,5 +146,35 @@ For more advanced usage, please refer to the git documentation: [https://git-scm ## Troubleshooting -* SSL edge termination: If running behind a load balancer which handles SSL certificates, you will need to add the environmental variable `NODE_TLS_REJECT_UNAUTHORIZED=0` to prevent requests from being rejected. Only do this if you know what you are doing and trust the services/load-balancers directing traffic to your service. -* Failed to commit changes: Invalid 'prisma.user.create()': Certain versions may have trouble creating a user if the field `metadata` is empty. Using an empty json object `{}` as the field value should resolve this issue. Also, the `id` field will autoincrement, so you may also try leaving the value of `id` as empty. +### SSL edge termination + +If running behind a load balancer which handles SSL certificates, you will need to add the environmental variable `NODE_TLS_REJECT_UNAUTHORIZED=0` to prevent requests from being rejected. Only do this if you know what you are doing and trust the services/load-balancers directing traffic to your service. + +### Failed to commit changes: Invalid 'prisma.user.create()' + +Certain versions may have trouble creating a user if the field `metadata` is empty. Using an empty json object `{}` as the field value should resolve this issue. Also, the `id` field will autoincrement, so you may also try leaving the value of `id` as empty. + +### CLIENT_FETCH_ERROR + +If you experience this error, it may be the way the default Auth callback in the server is using the WEBAPP_URL as a base url. The container does not necessarily have access to the same DNS as your local machine, and therefor needs to be configured to resolve to itself. Correct this by configuring +``` +docker-calcom-1 | @calcom/web:start: [next-auth][error][CLIENT_FETCH_ERROR] +docker-calcom-1 | @calcom/web:start: https://next-auth.js.org/errors#client_fetch_error request to http://testing.localhost:3000/api/auth/session failed, reason: getaddrinfo ENOTFOUND testing.localhost { +docker-calcom-1 | @calcom/web:start: error: { +docker-calcom-1 | @calcom/web:start: message: 'request to http://testing.localhost:3000/api/auth/session failed, reason: getaddrinfo ENOTFOUND testing.localhost', +docker-calcom-1 | @calcom/web:start: stack: 'FetchError: request to http://testing.localhost:3000/api/auth/session failed, reason: getaddrinfo ENOTFOUND testing.localhost\n' + +docker-calcom-1 | @calcom/web:start: ' at ClientRequest. (/calcom/node_modules/next/dist/compiled/node-fetch/index.js:1:65756)\n' + +docker-calcom-1 | @calcom/web:start: ' at ClientRequest.emit (node:events:513:28)\n' + +docker-calcom-1 | @calcom/web:start: ' at ClientRequest.emit (node:domain:489:12)\n' + +docker-calcom-1 | @calcom/web:start: ' at Socket.socketErrorListener (node:_http_client:494:9)\n' + +docker-calcom-1 | @calcom/web:start: ' at Socket.emit (node:events:513:28)\n' + +docker-calcom-1 | @calcom/web:start: ' at Socket.emit (node:domain:489:12)\n' + +docker-calcom-1 | @calcom/web:start: ' at emitErrorNT (node:internal/streams/destroy:157:8)\n' + +docker-calcom-1 | @calcom/web:start: ' at emitErrorCloseNT (node:internal/streams/destroy:122:3)\n' + +docker-calcom-1 | @calcom/web:start: ' at processTicksAndRejections (node:internal/process/task_queues:83:21)', +docker-calcom-1 | @calcom/web:start: name: 'FetchError' +docker-calcom-1 | @calcom/web:start: }, +docker-calcom-1 | @calcom/web:start: url: 'http://testing.localhost:3000/api/auth/session', +docker-calcom-1 | @calcom/web:start: message: 'request to http://testing.localhost:3000/api/auth/session failed, reason: getaddrinfo ENOTFOUND testing.localhost' +docker-calcom-1 | @calcom/web:start: } +``` \ No newline at end of file From 59c5f3a7bbffcd2a2685fcbd74567161005abbd1 Mon Sep 17 00:00:00 2001 From: actions-user Date: Wed, 9 Nov 2022 04:20:55 +0000 Subject: [PATCH 02/11] Auto updated submodule references --- calcom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calcom b/calcom index 7e19e0d..7d1fb7c 160000 --- a/calcom +++ b/calcom @@ -1 +1 @@ -Subproject commit 7e19e0d9e294eee8f91c491b27bbf4d85e2f640a +Subproject commit 7d1fb7c6597ac9761274ef84388307dd4d956aa7 From eb4e7cfc113065b7c179b987263d62d15b0c9972 Mon Sep 17 00:00:00 2001 From: actions-user Date: Thu, 10 Nov 2022 04:17:24 +0000 Subject: [PATCH 03/11] Auto updated submodule references --- calcom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calcom b/calcom index 7d1fb7c..c3a4273 160000 --- a/calcom +++ b/calcom @@ -1 +1 @@ -Subproject commit 7d1fb7c6597ac9761274ef84388307dd4d956aa7 +Subproject commit c3a427346ded354099437eb1b16c4f5c228735c1 From 0cf2122687012ea684904506f16b58c7e8420d30 Mon Sep 17 00:00:00 2001 From: actions-user Date: Fri, 11 Nov 2022 04:13:42 +0000 Subject: [PATCH 04/11] Auto updated submodule references --- calcom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calcom b/calcom index c3a4273..db7c3fb 160000 --- a/calcom +++ b/calcom @@ -1 +1 @@ -Subproject commit c3a427346ded354099437eb1b16c4f5c228735c1 +Subproject commit db7c3fb52fb7b9e55cc12393abbfb312780f6a42 From 5f6bd728672e9b9ec24807a6eda51c610cd1a43b Mon Sep 17 00:00:00 2001 From: actions-user Date: Sat, 12 Nov 2022 04:11:14 +0000 Subject: [PATCH 05/11] Auto updated submodule references --- calcom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calcom b/calcom index db7c3fb..0cb278d 160000 --- a/calcom +++ b/calcom @@ -1 +1 @@ -Subproject commit db7c3fb52fb7b9e55cc12393abbfb312780f6a42 +Subproject commit 0cb278d1098dc7405849c7328767fdefbf149213 From 83fba3d630817bb64f42fdaeb11a57210ed4ac43 Mon Sep 17 00:00:00 2001 From: actions-user Date: Sun, 13 Nov 2022 04:12:43 +0000 Subject: [PATCH 06/11] Auto updated submodule references --- calcom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calcom b/calcom index 0cb278d..cbe358b 160000 --- a/calcom +++ b/calcom @@ -1 +1 @@ -Subproject commit 0cb278d1098dc7405849c7328767fdefbf149213 +Subproject commit cbe358bb6b12fc7e8853a2b9f945cb67d479010b From 394efaf05bf6f47927dd14fa108039351e7ac763 Mon Sep 17 00:00:00 2001 From: actions-user Date: Mon, 14 Nov 2022 04:16:32 +0000 Subject: [PATCH 07/11] Auto updated submodule references --- calcom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calcom b/calcom index cbe358b..3937b0c 160000 --- a/calcom +++ b/calcom @@ -1 +1 @@ -Subproject commit cbe358bb6b12fc7e8853a2b9f945cb67d479010b +Subproject commit 3937b0c4c6e1085ccd2778cecc58fee662567145 From 47220f203eb45d3d958513e4166c1e6497295050 Mon Sep 17 00:00:00 2001 From: actions-user Date: Tue, 15 Nov 2022 04:07:10 +0000 Subject: [PATCH 08/11] Auto updated submodule references --- calcom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calcom b/calcom index 3937b0c..f822177 160000 --- a/calcom +++ b/calcom @@ -1 +1 @@ -Subproject commit 3937b0c4c6e1085ccd2778cecc58fee662567145 +Subproject commit f8221777887c30d40f4e90f0b4729a87e2216bec From 158dba0544b2261bf270fc39a051424c7b2878df Mon Sep 17 00:00:00 2001 From: actions-user Date: Tue, 15 Nov 2022 14:31:55 +0000 Subject: [PATCH 09/11] Auto updated submodule references --- calcom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calcom b/calcom index f822177..a5249b6 160000 --- a/calcom +++ b/calcom @@ -1 +1 @@ -Subproject commit f8221777887c30d40f4e90f0b4729a87e2216bec +Subproject commit a5249b6cb5b1c5fdb5e8cd4c97bc214819321419 From be7398c764fd9ca74773c8827718e9fca729c9a8 Mon Sep 17 00:00:00 2001 From: actions-user Date: Wed, 16 Nov 2022 04:08:04 +0000 Subject: [PATCH 10/11] Auto updated submodule references --- calcom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calcom b/calcom index a5249b6..4fef7ba 160000 --- a/calcom +++ b/calcom @@ -1 +1 @@ -Subproject commit a5249b6cb5b1c5fdb5e8cd4c97bc214819321419 +Subproject commit 4fef7ba5e26cbce4b6b4d757c5b8f404fa68fd30 From ead20536008a601d0c1cf9cc80bdf0070b593e07 Mon Sep 17 00:00:00 2001 From: actions-user Date: Thu, 17 Nov 2022 04:04:46 +0000 Subject: [PATCH 11/11] Auto updated submodule references --- calcom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calcom b/calcom index 4fef7ba..5e2db12 160000 --- a/calcom +++ b/calcom @@ -1 +1 @@ -Subproject commit 4fef7ba5e26cbce4b6b4d757c5b8f404fa68fd30 +Subproject commit 5e2db1239642f8534956776c111fbf67e0931e12