From deb3cafa3897d93d3e7da0b65f7b223fad0fdb42 Mon Sep 17 00:00:00 2001 From: Colin Griffin Date: Wed, 15 Jun 2022 12:49:35 -0400 Subject: [PATCH 1/8] add defaults for auth secrets --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8aa1151..e5309ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,8 +5,8 @@ ARG NEXT_PUBLIC_WEBAPP_URL ARG NEXT_PUBLIC_APP_URL ARG NEXT_PUBLIC_LICENSE_CONSENT ARG NEXT_PUBLIC_TELEMETRY_KEY -ARG NEXTAUTH_SECRET -ARG CALENDSO_ENCRYPTION_KEY +ARG NEXTAUTH_SECRET=secret +ARG CALENDSO_ENCRYPTION_KEY=secret ARG DATABASE_URL ENV NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL \ @@ -17,6 +17,7 @@ ENV NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL \ CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY} \ DATABASE_URL=$DATABASE_URL + COPY calcom/package.json calcom/yarn.lock calcom/turbo.json ./ COPY calcom/apps/web ./apps/web COPY calcom/packages ./packages From 9229e0dcec2c3bf4bf509c288a7367e2fe2854fd Mon Sep 17 00:00:00 2001 From: Colin Griffin Date: Wed, 15 Jun 2022 13:02:24 -0400 Subject: [PATCH 2/8] arrange variables to match instructions --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index e5309ce..1d8c78a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,21 @@ FROM node:14 as builder WORKDIR /calcom -ARG NEXT_PUBLIC_WEBAPP_URL +ARG NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000 ARG NEXT_PUBLIC_APP_URL ARG NEXT_PUBLIC_LICENSE_CONSENT -ARG NEXT_PUBLIC_TELEMETRY_KEY +ARG NEXT_PUBLIC_TELEMETRY_KEY=js.2pvs2bbpqq1zxna97wcml.oi2jzirnbj1ev4tc57c5r +ARG DATABASE_URL ARG NEXTAUTH_SECRET=secret ARG CALENDSO_ENCRYPTION_KEY=secret -ARG DATABASE_URL ENV NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL \ NEXT_PUBLIC_APP_URL=$NEXT_PUBLIC_APP_URL \ NEXT_PUBLIC_LICENSE_CONSENT=$NEXT_PUBLIC_LICENSE_CONSENT \ NEXT_PUBLIC_TELEMETRY_KEY=$NEXT_PUBLIC_TELEMETRY_KEY \ + DATABASE_URL=$DATABASE_URL \ NEXTAUTH_SECRET=${NEXTAUTH_SECRET} \ - CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY} \ - DATABASE_URL=$DATABASE_URL + CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY} COPY calcom/package.json calcom/yarn.lock calcom/turbo.json ./ From 323bff9f28565cf6af42ed135ac1b98a2d7c0d44 Mon Sep 17 00:00:00 2001 From: Colin Griffin Date: Wed, 15 Jun 2022 13:21:29 -0400 Subject: [PATCH 3/8] update variable descriptions --- README.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 25eceb6..d9d9f34 100644 --- a/README.md +++ b/README.md @@ -106,16 +106,26 @@ Note: `docker compose` without the hyphen is now the primary method of using doc ### Build-time variables -These variables must be provided at the time of the docker build, and can be provided by updating the .env file. Changing these is not required for evaluation, but may be required for running in production. Currently, if you require changes to these variables, you must follow the instructions to build and publish your own image. +These variables must be provided at the time of the docker build, and can be provided by updating the .env file. Currently, if you require changes to these variables, you must follow the instructions to build and publish your own image. -* NEXT_PUBLIC_WEBAPP_URL -* NEXT_PUBLIC_LICENSE_CONSENT -* NEXT_PUBLIC_TELEMETRY_KEY -* DATABASE_URL +Changing these is not required for evaluation, but is required for running in production. Instructions for generating variables can be found in the [cal.com instructions](https://github.com/calcom/cal.com) + +| Variable | Description | Required | Default | +| --- | --- | --- | --- | +| NEXT_PUBLIC_WEBAPP_URL | Base URL injected into static files | true | `http://localhost:3000` | +| NEXT_PUBLIC_LICENSE_CONSENT | license consent - true/false | false | | +| NEXT_PUBLIC_TELEMETRY_KEY | NEXT telemetry key | true | `js.2pvs2bbpqq1zxna97wcml.oi2jzirnbj1ev4tc57c5r` | +| DATABASE_URL | database url with credentials | true | | +| NEXTAUTH_SECRET | Cookie encryption key | true | `secret` | +| CALENDSO_ENCRYPTION_KEY | Authentication encryption key | true | `secret` | ### Important Run-time variables -* NEXTAUTH_SECRET +These variables must also be provided at runtime + +* CALCOM_LICENSE_KEY +* NEXTAUTH_SECRET (must match value used in build) +* CALENDSO_ENCRYPTION_KEY (must match value used in build) * DATABASE_URL ## Git Submodules From 7d46413f2a5f323bdf168346959d732f3d9ef783 Mon Sep 17 00:00:00 2001 From: Colin Griffin Date: Wed, 15 Jun 2022 13:27:28 -0400 Subject: [PATCH 4/8] update language and variable defaults --- Dockerfile | 1 - README.md | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1d8c78a..7bd8155 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,6 @@ ENV NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL \ NEXTAUTH_SECRET=${NEXTAUTH_SECRET} \ CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY} - COPY calcom/package.json calcom/yarn.lock calcom/turbo.json ./ COPY calcom/apps/web ./apps/web COPY calcom/packages ./packages diff --git a/README.md b/README.md index d9d9f34..49a1b05 100644 --- a/README.md +++ b/README.md @@ -108,14 +108,14 @@ Note: `docker compose` without the hyphen is now the primary method of using doc These variables must be provided at the time of the docker build, and can be provided by updating the .env file. Currently, if you require changes to these variables, you must follow the instructions to build and publish your own image. -Changing these is not required for evaluation, but is required for running in production. Instructions for generating variables can be found in the [cal.com instructions](https://github.com/calcom/cal.com) +Changing these variables is not required for evaluation, but is required for running in production. Instructions for generating variables can be found in the [cal.com instructions](https://github.com/calcom/cal.com) | Variable | Description | Required | Default | | --- | --- | --- | --- | | NEXT_PUBLIC_WEBAPP_URL | Base URL injected into static files | true | `http://localhost:3000` | | NEXT_PUBLIC_LICENSE_CONSENT | license consent - true/false | false | | | NEXT_PUBLIC_TELEMETRY_KEY | NEXT telemetry key | true | `js.2pvs2bbpqq1zxna97wcml.oi2jzirnbj1ev4tc57c5r` | -| DATABASE_URL | database url with credentials | true | | +| DATABASE_URL | database url with credentials | true | `postgresql://unicorn_user:magical_password@database:5432/calendso` | | NEXTAUTH_SECRET | Cookie encryption key | true | `secret` | | CALENDSO_ENCRYPTION_KEY | Authentication encryption key | true | `secret` | From 2044d462a3cd27ed9bac5a06dab12719278c67ab Mon Sep 17 00:00:00 2001 From: Colin Griffin Date: Wed, 15 Jun 2022 13:32:30 -0400 Subject: [PATCH 5/8] table-ify runtime variables --- README.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 49a1b05..f8d9cb7 100644 --- a/README.md +++ b/README.md @@ -112,21 +112,23 @@ Changing these variables is not required for evaluation, but is required for run | Variable | Description | Required | Default | | --- | --- | --- | --- | -| NEXT_PUBLIC_WEBAPP_URL | Base URL injected into static files | true | `http://localhost:3000` | -| NEXT_PUBLIC_LICENSE_CONSENT | license consent - true/false | false | | -| NEXT_PUBLIC_TELEMETRY_KEY | NEXT telemetry key | true | `js.2pvs2bbpqq1zxna97wcml.oi2jzirnbj1ev4tc57c5r` | -| DATABASE_URL | database url with credentials | true | `postgresql://unicorn_user:magical_password@database:5432/calendso` | -| NEXTAUTH_SECRET | Cookie encryption key | true | `secret` | -| CALENDSO_ENCRYPTION_KEY | Authentication encryption key | true | `secret` | +| NEXT_PUBLIC_WEBAPP_URL | Base URL injected into static files | required | `http://localhost:3000` | +| NEXT_PUBLIC_LICENSE_CONSENT | license consent - true/false | | | +| NEXT_PUBLIC_TELEMETRY_KEY | NEXT telemetry key | required | `js.2pvs2bbpqq1zxna97wcml.oi2jzirnbj1ev4tc57c5r` | +| DATABASE_URL | database url with credentials | required | `postgresql://unicorn_user:magical_password@database:5432/calendso` | +| NEXTAUTH_SECRET | Cookie encryption key | required | `secret` | +| CALENDSO_ENCRYPTION_KEY | Authentication encryption key | required | `secret` | ### Important Run-time variables These variables must also be provided at runtime -* CALCOM_LICENSE_KEY -* NEXTAUTH_SECRET (must match value used in build) -* CALENDSO_ENCRYPTION_KEY (must match value used in build) -* DATABASE_URL +| Variable | Description | Required | Default | +| --- | --- | --- | --- | +| CALCOM_LICENSE_KEY | Enterprise License Key | | | +| NEXTAUTH_SECRET | must match build variable | required | `secret` | +| CALENDSO_ENCRYPTION_KEY | must build variable | required | `secret` | +| DATABASE_URL | database url with credentials | required | `postgresql://unicorn_user:magical_password@database:5432/calendso` | ## Git Submodules From 66207073fd8d70d47dfb34941c631dafe94c45d6 Mon Sep 17 00:00:00 2001 From: Colin Griffin Date: Wed, 15 Jun 2022 13:33:03 -0400 Subject: [PATCH 6/8] added missing word --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f8d9cb7..a73a43e 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ These variables must also be provided at runtime | --- | --- | --- | --- | | CALCOM_LICENSE_KEY | Enterprise License Key | | | | NEXTAUTH_SECRET | must match build variable | required | `secret` | -| CALENDSO_ENCRYPTION_KEY | must 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` | ## Git Submodules From 03c15c8c307f1034c72357212296bef95d9f1efb Mon Sep 17 00:00:00 2001 From: Colin Griffin Date: Wed, 15 Jun 2022 14:02:22 -0400 Subject: [PATCH 7/8] replace encryption key with CALCOM_TELEMETRY_DISABLED --- Dockerfile | 4 ++-- README.md | 4 ++-- docker-compose.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7bd8155..e0dbbe1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /calcom ARG NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000 ARG NEXT_PUBLIC_APP_URL ARG NEXT_PUBLIC_LICENSE_CONSENT -ARG NEXT_PUBLIC_TELEMETRY_KEY=js.2pvs2bbpqq1zxna97wcml.oi2jzirnbj1ev4tc57c5r +ARG CALCOM_TELEMETRY_DISABLED ARG DATABASE_URL ARG NEXTAUTH_SECRET=secret ARG CALENDSO_ENCRYPTION_KEY=secret @@ -12,7 +12,7 @@ ARG CALENDSO_ENCRYPTION_KEY=secret ENV NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL \ NEXT_PUBLIC_APP_URL=$NEXT_PUBLIC_APP_URL \ NEXT_PUBLIC_LICENSE_CONSENT=$NEXT_PUBLIC_LICENSE_CONSENT \ - NEXT_PUBLIC_TELEMETRY_KEY=$NEXT_PUBLIC_TELEMETRY_KEY \ + CALCOM_TELEMETRY_DISABLED=$CALCOM_TELEMETRY_DISABLED \ DATABASE_URL=$DATABASE_URL \ NEXTAUTH_SECRET=${NEXTAUTH_SECRET} \ CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY} diff --git a/README.md b/README.md index a73a43e..cd4e7f6 100644 --- a/README.md +++ b/README.md @@ -108,13 +108,13 @@ Note: `docker compose` without the hyphen is now the primary method of using doc These variables must be provided at the time of the docker build, and can be provided by updating the .env file. Currently, if you require changes to these variables, you must follow the instructions to build and publish your own image. -Changing these variables is not required for evaluation, but is required for running in production. Instructions for generating variables can be found in the [cal.com instructions](https://github.com/calcom/cal.com) +Updating these variables is not required for evaluation, but is required for running in production. Instructions for generating variables can be found in the [cal.com instructions](https://github.com/calcom/cal.com) | Variable | Description | Required | Default | | --- | --- | --- | --- | | NEXT_PUBLIC_WEBAPP_URL | Base URL injected into static files | required | `http://localhost:3000` | | NEXT_PUBLIC_LICENSE_CONSENT | license consent - true/false | | | -| NEXT_PUBLIC_TELEMETRY_KEY | NEXT telemetry key | required | `js.2pvs2bbpqq1zxna97wcml.oi2jzirnbj1ev4tc57c5r` | +| CALCOM_TELEMETRY_DISABLED | Allow cal.com to collect anonymous usage data (set to `1` to disable) | | | | DATABASE_URL | database url with credentials | required | `postgresql://unicorn_user:magical_password@database:5432/calendso` | | NEXTAUTH_SECRET | Cookie encryption key | required | `secret` | | CALENDSO_ENCRYPTION_KEY | Authentication encryption key | required | `secret` | diff --git a/docker-compose.yaml b/docker-compose.yaml index d6d409d..3629b25 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -26,7 +26,7 @@ services: args: - NEXT_PUBLIC_WEBAPP_URL=${NEXT_PUBLIC_WEBAPP_URL} - NEXT_PUBLIC_LICENSE_CONSENT=${NEXT_PUBLIC_LICENSE_CONSENT} - - NEXT_PUBLIC_TELEMETRY_KEY=${NEXT_PUBLIC_TELEMETRY_KEY} + - CALCOM_TELEMETRY_DISABLED=${CALCOM_TELEMETRY_DISABLED} - NEXTAUTH_SECRET=${NEXTAUTH_SECRET} - CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY} - DATABASE_URL=${DATABASE_URL} From 0de4e2a0caf918ac7a892ff02ee089af7624915a Mon Sep 17 00:00:00 2001 From: Colin Griffin Date: Wed, 15 Jun 2022 16:36:29 -0400 Subject: [PATCH 8/8] replace telemetry key variable with boolean --- .env.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 3504c65..940a0a7 100644 --- a/.env.example +++ b/.env.example @@ -28,8 +28,8 @@ DATABASE_HOST=database:5432 DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}/${POSTGRES_DB} GOOGLE_API_CREDENTIALS={} -# Remove this var if you don't want Calendso to collect anonymous usage -NEXT_PUBLIC_TELEMETRY_KEY=js.2pvs2bbpqq1zxna97wcml.oi2jzirnbj1ev4tc57c5r +# Set this to '1' if you don't want Cal to collect anonymous usage +CALCOM_TELEMETRY_DISABLED= # Used for the Office 365 / Outlook.com Calendar integration MS_GRAPH_CLIENT_ID=