Compare commits

..

2 Commits

Author SHA1 Message Date
Colin Griffin
3a030784b6 remove armv6 2022-08-23 07:29:57 -04:00
Colin Griffin
32e3bd8de9 add armv7 and armv6, and switch build tag to canary 2022-08-23 07:26:07 -04:00
13 changed files with 80 additions and 318 deletions

View File

@@ -14,9 +14,6 @@ LICENSE=
NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000 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 # It is highly recommended that the NEXTAUTH_SECRET must be overridden and very unique
# Use `openssl rand -base64 32` to generate a key # Use `openssl rand -base64 32` to generate a key
NEXTAUTH_SECRET=secret NEXTAUTH_SECRET=secret

View File

@@ -1,7 +0,0 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

View File

@@ -5,10 +5,7 @@ name: Build and push image to DockerHub
# Controls when the workflow will run # Controls when the workflow will run
on: on:
push: push:
branches: branches: [main]
- 'main'
tags:
- 'v*'
# update on run of Update Calendso nightly submodule update # update on run of Update Calendso nightly submodule update
workflow_run: workflow_run:
workflows: ["Update Calendso"] workflows: ["Update Calendso"]
@@ -23,6 +20,9 @@ on:
# release: # release:
# types: [ created ] # types: [ created ]
# # Allows you to run this workflow manually from the Actions tab
# workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel # A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs: jobs:
# This workflow contains a single job called "build" # This workflow contains a single job called "build"
@@ -34,14 +34,16 @@ jobs:
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: checkout - name: checkout
uses: actions/checkout@v3 uses: actions/checkout@v2
- name: Git submodule update - name: Git submodule update
run: | run: |
git submodule update --init git submodule update --init
- name: Log in to the Docker Hub registry - name: Docker Login
uses: docker/login-action@v2 # You may pin to the exact commit or the version.
# uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v1.10.0
with: with:
# Username used to log against the Docker registry # Username used to log against the Docker registry
username: ${{ secrets.DOCKER_HUB_USERNAME }} username: ${{ secrets.DOCKER_HUB_USERNAME }}
@@ -50,21 +52,9 @@ jobs:
# Log out from the Docker registry at the end of a job # Log out from the Docker registry at the end of a job
logout: true # optional, default is true logout: true # optional, default is true
- name: Log in to the Github Container registry - name: Set up Docker builder
uses: docker/login-action@v2 id: buildx
with: uses: docker/setup-buildx-action@v1.6.0
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
docker.io/calendso/calendso
docker.io/calcom/cal.com
ghcr.io/calcom/cal.com
- name: Copy env - name: Copy env
run: | run: |
@@ -73,9 +63,8 @@ jobs:
echo "DATABASE_HOST=localhost:5432" >> $GITHUB_ENV echo "DATABASE_HOST=localhost:5432" >> $GITHUB_ENV
eval $(sed -e '/^#/d' -e 's/^/export /' -e 's/$/;/' .env) ; eval $(sed -e '/^#/d' -e 's/^/export /' -e 's/$/;/' .env) ;
# Temporarily disable ARM build due to runner performance issues - name: Set up QEMU
# - name: Set up QEMU uses: docker/setup-qemu-action@v2
# uses: docker/setup-qemu-action@v2
- name: Start database - name: Start database
run: | run: |
@@ -88,20 +77,16 @@ jobs:
network=container:database network=container:database
buildkitd-flags: | buildkitd-flags: |
--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
# config-inline: |
# [worker.oci]
# max-parallelism = 1
- name: Build and push image - name: Build and push image
id: docker_build id: docker_build
uses: docker/build-push-action@v4 uses: docker/build-push-action@v3
with: with:
context: ./ context: ./
file: ./Dockerfile file: ./Dockerfile
push: ${{ github.event_name != 'pull_request' }} push: true
platforms: linux/amd64 platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: ${{ steps.meta.outputs.tags }} tags: docker.io/${{ secrets.DOCKER_HUB_USERNAME }}/calendso:canary
labels: ${{ steps.meta.outputs.labels }}
build-args: | build-args: |
NEXT_PUBLIC_WEBAPP_URL=${{ env.NEXT_PUBLIC_WEBAPP_URL }} NEXT_PUBLIC_WEBAPP_URL=${{ env.NEXT_PUBLIC_WEBAPP_URL }}
NEXT_PUBLIC_LICENSE_CONSENT=${{ env.NEXT_PUBLIC_LICENSE_CONSENT }} NEXT_PUBLIC_LICENSE_CONSENT=${{ env.NEXT_PUBLIC_LICENSE_CONSENT }}

View File

