Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm #59

Open
wants to merge 66 commits into
base: main
Choose a base branch
from
Open

Helm #59

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
8d375c3
Auto updated submodule references
actions-user Dec 22, 2021
bce4611
calendso README + Chart
yousrabahrouni Dec 22, 2021
75b35f7
Auto updated submodule references
actions-user Dec 23, 2021
74bb29c
Auto updated submodule references
actions-user Dec 28, 2021
3cfffb7
Auto updated submodule references
actions-user Dec 29, 2021
04b9f2d
Auto updated submodule references
actions-user Dec 30, 2021
77f974c
Auto updated submodule references
actions-user Dec 31, 2021
563e74e
Merge branch 'main' of https://github.com/calendso/docker
finaldzn Jan 3, 2022
61b3315
Merge branch 'calendso:main' into main
finaldzn Jan 3, 2022
ecd94a6
Merge branch 'main' into helm
finaldzn Jan 3, 2022
97599d4
move readme of calendso chart into calendso folder
finaldzn Jan 3, 2022
a98a7a7
Auto updated submodule references
actions-user Jan 4, 2022
83f9b21
Auto updated submodule references
actions-user Jan 5, 2022
e28deef
Auto updated submodule references
actions-user Jan 7, 2022
1cbb704
Auto updated submodule references
actions-user Jan 8, 2022
13b9d2d
Auto updated submodule references
actions-user Jan 9, 2022
cd2e862
Auto updated submodule references
actions-user Jan 11, 2022
b28bc0a
Auto updated submodule references
actions-user Jan 12, 2022
36d8396
Auto updated submodule references
actions-user Jan 13, 2022
365c85d
Auto updated submodule references
actions-user Jan 14, 2022
f568432
Auto updated submodule references
actions-user Jan 15, 2022
fde500a
Auto updated submodule references
actions-user Jan 16, 2022
a11dc99
Auto updated submodule references
actions-user Jan 18, 2022
21eb5d7
Auto updated submodule references
actions-user Jan 19, 2022
6c3a0e0
Auto updated submodule references
actions-user Jan 20, 2022
adcab16
Auto updated submodule references
actions-user Jan 21, 2022
832f2f7
Auto updated submodule references
actions-user Jan 22, 2022
78aeda2
Merge branch 'helm' of https://github.com/medconnectmd/docker into helm
finaldzn Jan 24, 2022
3c83161
updated readme and deployment.yaml
finaldzn Jan 24, 2022
8b529dd
Merge branch 'main' of https://github.com/calendso/docker into helm
finaldzn Jan 24, 2022
f2a44b7
Merge branch 'calendso:main' into main
finaldzn Jan 24, 2022
7486e65
fix typo
finaldzn Jan 24, 2022
b83f68e
changed typoe
finaldzn Jan 24, 2022
8cba1c2
Auto updated submodule references
actions-user Jan 25, 2022
934c348
Auto updated submodule references
actions-user Jan 26, 2022
6ab9938
Auto updated submodule references
actions-user Jan 27, 2022
69d344f
Auto updated submodule references
actions-user Jan 28, 2022
0c36da2
Auto updated submodule references
actions-user Jan 29, 2022
b5b0370
Auto updated submodule references
actions-user Jan 30, 2022
3881299
Auto updated submodule references
actions-user Feb 1, 2022
84150e3
Auto updated submodule references
actions-user Feb 2, 2022
87892c4
Auto updated submodule references
actions-user Feb 3, 2022
8cb78a7
Auto updated submodule references
actions-user Feb 4, 2022
153d98e
Auto updated submodule references
actions-user Feb 5, 2022
bf38ce5
Auto updated submodule references
actions-user Feb 7, 2022
6d53b5c
Auto updated submodule references
actions-user Feb 8, 2022
6bedaa0
Auto updated submodule references
actions-user Feb 9, 2022
dbc1976
Auto updated submodule references
actions-user Feb 10, 2022
fe5c611
Auto updated submodule references
actions-user Feb 11, 2022
9c4c63a
Auto updated submodule references
actions-user Feb 12, 2022
75cf79f
Auto updated submodule references
actions-user Feb 14, 2022
7f3e33a
Auto updated submodule references
actions-user Feb 15, 2022
c3c6dbe
Merge branch 'main' of https://github.com/calcom/docker into calcom-main
finaldzn Feb 15, 2022
ab7ebdf
Merge branch 'calcom-main' into helm
finaldzn Feb 15, 2022
29dcd32
Auto updated submodule references
actions-user Feb 16, 2022
ec94bba
Auto updated submodule references
actions-user Feb 17, 2022
8c55c2f
Auto updated submodule references
actions-user Feb 18, 2022
9253d68
Auto updated submodule references
actions-user Feb 19, 2022
211f55c
Auto updated submodule references
actions-user Feb 20, 2022
a486afa
Auto updated submodule references
actions-user Feb 21, 2022
4f71a04
Auto updated submodule references
actions-user Feb 22, 2022
8001eeb
Auto updated submodule references
actions-user Feb 23, 2022
2a187e6
update calendso
Jul 25, 2022
da76ac2
Merge remote-tracking branch 'origin/main' into helm
Jul 25, 2022
51edd02
Merge remote-tracking branch 'upstream/main'
Jul 25, 2022
7dbe617
Merge remote-tracking branch 'origin/main' into helm
Jul 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
302 changes: 154 additions & 148 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,148 +1,154 @@
<!-- PROJECT LOGO -->
<div align="right">
<a href="https://github.com/calcom/cal.com">
<img src="https://cal.com/logo.svg" alt="Logo" width="160" height="65">
</a><br/>
<a href="https://cal.com">Website</a>
·
<a href="https://github.com/calcom/docker/issues">Community Support</a>
</div>

# Docker

