From 3d916679b85f5b938887c38f988664bc69ab13d7 Mon Sep 17 00:00:00 2001 From: Colin Griffin Date: Tue, 29 Nov 2022 12:10:21 -0500 Subject: [PATCH 1/4] update readme with instructions for running without building --- README.md | 108 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 84 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index ad2818c..d36a283 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,71 @@ Make sure you have `docker` & `docker compose` installed on the server / system. Note: `docker compose` without the hyphen is now the primary method of using docker-compose, per the Docker documentation. -## Getting Started +## (Most users) Running Cal.com with Docker Compose + +If you are evaluating Cal.com or running with minimal to no modifications, this option is for you. + +1. Clone calcom-docker + + ```bash + git clone https://github.com/calcom/docker.git calcom-docker + ``` + +2. Change into the directory + + ```bash + cd calcom-docker + ``` + +3. Prepare your configuration: Rename `.env.example` to `.env` and then update `.env` + + Most configurations can be left as-is, but for configuration options see [Important Run-time variables](#important-run-time-variables) below. Update the appropriate values in your .env file, then proceed. + +4. Start Cal.com via docker compose + + (Most basic users, and for First Run) To run the complete stack, which includes a local Postgres database, Cal.com web app, and Prisma Studio: + + ```bash + docker compose up -d + ``` + + To run Cal.com web app and Prisma Studio against a remote database, ensure that DATABASE_URL is configured for an available database and run: + + ```bash + docker compose up -d calcom studio + ``` + + To run only the Cal.com web app, ensure that DATABASE_URL is configured for an available database and run: + + ```bash + docker compose up -d calcom + ``` + + **Note: to run in attached mode for debugging, remove `-d` from your desired run command.** + +5. Open a browser to [http://localhost:3000](http://localhost:3000), or your defined NEXT_PUBLIC_WEBAPP_URL. The first time you run Cal.com, a setup wizard will initialize. Define your first user, and you're ready to go! + +## Updating Cal.com + +1. Stop the Cal.com stack + + ```bash + docker compose down + ``` + +2. Pull the latest changes + + ```bash + docker compose pull + ``` +3. Update env vars as necessary. +4. Re-start the Cal.com stack + + ```bash + docker compose up -d + ``` + +## (Advanced users) Build and Run Cal.com 1. Clone calcom-docker @@ -54,6 +118,8 @@ Note: `docker compose` without the hyphen is now the primary method of using doc 4. Rename `.env.example` to `.env` and then update `.env` + For configuration options see [Build-time variables](#build-time-variables) below. Update the appropriate values in your .env file, then proceed. + 5. Build the Cal.com docker image: Note: Due to application configuration requirements, an available database is currently required during the build process. @@ -94,31 +160,10 @@ Note: `docker compose` without the hyphen is now the primary method of using doc **Note: to run in attached mode for debugging, remove `-d` from your desired run command.** -8. (First Run) Open a browser to [http://localhost:5555](http://localhost:5555) to look at or modify the database content. - - a. Click on the `User` model to add a new user record. - - b. Fill out the fields (remembering to encrypt your password with [BCrypt](https://bcrypt-generator.com/)) and click `Save 1 Record` to create your first user. - -9. Open a browser to [http://localhost:3000](http://localhost:3000) (or your appropriately configured NEXT_PUBLIC_WEBAPP_URL) and login with your just created, first user. +8. Open a browser to [http://localhost:3000](http://localhost:3000), or your defined NEXT_PUBLIC_WEBAPP_URL. The first time you run Cal.com, a setup wizard will initialize. Define your first user, and you're ready to go! ## Configuration -### Build-time variables - -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. - -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 | optional | `http://localhost:3000` | -| NEXT_PUBLIC_LICENSE_CONSENT | license consent - true/false | | | -| 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` | - ### Important Run-time variables These variables must also be provided at runtime @@ -132,11 +177,26 @@ These variables must also be provided at runtime | CALENDSO_ENCRYPTION_KEY | must match build variable | required | `secret` | | DATABASE_URL | database url with credentials | required | `postgresql://unicorn_user:magical_password@database:5432/calendso` | +### Build-time variables + +If building the image yourself, 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. + +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 | optional | `http://localhost:3000` | +| NEXT_PUBLIC_LICENSE_CONSENT | license consent - true/false | | | +| 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` | + ## Git Submodules This repository uses a git submodule. -To update the calcom submodule, use the following command: +For users building their own images, to update the calcom submodule, use the following command: ```bash git submodule update --remote --init From 7cc28f2ad2028bbebc8bffc6e51883964e015e7d Mon Sep 17 00:00:00 2001 From: Colin Griffin Date: Tue, 29 Nov 2022 12:13:30 -0500 Subject: [PATCH 2/4] clarify clone and env steps --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d36a283..4ee9538 100644 --- a/README.md +++ b/README.md @@ -37,18 +37,24 @@ If you are evaluating Cal.com or running with minimal to no modifications, this 1. Clone calcom-docker ```bash - git clone https://github.com/calcom/docker.git calcom-docker + git clone https://github.com/calcom/docker.git ``` 2. Change into the directory ```bash - cd calcom-docker + cd docker ``` 3. Prepare your configuration: Rename `.env.example` to `.env` and then update `.env` - Most configurations can be left as-is, but for configuration options see [Important Run-time variables](#important-run-time-variables) below. Update the appropriate values in your .env file, then proceed. + ```bash + cp .env.example .env + ``` + + Most configurations can be left as-is, but for configuration options see [Important Run-time variables](#important-run-time-variables) below. + + Update the appropriate values in your .env file, then proceed. 4. Start Cal.com via docker compose From 0ada63b210094eb55466a2b21047b1231f2a12e1 Mon Sep 17 00:00:00 2001 From: Colin Griffin Date: Tue, 29 Nov 2022 19:51:21 -0500 Subject: [PATCH 3/4] clarify repo path --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4ee9538..593e6be 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Note: `docker compose` without the hyphen is now the primary method of using doc If you are evaluating Cal.com or running with minimal to no modifications, this option is for you. -1. Clone calcom-docker +1. Clone calcom/docker ```bash git clone https://github.com/calcom/docker.git @@ -102,7 +102,7 @@ If you are evaluating Cal.com or running with minimal to no modifications, this ## (Advanced users) Build and Run Cal.com -1. Clone calcom-docker +1. Clone calcom/docker ```bash git clone https://github.com/calcom/docker.git calcom-docker From 488814cfe8bb38e933f5f47c5b8ea99bc7c6de4a Mon Sep 17 00:00:00 2001 From: Colin Griffin Date: Tue, 29 Nov 2022 19:53:58 -0500 Subject: [PATCH 4/4] update project logo section --- README.md | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 593e6be..a538807 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,29 @@ -
+

- Logo -
- Website - · - Community Support -

+ Logo + + + +

Cal.com (formerly Calendso)

+ +

+ The open-source Calendly alternative. (Docker Edition) +
+ Learn more » +
+
+ Slack + · + Website + · + Core Cal.com related Issues + · + Docker specific Issues + · + Roadmap +

+

# Docker