@@ -1,14 +0,0 @@
name: Export Scarf data
on:
schedule:
- cron: '0 0 * * *'
jobs:
export-scarf-data:
runs-on: ubuntu-latest
steps:
- uses: docker://scarf.docker.scarf.sh/scarf-sh/scarf-postgres-exporter:latest
env:
SCARF_API_TOKEN: ${{ secrets.SCARF_API_TOKEN }}
SCARF_ENTITY_NAME: Calcom
PSQL_CONN_STRING: ${{ secrets.PSQL_CONN_STRING }}

View File

@@ -13,7 +13,7 @@ jobs:
shell: bash shell: bash
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v3 uses: actions/checkout@v2
- name: Git submodule update - name: Git submodule update
run: | run: |

View File

@@ -1,7 +1,8 @@
FROM node:18 as builder FROM node:16 as builder
WORKDIR /calcom WORKDIR /calcom
ARG NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
ARG NEXT_PUBLIC_APP_URL
ARG NEXT_PUBLIC_LICENSE_CONSENT ARG NEXT_PUBLIC_LICENSE_CONSENT
ARG CALCOM_TELEMETRY_DISABLED ARG CALCOM_TELEMETRY_DISABLED
ARG DATABASE_URL ARG DATABASE_URL
@@ -9,7 +10,8 @@ ARG NEXTAUTH_SECRET=secret
ARG CALENDSO_ENCRYPTION_KEY=secret ARG CALENDSO_ENCRYPTION_KEY=secret
ARG MAX_OLD_SPACE_SIZE=4096 ARG MAX_OLD_SPACE_SIZE=4096
ENV NEXT_PUBLIC_WEBAPP_URL=http://NEXT_PUBLIC_WEBAPP_URL_PLACEHOLDER \ 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_LICENSE_CONSENT=$NEXT_PUBLIC_LICENSE_CONSENT \
CALCOM_TELEMETRY_DISABLED=$CALCOM_TELEMETRY_DISABLED \ CALCOM_TELEMETRY_DISABLED=$CALCOM_TELEMETRY_DISABLED \
DATABASE_URL=$DATABASE_URL \ DATABASE_URL=$DATABASE_URL \
@@ -17,58 +19,31 @@ ENV NEXT_PUBLIC_WEBAPP_URL=http://NEXT_PUBLIC_WEBAPP_URL_PLACEHOLDER \
CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY} \ CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY} \
NODE_OPTIONS=--max-old-space-size=${MAX_OLD_SPACE_SIZE} NODE_OPTIONS=--max-old-space-size=${MAX_OLD_SPACE_SIZE}
COPY calcom/package.json calcom/yarn.lock calcom/.yarnrc.yml calcom/playwright.config.ts calcom/turbo.json calcom/git-init.sh calcom/git-setup.sh ./ COPY calcom/package.json calcom/yarn.lock calcom/turbo.json ./
COPY calcom/.yarn ./.yarn
COPY calcom/apps/web ./apps/web COPY calcom/apps/web ./apps/web
COPY calcom/packages ./packages COPY calcom/packages ./packages
RUN yarn config set httpTimeout 1200000 && \ RUN yarn config set network-timeout 1000000000 -g && \
npx turbo prune --scope=@calcom/web --docker && \ yarn install --frozen-lockfile
yarn install && \
yarn db-deploy && \
yarn --cwd packages/prisma seed-app-store
RUN yarn turbo run build --filter=@calcom/web RUN yarn build
# RUN yarn plugin import workspace-tools && \ FROM node:16 as runner
# yarn workspaces focus --all --production
RUN rm -rf node_modules/.cache .yarn/cache apps/web/.next/cache
FROM node:18 as builder-two
WORKDIR /calcom WORKDIR /calcom
ARG NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
ENV NODE_ENV production ENV NODE_ENV production
COPY calcom/package.json calcom/.yarnrc.yml calcom/yarn.lock calcom/turbo.json ./ RUN apt-get update && \
COPY calcom/.yarn ./.yarn apt-get -y install netcat && \
rm -rf /var/lib/apt/lists/* && \
npm install --global prisma
COPY calcom/package.json calcom/yarn.lock calcom/turbo.json ./
COPY --from=builder /calcom/node_modules ./node_modules COPY --from=builder /calcom/node_modules ./node_modules
COPY --from=builder /calcom/packages ./packages COPY --from=builder /calcom/packages ./packages
COPY --from=builder /calcom/apps/web ./apps/web COPY --from=builder /calcom/apps/web ./apps/web
COPY --from=builder /calcom/packages/prisma/schema.prisma ./prisma/schema.prisma COPY --from=builder /calcom/packages/prisma/schema.prisma ./prisma/schema.prisma
COPY scripts scripts COPY scripts scripts
# Save value used during this build stage. If NEXT_PUBLIC_WEBAPP_URL and BUILT_NEXT_PUBLIC_WEBAPP_URL differ at
# run-time, then start.sh will find/replace static values again.
ENV NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL \
BUILT_NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL
RUN scripts/replace-placeholder.sh http://NEXT_PUBLIC_WEBAPP_URL_PLACEHOLDER ${NEXT_PUBLIC_WEBAPP_URL}
FROM node:18 as runner
WORKDIR /calcom
COPY --from=builder-two /calcom ./
ARG NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
ENV NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL \
BUILT_NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL
ENV NODE_ENV production
EXPOSE 3000 EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=30s --retries=5 \
CMD wget --spider http://localhost:3000 || exit 1
CMD ["/calcom/scripts/start.sh"] CMD ["/calcom/scripts/start.sh"]

View File

@@ -1 +0,0 @@
FROM calcom.docker.scarf.sh/calcom/cal.com

200
README.md
View File

@@ -1,33 +1,18 @@
<!-- PROJECT LOGO --> <!-- PROJECT LOGO -->
<p align="center"> <div align="right">
<a href="https://github.com/calcom/cal.com"> <a href="https://github.com/calcom/cal.com">
<img src="https://user-images.githubusercontent.com/8019099/133430653-24422d2a-3c8d-4052-9ad6-0580597151ee.png" alt="Logo"> <img src="https://cal.com/logo.svg" alt="Logo" width="160" height="65">
</a><br/>
</a>
<h3 align="center">Cal.com (formerly Calendso)</h3>
<p align="center">
The open-source Calendly alternative. (Docker Edition)
<br />
<a href="https://cal.com"><strong>Learn more »</strong></a>
<br />
<br />
<a href="https://cal.com/slack">Slack</a>
·
<a href="https://cal.com">Website</a> <a href="https://cal.com">Website</a>
· ·
<a href="https://github.com/calcom/cal.com/issues">Core Cal.com related Issues</a> <a href="https://github.com/calcom/docker/issues">Community Support</a>
· </div>
<a href="https://github.com/calcom/docker/issues">Docker specific Issues</a>
·
<a href="https://cal.com/roadmap">Roadmap</a>
</p>
</p>
# Docker # Docker
This image can be found on DockerHub at [https://hub.docker.com/r/calcom/cal.com](https://hub.docker.com/r/calcom/cal.com) 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. 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.
@@ -35,7 +20,7 @@ The Docker configuration for Cal.com is an effort powered by people within the c
This Docker Image is managed by the Cal.com Community. Join the team [here](https://github.com/calcom/docker/discussions/32). Support for this image can be found via the repository, located at [https://github.com/calcom/docker](https://github.com/calcom/docker) This Docker Image is managed by the Cal.com Community. Join the team [here](https://github.com/calcom/docker/discussions/32). 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.** 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. For Production, for the time being, please checkout the repository and build/push your own image privately.
@@ -45,89 +30,9 @@ 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. Note: `docker compose` without the hyphen is now the primary method of using docker-compose, per the Docker documentation.
## (Most users) Running Cal.com with Docker Compose ## Getting Started
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
```
2. Change into the directory
```bash
cd docker
```
3. Prepare your configuration: Rename `.env.example` to `.env` and then update `.env`
```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. (optional) Pre-Pull the images by running the following command:
```bash
docker compose pull
```
This will use the default image locations as specified by `image:` in the docker-compose.yaml file.
Note: To aid with support, by default Scarf.sh is used as registry proxy for download metrics.
5. 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.**
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!
## 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
```bash ```bash
git clone https://github.com/calcom/docker.git calcom-docker git clone https://github.com/calcom/docker.git calcom-docker
@@ -149,8 +54,6 @@ If you are evaluating Cal.com or running with minimal to no modifications, this
4. Rename `.env.example` to `.env` and then update `.env` 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: 5. Build the Cal.com docker image:
Note: Due to application configuration requirements, an available database is currently required during the build process. Note: Due to application configuration requirements, an available database is currently required during the build process.
@@ -191,43 +94,47 @@ If you are evaluating Cal.com or running with minimal to no modifications, this
**Note: to run in attached mode for debugging, remove `-d` from your desired run command.** **Note: to run in attached mode for debugging, remove `-d` from your desired run command.**
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! 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 ## 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 ### Important Run-time variables
These variables must also be provided at runtime These variables must also be provided at runtime
| Variable | Description | Required | Default | | Variable | Description | Required | Default |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| CALCOM_LICENSE_KEY | Enterprise License Key | optional | | | CALCOM_LICENSE_KEY | Enterprise License Key | | |
| 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` |
| 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` | | NEXTAUTH_SECRET | must match build variable | required | `secret` |
| CALENDSO_ENCRYPTION_KEY | 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` | | 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 ## Git Submodules
This repository uses a git submodule. This repository uses a git submodule.
For users building their own images, to update the calcom submodule, use the following command: To update the calcom submodule, use the following command:
```bash ```bash
git submodule update --remote --init git submodule update --remote --init
@@ -237,38 +144,5 @@ For more advanced usage, please refer to the git documentation: [https://git-scm
## Troubleshooting ## Troubleshooting
### SSL edge termination * 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.
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. You may be able to correct this by configuring `NEXTAUTH_URL=http://localhost:3000/api/auth`, to help the backend loop back to itself.
```
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.<anonymous> (/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: }
```
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=81cda9f7-a102-453b-ac01-51c35650bd70" />

2
calcom

Submodule calcom updated: 66d47974cb...6b0ac96b38

View File

@@ -21,14 +21,13 @@ services:
- stack - stack
calcom: calcom:
image: calcom.docker.scarf.sh/calcom/cal.com
build: build:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
args: args:
NEXT_PUBLIC_WEBAPP_URL: ${NEXT_PUBLIC_WEBAPP_URL} NEXT_PUBLIC_WEBAPP_URL: ${NEXT_PUBLIC_WEBAPP_URL}
NEXT_PUBLIC_LICENSE_CONSENT: ${NEXT_PUBLIC_LICENSE_CONSENT} NEXT_PUBLIC_LICENSE_CONSENT: ${NEXT_PUBLIC_LICENSE_CONSENT}
CALCOM_TELEMETRY_DISABLED: ${CALCOM_TELEMETRY_DISABLED} CALCOM_TELEMETRY_DISABLE: ${CALCOM_TELEMETRY_DISABLED}
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET} NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
CALENDSO_ENCRYPTION_KEY: ${CALENDSO_ENCRYPTION_KEY} CALENDSO_ENCRYPTION_KEY: ${CALENDSO_ENCRYPTION_KEY}
DATABASE_URL: ${DATABASE_URL} DATABASE_URL: ${DATABASE_URL}
@@ -46,7 +45,7 @@ services:
# Optional use of Prisma Studio. In production, comment out or remove the section below to prevent unwanted access to your database. # Optional use of Prisma Studio. In production, comment out or remove the section below to prevent unwanted access to your database.
studio: studio:
image: calcom.docker.scarf.sh/calcom/cal.com image: calendso/calendso:latest
restart: always restart: always
networks: networks:
- stack - stack

View File

@@ -1,26 +0,0 @@
services:
- type: web
name: cal-web
plan: standard
repo: https://github.com/calcom/docker.git
dockerfilePath: ./Dockerfile.render
env: docker
envVars:
- key: DATABASE_URL
fromDatabase:
name: cal-postgres
property: connectionString
- key: CALENDSO_ENCRYPTION_KEY
value: secret
- key: NEXTAUTH_SECRET
value: secret
- key: CRON_API_KEY
value: 0cc0e6c35519bba620c9360cfe3e68d0
databases:
- name: cal-postgres
plan: starter

View File

@@ -1,16 +0,0 @@
FROM=$1
TO=$2
if [ "${FROM}" = "${TO}" ]; then
echo "Nothing to replace, the value is already set to ${TO}."
exit 0
fi
# Only peform action if $FROM and $TO are different.
echo "Replacing all statically built instances of $FROM with $TO."
find apps/web/.next/ apps/web/public -type f |
while read file; do
sed -i "s|$FROM|$TO|g" "$file"
done

View File

@@ -1,10 +1,6 @@
#!/bin/sh #!/bin/sh
set -x set -x
# Replace the statically built BUILT_NEXT_PUBLIC_WEBAPP_URL with run-time NEXT_PUBLIC_WEBAPP_URL
# NOTE: if these values are the same, this will be skipped.
scripts/replace-placeholder.sh "$BUILT_NEXT_PUBLIC_WEBAPP_URL" "$NEXT_PUBLIC_WEBAPP_URL"
scripts/wait-for-it.sh ${DATABASE_HOST} -- echo "database is up" scripts/wait-for-it.sh ${DATABASE_HOST} -- echo "database is up"
npx prisma migrate deploy --schema /calcom/packages/prisma/schema.prisma npx prisma migrate deploy --schema /calcom/packages/prisma/schema.prisma
npx ts-node --transpile-only /calcom/packages/prisma/seed-app-store.ts npx ts-node --transpile-only /calcom/packages/prisma/seed-app-store.ts