NOTE: DockerHub organization has not yet been renamed.

This image can be found on DockerHub at [https://hub.docker.com/r/calendso/calendso](https://hub.docker.com/r/calendso/calendso)

The Docker configuration for Cal.com is an effort powered by people within the community. Cal.com, Inc. does not yet provide official support for Docker, but we will accept fixes and documentation at this time. Use at your own risk.

## Important Notes

This Docker Image is managed by the Cal.com Community. Support for this image can be found via the repository, located at [https://github.com/calcom/docker](https://github.com/calcom/docker)

Currently, this image is intended for local development/evaluation use only, as there are specific requirements for providing environmental variables at build-time in order to specify a non-localhost BASE_URL. (this is due to the nature of the static site compilation, which embeds the variable values). The ability to update these variables at runtime is in-progress and will be available in the future.

For Production, for the time being, please checkout the repository and build/push your own image privately.

## Requirements

Make sure you have `docker` & `docker compose` installed on the server / system. Both are installed by most docker utilities, including Docker Desktop and Rancher Desktop.

Note: `docker compose` without the hyphen is now the primary method of using docker-compose, per the Docker documentation.

## Getting Started

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. Update the calcom submodule.

```bash
git submodule update --remote --init
```

Note: DO NOT use recursive submodule update, otherwise you will receive a git authentication error.

4. Rename `.env.example` to `.env` and then update `.env`

5. Build the Cal.com docker image:

Note: Due to application configuration requirements, an available database is currently required during the build process.

a) If hosting elsewhere, configure the `DATABASE_URL` in the .env file, and skip the next step

b) If a local or temporary database is required, start a local database via docker compose.

```bash
docker compose up -d database
```

6. Build Cal.com via docker compose (DOCKER_BUILDKIT=0 must be provided to allow a network bridge to be used at build time. This requirement will be removed in the future)

```bash
DOCKER_BUILDKIT=0 docker compose build calcom
```

7. 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.**

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.

## 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 | required | `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

| Variable | Description | Required | Default |
| --- | --- | --- | --- |
| CALCOM_LICENSE_KEY | Enterprise License Key | | |
| 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` |

## Git Submodules

This repository uses a git submodule.

To update the calcom submodule, use the following command:

```bash
git submodule update --remote --init
```

For more advanced usage, please refer to the git documentation: [https://git-scm.com/book/en/v2/Git-Tools-Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules)

## 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.
<!-- PROJECT LOGO -->
<div align="right">
<a href="https://github.com/calcom/cal.com">
<img src="https://cal.com/logo.svg" alt="Logo" width="160" height="65">
</a><br/>
<a href="https://cal.com">Website</a>
·
<a href="https://github.com/calcom/docker/issues">Community Support</a>
</div>

# Docker

NOTE: DockerHub organization has not yet been renamed.

This image can be found on DockerHub at [https://hub.docker.com/r/calendso/calendso](https://hub.docker.com/r/calendso/calendso)

The Docker configuration for Cal.com is an effort powered by people within the community. Cal.com, Inc. does not yet provide official support for Docker, but we will accept fixes and documentation at this time. Use at your own risk.

## Important Notes

This Docker Image is managed by the Cal.com Community. Support for this image can be found via the repository, located at [https://github.com/calcom/docker](https://github.com/calcom/docker)

Currently, this image is intended for local development/evaluation use only, as there are specific requirements for providing environmental variables at build-time in order to specify a non-localhost BASE_URL. (this is due to the nature of the static site compilation, which embeds the variable values). The ability to update these variables at runtime is in-progress and will be available in the future.

For Production, for the time being, please checkout the repository and build/push your own image privately.

## Requirements

Make sure you have `docker` & `docker compose` installed on the server / system. Both are installed by most docker utilities, including Docker Desktop and Rancher Desktop.

Note: `docker compose` without the hyphen is now the primary method of using docker-compose, per the Docker documentation.

## Getting Started

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. Update the calcom submodule.

```bash
git submodule update --remote --init
```

Note: DO NOT use recursive submodule update, otherwise you will receive a git authentication error.

4. Rename `.env.example` to `.env` and then update `.env`

5. Build the Cal.com docker image:

Note: Due to application configuration requirements, an available database is currently required during the build process.

a) If hosting elsewhere, configure the `DATABASE_URL` in the .env file, and skip the next step

b) If a local or temporary database is required, start a local database via docker compose.

```bash
docker compose up -d database
```

6. Build Cal.com via docker compose (DOCKER_BUILDKIT=0 must be provided to allow a network bridge to be used at build time. This requirement will be removed in the future)

```bash
DOCKER_BUILDKIT=0 docker compose build calcom
```

7. 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.**

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.

## 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 | required | `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

| Variable | Description | Required | Default |
| --- | --- | --- | --- |
| CALCOM_LICENSE_KEY | Enterprise License Key | | |
| 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` |

## Git Submodules

This repository uses a git submodule.

To update the calcom submodule, use the following command:

```bash
git submodule update --remote --init
```

For more advanced usage, please refer to the git documentation: [https://git-scm.com/book/en/v2/Git-Tools-Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules)


## Helm and K8S

Please read the [Helm Chart README](./chart/calendso-chart/README.md) for more informations


## 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.
23 changes: 23 additions & 0 deletions chart/calendso-chart/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
6 changes: 6 additions & 0 deletions chart/calendso-chart/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 10.9.5
digest: sha256:a555b5ad8fb0f50610f8f2c1dc89debb1d542f23b920b096fcd4ee56597cb011
generated: "2021-11-15T16:31:07.4187218+01:00"
6 changes: 6 additions & 0 deletions chart/calendso-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v2
name: calendso
description: A Helm chart for Calendso
type: application
version: 0.1.0
appVersion: "latest"