Skip to content

Commit 4bb092c

Browse files
authored
docs: Updated getting started process (calcom#23920)
* Updated gettintg started process * updated the common errors and added an advanced section to link to the docker repo
1 parent e1f7e94 commit 4bb092c

1 file changed

Lines changed: 88 additions & 12 deletions

File tree

docs/self-hosting/docker.mdx

Lines changed: 88 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@ title: "Docker"
33
icon: "docker"
44
---
55

6-
The Docker configuration for Cal is an effort powered by people within the community. Cal.com, Inc. does not provide official support for Docker, but we will accept fixes and documentation. Use at your own risk.
6+
### Introduction
7+
8+
This image can be found on DockerHub at https://hub.docker.com/r/calcom/cal.com.
9+
10+
Note for ARM Users: Use the {version}-arm suffix for pulling images. Example: `docker pull calcom/cal.com:v5.6.19-arm`.
11+
12+
### Contributing
13+
14+
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.
715

816
If you want to contribute to the Docker repository, [reply here](https://github.com/calcom/docker/discussions/32).
917

@@ -26,24 +34,63 @@ Note: `docker compose` without the hyphen is now the primary method of using doc
2634
2. Change into the directory
2735

2836
```
29-
cd calcom-docker
37+
cd docker
3038
```
3139

32-
4. Rename `.env.example` to `.env` and then update `.env`
40+
3. Prepare your configuration: Rename .env.example to .env and then update .env
41+
```
42+
cp .env.example .env
43+
```
44+
Most configurations can be left as-is, but for configuration options see Important Run-time variables below.
3345

34-
5. Build and start Cal.com via docker compose
46+
Update the appropriate values in your .env file, then proceed.
47+
48+
4. (optional) Pre-Pull the images by running the following command
3549

3650
```
37-
docker compose up --build
51+
docker compose pull
3852
```
53+
5. Start Cal.com via docker compose
3954

40-
6. (First Run) Open a browser to [http://localhost:5555](http://localhost:5555/) to look at or modify the database content.
41-
42-
a. Click on the `User` model to add a new user record.
43-
44-
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.
55+
(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:
56+
57+
```bash
58+
docker compose up -d
59+
```
4560

46-
7. Open a browser to [http://localhost:3000](http://localhost:3000/) and login with your just created, first user.
61+
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:
62+
63+
```bash
64+
docker compose up -d calcom studio
65+
```
66+
67+
To run only the Cal.com web app, ensure that DATABASE_URL is configured for an available database and run:
68+
69+
```bash
70+
docker compose up -d calcom
71+
```
72+
73+
6. 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!
74+
75+
### Update Calcom Instance
76+
77+
1. Stop the Cal.com stack
78+
79+
```bash
80+
docker compose down
81+
```
82+
83+
2. Pull the latest changes
84+
85+
```bash
86+
docker compose pull
87+
```
88+
3. Update environment variables as necessary.
89+
4. Re-start the Cal.com stack
90+
91+
```bash
92+
docker compose up -d
93+
```
4794

4895
### Configuration
4996

@@ -61,8 +108,37 @@ These variables must be provided at the time of the docker build, and can be pro
61108

62109
* NEXTAUTH_SECRET
63110

64-
### Troubleshooting
111+
## Advanced Users - Building and Configuring
112+
113+
Check out the [Cal.com Docker](https://github.com/calcom/docker) repository for more detailed instructions on how to build and configure your own Docker image.
114+
115+
## Troubleshooting
65116

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

68119
* 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.
120+
121+
### CLIENT_FETCH_ERROR
122+
123+
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. You may be able to correct this by configuring `NEXTAUTH_URL=http://localhost:3000/api/auth`, to help the backend loop back to itself.
124+
```
125+
docker-calcom-1 | @calcom/web:start: [next-auth][error][CLIENT_FETCH_ERROR]
126+
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 {
127+
docker-calcom-1 | @calcom/web:start: error: {
128+
docker-calcom-1 | @calcom/web:start: message: 'request to http://testing.localhost:3000/api/auth/session failed, reason: getaddrinfo ENOTFOUND testing.localhost',
129+
docker-calcom-1 | @calcom/web:start: stack: 'FetchError: request to http://testing.localhost:3000/api/auth/session failed, reason: getaddrinfo ENOTFOUND testing.localhost\n' +
130+
docker-calcom-1 | @calcom/web:start: ' at ClientRequest.<anonymous> (/calcom/node_modules/next/dist/compiled/node-fetch/index.js:1:65756)\n' +
131+
docker-calcom-1 | @calcom/web:start: ' at ClientRequest.emit (node:events:513:28)\n' +
132+
docker-calcom-1 | @calcom/web:start: ' at ClientRequest.emit (node:domain:489:12)\n' +
133+
docker-calcom-1 | @calcom/web:start: ' at Socket.socketErrorListener (node:_http_client:494:9)\n' +
134+
docker-calcom-1 | @calcom/web:start: ' at Socket.emit (node:events:513:28)\n' +
135+
docker-calcom-1 | @calcom/web:start: ' at Socket.emit (node:domain:489:12)\n' +
136+
docker-calcom-1 | @calcom/web:start: ' at emitErrorNT (node:internal/streams/destroy:157:8)\n' +
137+
docker-calcom-1 | @calcom/web:start: ' at emitErrorCloseNT (node:internal/streams/destroy:122:3)\n' +
138+
docker-calcom-1 | @calcom/web:start: ' at processTicksAndRejections (node:internal/process/task_queues:83:21)',
139+
docker-calcom-1 | @calcom/web:start: name: 'FetchError'
140+
docker-calcom-1 | @calcom/web:start: },
141+
docker-calcom-1 | @calcom/web:start: url: 'http://testing.localhost:3000/api/auth/session',
142+
docker-calcom-1 | @calcom/web:start: message: 'request to http://testing.localhost:3000/api/auth/session failed, reason: getaddrinfo ENOTFOUND testing.localhost'
143+
docker-calcom-1 | @calcom/web:start: }
144+
```

0 commit comments

Comments
 (0)