Coder Social home page Coder Social logo

calcom / docker Goto Github PK

View Code? Open in Web Editor NEW
573.0 573.0 293.0 460 KB

The Docker configuration for Cal.com 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.

License: MIT License

Shell 64.72% Dockerfile 35.28%

docker's Introduction

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

This image can be found on DockerHub at https://hub.docker.com/r/calcom/cal.com

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. Join the team here. Support for this image can be found via the repository, located at 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.

(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

    git clone https://github.com/calcom/docker.git
  2. Change into the directory

    cd docker
  3. Prepare your configuration: Rename .env.example to .env and then update .env

    cp .env.example .env

    Most configurations can be left as-is, but for configuration options see 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:

    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:

    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:

    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:

    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, 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

    docker compose down
  2. Pull the latest changes

    docker compose pull
  3. Update env vars as necessary.

  4. Re-start the Cal.com stack

    docker compose up -d

(Advanced users) Build and Run Cal.com

  1. Clone calcom/docker

    git clone https://github.com/calcom/docker.git calcom-docker
  2. Change into the directory

    cd calcom-docker
  3. Update the calcom submodule.

    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

    For configuration options see 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.

    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.

    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)

    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:

    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:

    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:

    docker compose up -d calcom

    Note: to run in attached mode for debugging, remove -d from your desired run command.

  8. Open a browser to 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

Important Run-time variables

These variables must also be provided at runtime

Variable Description Required Default
CALCOM_LICENSE_KEY Enterprise License Key optional
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
CALENDSO_ENCRYPTION_KEY must match build variable required secret
DATABASE_URL database url with credentials - if using a connection pooler, this setting should point there required postgresql://unicorn_user:magical_password@database:5432/calendso
DATABASE_DIRECT_URL direct database url with credentials if using a connection pooler (e.g. PgBouncer, Prisma Accelerate, etc.) optional

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

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 - if using a connection pooler, this setting should point there required postgresql://unicorn_user:magical_password@database:5432/calendso
DATABASE_DIRECT_URL direct database url with credentials if using a connection pooler (e.g. PgBouncer, Prisma Accelerate, etc.) optional
NEXTAUTH_SECRET Cookie encryption key required secret
CALENDSO_ENCRYPTION_KEY Authentication encryption key required secret

Git Submodules

This repository uses a git submodule.

For users building their own images, to update the calcom submodule, use the following command:

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

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.

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: }

docker's People

Contributors

actions-user avatar alishaz-polymath avatar anthonyneto avatar arjundevarajan avatar bdeak4 avatar chasebolt avatar conneryn avatar dependabot[bot] avatar emrysal avatar flemming-petersen avatar gabrielwhite avatar glitchwitch avatar jokay avatar kelvinalfaro avatar kovah avatar krumware avatar kuba-orlik avatar leopere avatar m4tze avatar marcmontu avatar mokkin avatar mr-os1 avatar peerrich avatar phishy avatar podviaznikov avatar rberrelleza avatar remram44 avatar w3irdrobot avatar zomars avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker's Issues

Unable to login

I want to test the app inside the docker container

I followed the steps from the README

I used https://bcrypt-generator.com/ to encrypt my password.

but I get

Incorrect password
An error occurred when logging you in. Head back to the login screen and try again.

Deployment error.

Hi,
I am trying to deploy calendso in our docker environment. But I am facing below error,

image

ARM issue calling prima generate

I tried the instructions on my M1 mac and it failed while building the image (M1 macs can run pre-build x86 images if there would have exist one) while invoke prisma generate. It failed with the following error message:

#10 [deps 5/5] RUN yarn install --frozen
#10 sha256:61ed6171176c251b9f58d3be18dab74335c9ebc4e90f4aeec2e877f2ab2c8124
#10 0.385 yarn install v1.22.5
#10 0.401 info No lockfile found.
#10 0.405 [1/4] Resolving packages...
#10 6.656 warning ics > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
#10 8.196 warning next > native-url > [email protected]: The
#10 8.240 warning next > node-libs-browser > url > [email protected]: The
#10 9.088 warning next-auth > [email protected]: The
#10 25.05 [2/4] Fetching packages...
#10 42.31 info [email protected]: The platform "linux" is incompatible with this module.
#10 42.31 info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
#10 42.32 [3/4] Linking dependencies...
#10 49.62 [4/4] Building fresh packages...
#10 50.25 success Saved lockfile.
#10 50.26 $ prisma generate
#10 50.49 Error: Unknown binaryTarget linux-arm-openssl-undefined and no custom binaries were provided
#10 50.50 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
#10 50.50 error Command failed with exit code 1.
#10 ERROR: executor failed running [/bin/sh -c yarn install --frozen]: exit code: 1

Can't login/ configuration problem - "TypeError: Only absolute URLs are supported"

Hey guys,
thanks for your effort in brining calendso to Docker! ❤️
I'm currently writing a blog post/ documentation material how to setup calendso front to finish on a server 📝

However, I'm stuck at the login screen without further error messages and am slowly exhausting my knowledge.
Please feel free to move the issue into calendso's main repository if you see fit.

Let me know if I can provide any more context or details.

The situation

I'm using nginx and have SSL access to the login page via https://date.mysite.com.

The problem

Authentication can't be processed:

calendso_1  | [next-auth][error][client_fetch_error]
calendso_1  | https://next-auth.js.org/errors#client_fetch_error session TypeError: Only absolute URLs are supported
calendso_1  |     at getNodeRequestOptions (/app/node_modules/node-fetch/lib/index.js:1305:9)
calendso_1  |     at /app/node_modules/node-fetch/lib/index.js:1410:19
calendso_1  |     at new Promise (<anonymous>)
calendso_1  |     at fetch (/app/node_modules/node-fetch/lib/index.js:1407:9)
calendso_1  |     at _callee9$ (/app/node_modules/next-auth/dist/client/index.js:625:20)
calendso_1  |     at tryCatch (/app/node_modules/regenerator-runtime/runtime.js:63:40)
calendso_1  |     at Generator.invoke [as _invoke] (/app/node_modules/regenerator-runtime/runtime.js:293:22)
calendso_1  |     at Generator.next (/app/node_modules/regenerator-runtime/runtime.js:118:21)
calendso_1  |     at asyncGeneratorStep (/app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
calendso_1  |     at _next (/app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)

This is what Firefox (89.0.2. Linux) provides me with after I try to login:

image

Strangely, Chromium doesn't even get as far as Firefox and totally messes up the redirection

image

The configuration

env

The insides of . env

BASE_URL="https://date.mysite.com"
NEXTAUTH_URL="https://date.mysite.com"
# Tried providing this as well -> NEXT_PUBLIC_NEXTAUTH_URL="http://date.mysite.com/api/auth"

I tried all possible combinations with/ without http/ https.
Some combinations lead to https://'https//date.mysite.com'/signin?csrf=true

nginx

The relevant aspects of nginx include a redirect to https & hiding the port from the ip.

server {
            listen [::]:443 ssl ipv6only=on; # managed by Certbot
            listen 443 ssl; # managed by Certbot
            ssl_certificate /path/to/your/cert.pem;        
        	ssl_certificate_key /path/to/your/private/key.pem;
            include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
            ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

            location / {
                proxy_pass http://127.0.0.1:3000;
                proxy_set_header Host $host; proxy_set_header
                X-Real-IP $remote_addr; proxy_set_header
                X-Forwarded-For $proxy_add_x_forwarded_for;
            }

        }

        server {
            listen 80 default_server;
            return 301 https://$host$request_uri;
        }

docker-compose

I'm running the docker-compose file with an addition to the networks setting to make the database accessible to calendso

networks:
  customnet:
    name: custom_network

Here's the full docker-compose file

version: '3.5'
services:
  db:
    image: postgres
    restart: always
    volumes:
      - database-data:/var/lib/postgresql/data/
    env_file: .env
    ports:
      - 5432:5432
    networks:
      - customnet
  calendso:
    build: .
    restart: always
    ports:
      - 3000:3000
      - 5555:5555
    env_file: .env
    depends_on:
      - db
    networks:
      - customnet
volumes:
  database-data:

networks:
  customnet:
    name: custom_network

Server start

Lastly, the server starts as it (hopefully) should

calendso_1  | + yarn start
calendso_1  | yarn run v1.22.5
calendso_1  | $ next start
calendso_1  | ready - started server on 0.0.0.0:3000, url: http://localhost:3000
calendso_1  | info  - Using webpack 5. Reason: no next.config.js https://nextjs.org/docs/messages/webpack5

Need some more explanations about some .env variables

I just found out about cal.com and the self-hosted Docker based version a few days ago and would like to give it a spin on my NAS for my own usage. I'd appreciate any comments on my probably silly questions.

I'm talking about this file: https://github.com/calendso/docker/blob/main/.env.example

To which line does line 1 refer? do I set line 8 or 9 to 'agree' and what about the other one then? My guess is on line 8 but not sure about line 9 then.

image

I'm going to run this on my NAS and not on my local pc so localhost won't work for me. Can i replace both occurrences of localhost with my NAS's internal IP?

What if I access it via a reverse proxy on i.e. cal.mydomain.tld? Do I need to pass over my public URL in line 12 and keep line 11 with my NAS's internal IP or does this then need the IP of its Docker container instead?

image

What about the API keys, IDs and secrets? Any hints on what I need each for and possibly where to get them from?

image

And finally, just out of curiosity, why do some of your variables start with 'NEXT_' ? Just wondering what the background of that choice is :-)

User create error

Hi

I am having a problem when I create my first user. Please help.

The error is:
image

and the details are:


Type: PrismaClientValidationError
Message: 
Invalid `prisma.user.create()` invocation:

{
  data: {
    id: 1,
    ~~
    username: 'superdarius',
    name: 'Darius Oosthuizen',
    email: '[email protected]',
    emailVerified: null,
    password: '**********',
    bio: null,
    avatar: null,
    timeZone: 'Africa/Johannesburg',
    weekStart: 'Sunday',
    startTime: 0,
    endTime: 1440,
    bufferTime: 0,
    hideBranding: false,
    theme: null,
    createdDate: '2021-12-31T22:00:00.000Z',
    eventTypes: {},
    credentials: {},
    teams: {},
    bookings: {},
    availability: {},
    selectedCalendars: {},
    completedOnboarding: false,
    locale: null,
    twoFactorSecret: null,
    twoFactorEnabled: false,
    plan: 'PRO',
    Schedule: {},
    webhooks: {},
    brandColor: '#292929',
    metadata: null
              ~~~~
  },
  select: {
    id: true,
    username: true,
    name: true,
    email: true,
    emailVerified: true,
    password: true,
    bio: true,
    avatar: true,
    timeZone: true,
    weekStart: true,
    startTime: true,
    endTime: true,
    bufferTime: true,
    hideBranding: true,
    theme: true,
    createdDate: true,
    eventTypes: true,
    credentials: true,
    teams: true,
    bookings: true,
    availability: true,
    selectedCalendars: true,
    completedOnboarding: true,
    locale: true,
    twoFactorSecret: true,
    twoFactorEnabled: true,
    plan: true,
    Schedule: true,
    webhooks: true,
    brandColor: true,
    destinationCalendar: true,
    metadata: true
  }
}

Unknown arg `id` in data.id for type UserCreateInput. Did you mean `bio`? Available args:
type UserCreateInput {
  username?: String | Null
  name?: String | Null
  email: String
  emailVerified?: DateTime | Null
  password?: String | Null
  bio?: String | Null
  avatar?: String | Null
  timeZone?: String
  weekStart?: String
  startTime?: Int
  endTime?: Int
  bufferTime?: Int
  hideBranding?: Boolean
  theme?: String | Null
  createdDate?: DateTime
  completedOnboarding?: Boolean
  locale?: String | Null
  twoFactorSecret?: String | Null
  twoFactorEnabled?: Boolean
  plan?: UserPlan
  brandColor?: String
  metadata?: NullableJsonNullValueInput | Json
  eventTypes?: EventTypeCreateNestedManyWithoutUsersInput
  credentials?: CredentialCreateNestedManyWithoutUserInput
  teams?: MembershipCreateNestedManyWithoutUserInput
  bookings?: BookingCreateNestedManyWithoutUserInput
  availability?: AvailabilityCreateNestedManyWithoutUserInput
  selectedCalendars?: SelectedCalendarCreateNestedManyWithoutUserInput
  Schedule?: ScheduleCreateNestedManyWithoutUserInput
  webhooks?: WebhookCreateNestedManyWithoutUserInput
  destinationCalendar?: DestinationCalendarCreateNestedOneWithoutUserInput
}
Argument metadata for data.metadata must not be null. Please use undefined instead.



Code: undefined

Query:
prisma.user.create(
{
  data: {
    id: 1,
    username: "superdarius",
    name: "Darius Oosthuizen",
    email: "[email protected]",
    emailVerified: null,
    password: "***********",
    bio: null,
    avatar: null,
    timeZone: "Africa/Johannesburg",
    weekStart: "Sunday",
    startTime: 0,
    endTime: 1440,
    bufferTime: 0,
    hideBranding: false,
    theme: null,
    createdDate: "2021-12-31T22:00:00.000Z",
    eventTypes: {

    },
    credentials: {

    },
    teams: {

    },
    bookings: {

    },
    availability: {

    },
    selectedCalendars: {

    },
    completedOnboarding: false,
    locale: null,
    twoFactorSecret: null,
    twoFactorEnabled: false,
    plan: "PRO",
    Schedule: {

    },
    webhooks: {

    },
    brandColor: "#292929",
    metadata: null,
  },
  select: {
    id: true,
    username: true,
    name: true,
    email: true,
    emailVerified: true,
    password: true,
    bio: true,
    avatar: true,
    timeZone: true,
    weekStart: true,
    startTime: true,
    endTime: true,
    bufferTime: true,
    hideBranding: true,
    theme: true,
    createdDate: true,
    eventTypes: true,
    credentials: true,
    teams: true,
    bookings: true,
    availability: true,
    selectedCalendars: true,
    completedOnboarding: true,
    locale: true,
    twoFactorSecret: true,
    twoFactorEnabled: true,
    plan: true,
    Schedule: true,
    webhooks: true,
    brandColor: true,
    destinationCalendar: true,
    metadata: true,
  },
}
)

ERROR: Service 'calendso' failed to build

A docker-compose up --build command on a fresh pull produces:

info - Skipping validation of types...
info - Creating an optimized production build...
Error: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /app/node_modules/@next/swc-linux-x64-gnu/next-swc.linux-x64-gnu.node)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1144:18)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:93:18)
at Object. (/app/node_modules/next/dist/build/swc/index.js:29:20)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12) {
code: 'ERR_DLOPEN_FAILED'
}
error - Failed to load SWC binary, see more info here: https://nextjs.org/docs/messages/failed-loading-swc
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: Service 'calendso' failed to build: The command '/bin/sh -c yarn build && yarn install --production --ignore-scripts --prefer-offline' returned a non-zero code: 1

Server: Docker Engine - Community
Engine:
Version: 20.10.10
API version: 1.41 (minimum version 1.12)
Go version: go1.16.9
Git commit: e2f740d
Built: Mon Oct 25 07:41:08 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.11
GitCommit: 5b46e404f6b9f661a205e28d59c982d3634148f8
runc:
Version: 1.0.2
GitCommit: v1.0.2-0-g52b36a2
docker-init:
Version: 0.19.0
GitCommit: de40ad0

An unexpected error occurred: "https://registry.yarnpkg.com/@calcom%2flib: Not found".

I have done a fix my moving the prisma to another location but another issue occur.

---> Running in f6a7a687a701
yarn install v1.22.5
[1/5] Validating package.json...
[2/5] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@calcom%2flib: Not found".
info If you think this is a bug, please open a bug report with the information provided in "/calendso/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
ERROR: Service 'calendso' failed to build : The command '/bin/sh -c yarn install' returned a non-zero code: 1

Please suggest the solution

BASE_URL usage needs instructions

BASE_URL gets embedded into some parts of the static site such as the URLs generated for the calendar links.
There needs to be a way to specify this variable at build time, since Calendso project prefers not inserting variables at runtime.

Who is maintaining this repo?

As stated in the README of Calendso, the docker repo is a community project and not officially supported by the Calendso team.

However, it is unclear how one can contribute here and who is actively maintaining this repo.
Also getting write permissions needs an invite from the Calendso team again which might not be that easy. It would be great to have some instructions how one can contribute here.

Currently there are several issues with the current state of the repo and I fear that this repo becomes outdated if no action is taken.

Database host hardcoded in start.sh

The database host is hardcoded to db:5432 instead of leveraging the environmental variables defined in .env. This prevents the service from properly starting in environments where the service address of the database may not be db.

It is possible to modify to /app/scripts/wait-for-it.sh ${DATABASE_HOST} -- echo "db is up" , after which the default .env can be updated to

DATABASE_HOST=db:5432
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}/${POSTGRES_DB}

This will allow for better runtime configuration in deployed environments.

(will submit PR if this is ok)

Blank Back End Pages

Does anyone know why this would be happening?
Back end Pages all appear blank and the console throws these error; front end pages work fine.
image

_app-e02f03b0ea2916da730e.js:1 react-i18next:: You will need to pass in an i18next instance by using initReactI18next
h @ _app-e02f03b0ea2916da730e.js:1
framework-336caa3f6419768205fe.js:1 ReferenceError: env is not defined
at B (908-f3ea953a146974c5f926.js:1:27071)
at ro (framework-336caa3f6419768205fe.js:1:60228)
at Hu (framework-336caa3f6419768205fe.js:1:112686)
at Pi (framework-336caa3f6419768205fe.js:1:99860)
at xi (framework-336caa3f6419768205fe.js:1:99788)
at _i (framework-336caa3f6419768205fe.js:1:99651)
at vi (framework-336caa3f6419768205fe.js:1:96617)
at framework-336caa3f6419768205fe.js:1:45996
at t.unstable_runWithPriority (framework-336caa3f6419768205fe.js:1:130401)
at Wl (framework-336caa3f6419768205fe.js:1:45773)
uu @ framework-336caa3f6419768205fe.js:1
main-2fa614107123abcff8c4.js:1 ReferenceError: env is not defined
at B (908-f3ea953a146974c5f926.js:1:27071)
at ro (framework-336caa3f6419768205fe.js:1:60228)
at Hu (framework-336caa3f6419768205fe.js:1:112686)
at Pi (framework-336caa3f6419768205fe.js:1:99860)
at xi (framework-336caa3f6419768205fe.js:1:99788)
at _i (framework-336caa3f6419768205fe.js:1:99651)
at vi (framework-336caa3f6419768205fe.js:1:96617)
at framework-336caa3f6419768205fe.js:1:45996
at t.unstable_runWithPriority (framework-336caa3f6419768205fe.js:1:130401)
at Wl (framework-336caa3f6419768205fe.js:1:45773)
ye @ main-2fa614107123abcff8c4.js:1
main-2fa614107123abcff8c4.js:1 A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred
ye @ main-2fa614107123abcff8c4.js:1
2104-c0a78c2880749e9b3126.js:1 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
(anonymous) @ 2104-c0a78c2880749e9b3126.js:1
main-2fa614107123abcff8c4.js:1 Error rendering page: TypeError: Cannot read properties of undefined (reading 'write')
at h.printPrettyLog (2104-c0a78c2880749e9b3126.js:1:61638)
at h._handleLog (2104-c0a78c2880749e9b3126.js:1:58684)
at h.info (2104-c0a78c2880749e9b3126.js:1:58040)
at _error-f8981102f708d0fa84b1.js:1:9321
at l (main-2fa614107123abcff8c4.js:1:75777)
at Generator._invoke (main-2fa614107123abcff8c4.js:1:75565)
at Generator.next (main-2fa614107123abcff8c4.js:1:76206)
at r (3531-b656113e43a0274815ce.js:1:17653)
at a (3531-b656113e43a0274815ce.js:1:17856)
(anonymous) @ main-2fa614107123abcff8c4.js:1

UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined

[22:48:24] git:(main*) d33tah@d33tah-pc:/data/d33tah/workspace/src/calendso-docker(0) > sudo docker-compose up --build --force-recreate
[sudo] password d33tah@d33tah-pc: 
Building calendso
Step 1/24 : FROM node:14-alpine as deps
 ---> fe39f43f1d22
Step 2/24 : RUN apk add --no-cache libc6-compat
 ---> Using cache
 ---> 3cac35c7427f
Step 3/24 : WORKDIR /app
 ---> Using cache
 ---> 24d999355ec0
Step 4/24 : COPY calendso/package.json calendso/yarn.lock ./
 ---> Using cache
 ---> cc5e7cde067a
Step 5/24 : COPY calendso/prisma prisma
 ---> Using cache
 ---> c6b3bcf320fb
Step 6/24 : RUN yarn install --frozen-lockfile
 ---> Using cache
 ---> c4deb15e8b88
Step 7/24 : FROM node:14-alpine as builder
 ---> fe39f43f1d22
Step 8/24 : WORKDIR /app
 ---> Using cache
 ---> c8fec6854aa0
Step 9/24 : COPY calendso .
 ---> Using cache
 ---> 0eb77f9fcd30
Step 10/24 : COPY --from=deps /app/node_modules ./node_modules
 ---> Using cache
 ---> ae93fc0ce496
Step 11/24 : RUN yarn build && yarn install --production --ignore-scripts --prefer-offline
 ---> Using cache
 ---> 686df08a9130
Step 12/24 : FROM node:14-alpine as runner
 ---> fe39f43f1d22
Step 13/24 : WORKDIR /app
 ---> Using cache
 ---> c8fec6854aa0
Step 14/24 : ENV NODE_ENV production
 ---> Using cache
 ---> fab0a069ca9f
Step 15/24 : COPY --from=builder /app/next.config.js ./
 ---> Using cache
 ---> ef738556d19f
Step 16/24 : COPY --from=builder /app/next-i18next.config.js ./
 ---> Using cache
 ---> 6981fa69b801
Step 17/24 : COPY --from=builder /app/public ./public
 ---> Using cache
 ---> d2bc0429dccc
Step 18/24 : COPY --from=builder /app/.next ./.next
 ---> Using cache
 ---> a6c138999c56
Step 19/24 : COPY --from=builder /app/node_modules ./node_modules
 ---> Using cache
 ---> ea3fd107cb1c
Step 20/24 : COPY --from=builder /app/package.json ./package.json
 ---> Using cache
 ---> 45dbe7abe7aa
Step 21/24 : COPY --from=builder /app/prisma ./prisma
 ---> Using cache
 ---> 88bb6d641d71
Step 22/24 : COPY  scripts scripts
 ---> Using cache
 ---> af30f5e325c5
Step 23/24 : EXPOSE 3000
 ---> Using cache
 ---> 69341fb82427
Step 24/24 : CMD ["/app/scripts/start.sh"]
 ---> Using cache
 ---> 7f1b0098b7a3
Successfully built 7f1b0098b7a3
Successfully tagged calendso-docker_calendso:latest
Recreating calendso-docker_db_1 ... done
Recreating calendso-docker_calendso_1 ... done
Attaching to calendso-docker_db_1, calendso-docker_calendso_1
calendso_1  | + /app/scripts/wait-for-it.sh db:5432 -- echo 'db is up'
calendso_1  | db is up
db_1        | 
db_1        | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1        | 
calendso_1  | + npx prisma db push
db_1        | 2021-10-17 20:48:34.743 UTC [1] LOG:  starting PostgreSQL 12.3 (Debian 12.3-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
db_1        | 2021-10-17 20:48:34.744 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
db_1        | 2021-10-17 20:48:34.744 UTC [1] LOG:  listening on IPv6 address "::", port 5432
db_1        | 2021-10-17 20:48:34.748 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1        | 2021-10-17 20:48:34.771 UTC [26] LOG:  database system was interrupted; last known up at 2021-10-17 13:40:04 UTC
db_1        | 2021-10-17 20:48:35.283 UTC [26] LOG:  database system was not properly shut down; automatic recovery in progress
db_1        | 2021-10-17 20:48:35.349 UTC [26] LOG:  redo starts at 0/171CE98
db_1        | 2021-10-17 20:48:35.349 UTC [26] LOG:  invalid record length at 0/171CED0: wanted 24, got 0
db_1        | 2021-10-17 20:48:35.349 UTC [26] LOG:  redo done at 0/171CE98
db_1        | 2021-10-17 20:48:35.530 UTC [1] LOG:  database system is ready to accept connections
calendso_1  | Prisma schema loaded from prisma/schema.prisma
calendso_1  | Datasource "db": PostgreSQL database "calendso", schema "public" at "db:5432"
calendso_1  | 
calendso_1  | The database is already in sync with the Prisma schema.
calendso_1  | 
✔ Generated Prisma Client (2.30.3) to ./node_modules/@prisma/client in 497ms
calendso_1  | 
calendso_1  | + yarn start
calendso_1  | yarn run v1.22.15
calendso_1  | $ next start
calendso_1  | ready - started server on 0.0.0.0:3000, url: http://localhost:3000
calendso_1  | react-i18next:: You will need to pass in an i18next instance by using initReactI18next
calendso_1  | [next-auth][error][client_fetch_error] 
calendso_1  | https://next-auth.js.org/errors#client_fetch_error session FetchError: request to http://localhost:3000/api/auth/session failed, reason: read ECONNRESET
calendso_1  |     at ClientRequest.<anonymous> (/app/node_modules/node-fetch/lib/index.js:1461:11)
calendso_1  |     at ClientRequest.emit (events.js:400:28)
calendso_1  |     at Socket.socketErrorListener (_http_client.js:475:9)
calendso_1  |     at Socket.emit (events.js:400:28)
calendso_1  |     at emitErrorNT (internal/streams/destroy.js:106:8)
calendso_1  |     at emitErrorCloseNT (internal/streams/destroy.js:74:3)
calendso_1  |     at processTicksAndRejections (internal/process/task_queues.js:82:21) {
calendso_1  |   type: 'system',
calendso_1  |   errno: 'ECONNRESET',
calendso_1  |   code: 'ECONNRESET'
calendso_1  | }
calendso_1  | prisma:query SELECT "public"."users"."id", "public"."users"."username", "public"."users"."name", "public"."users"."email", "public"."users"."emailVerified", "public"."users"."password", "public"."users"."bio", "public"."users"."avatar", "public"."users"."timeZone", "public"."users"."weekStart", "public"."users"."startTime", "public"."users"."endTime", "public"."users"."bufferTime", "public"."users"."hideBranding", "public"."users"."theme", "public"."users"."created", "public"."users"."completedOnboarding", "public"."users"."locale", "public"."users"."twoFactorSecret", "public"."users"."twoFactorEnabled", "public"."users"."plan" FROM "public"."users" WHERE "public"."users"."email" = $1 LIMIT $2 OFFSET $3
calendso_1  | [next-auth][warn][jwt_auto_generated_signing_key] 
calendso_1  | https://next-auth.js.org/warnings#jwt_auto_generated_signing_key
calendso_1  | (node:403) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
calendso_1  |     at new NodeError (internal/errors.js:322:7)
calendso_1  |     at Function.from (buffer.js:334:9)
calendso_1  |     at hkdf_extract (/app/node_modules/futoin-hkdf/hkdf.js:77:57)
calendso_1  |     at hkdf (/app/node_modules/futoin-hkdf/hkdf.js:147:17)
calendso_1  |     at hkdf (/app/node_modules/next-auth/dist/lib/jwt.js:130:32)
calendso_1  |     at getDerivedSigningKey (/app/node_modules/next-auth/dist/lib/jwt.js:143:18)
calendso_1  |     at Object.encode (/app/node_modules/next-auth/dist/lib/jwt.js:40:86)
calendso_1  |     at Object.callback (/app/node_modules/next-auth/dist/server/routes/callback.js:318:37)
calendso_1  | (Use `node --trace-warnings ...` to show where the warning was created)
calendso_1  | (node:403) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 24)
calendso_1  | (node:403) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Register page doesn't work

I have followed the tutorial for running in docker, and when I navigate to http://localhost:3000/signup, I am unable to sign up. Is the identity function missing now?

Is there any patch for the self-hosted version so that I don't need to manually access prisma studio? Or at least can the user data injection be done with script?

How can I add integrations

I'm a bit confused about the pricing model of Calendso. It says that the free (self-hosted) version does NOT come with the option "Ready-to-connect integrations". That gets me to assume that we have to install integrations ourselves. That's fine, I just wonder where I could find any. Or am I not supposed to have calenders integrated at all?

Auto-build docker images as part of the CI

The docker images should be built as part of the (release) CI pipeline and pushed to registry; (you can use GitHub registry fwiw)

Describe the solution you'd like

Use of many pre-packages Github actions for building docker images & pushing them to registry
It's relatively easy to do, some googling and some copy-paste

The table `public.users` does not exist in the current database

After building calendso on my server and getting access to both the page as well as the studio, I got this error when loading studio and also when trying to add a user.

After successfully building it I saw the error initdb: error: could not create directory "/var/lib/postgresql/data/pg_wal": No space left on device, so I did a docker system prune --all --volumes to free up space and that seems to have worked.

But maybe that's already why it fails, not sure...

Message: Error in Prisma Client request: 

Invalid `prisma.user.findMany()` invocation:
  The table `public.users` does not exist in the current database.
  
Query:
prisma.user.findMany({
  take: 100,
  skip: 0,
  select: {
    id: true,
    username: true,
    name: true,
    email: true,
    emailVerified: true,
    password: true,
    bio: true,
    avatar: true,
    timeZone: true,
    weekStart: true,
    startTime: true,
    endTime: true,
    bufferTime: true,
    hideBranding: true,
    theme: true,
    createdDate: true,
    eventTypes: true,
    credentials: true,
    teams: true,
    bookings: true,
    availability: true,
    selectedCalendars: true,
    completedOnboarding: true,
    locale: true,
    twoFactorSecret: true,
    twoFactorEnabled: true,
    identityProvider: true,
    identityProviderId: true,
    invitedTo: true,
    plan: true,
    Schedule: true,
    webhooks: true,
    brandColor: true,
    destinationCalendar: true,
    away: true,
    metadata: true,
    verified: true,
  }
})

Here is some output from running docker-compose up --build after running into the dbinit error repeatedly:
Not sure why it shuts down multiple times... Maybe somebody knows why I get this!
I'll also try upgrading my server, but that shouldn't be it I guess...

...
database_1  | The files belonging to this database system will be owned by user "postgres".
database_1  | This user must also own the server process.
database_1  | 
database_1  | The database cluster will be initialized with locale "en_US.utf8".
database_1  | The default database encoding has accordingly been set to "UTF8".
database_1  | The default text search configuration will be set to "english".
database_1  | 
database_1  | Data page checksums are disabled.
database_1  | 
database_1  | fixing permissions on existing directory /var/lib/postgresql/data ... ok
database_1  | initdb: error: could not create directory "/var/lib/postgresql/data/pg_wal": No space left on device
database_1  | initdb: removing contents of data directory "/var/lib/postgresql/data"
calcom_database_1 exited with code 1
calendso_1  | @calcom/web:start: (node:170) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
calendso_1  | @calcom/web:start: (Use `node --trace-warnings ...` to show where the warning was created)
database_1  | The files belonging to this database system will be owned by user "postgres".
database_1  | This user must also own the server process.
database_1  | 
database_1  | The database cluster will be initialized with locale "en_US.utf8".
database_1  | The default database encoding has accordingly been set to "UTF8".
database_1  | The default text search configuration will be set to "english".
database_1  | 
database_1  | Data page checksums are disabled.
database_1  | 
database_1  | fixing permissions on existing directory /var/lib/postgresql/data ... ok
database_1  | initdb: error: could not create directory "/var/lib/postgresql/data/pg_wal": No space left on device
database_1  | initdb: removing contents of data directory "/var/lib/postgresql/data"
calcom_database_1 exited with code 1
database_1  | The files belonging to this database system will be owned by user "postgres".
database_1  | This user must also own the server process.
database_1  | 
database_1  | The database cluster will be initialized with locale "en_US.utf8".
database_1  | The default database encoding has accordingly been set to "UTF8".
database_1  | The default text search configuration will be set to "english".
database_1  | 
database_1  | Data page checksums are disabled.
database_1  | 
database_1  | fixing permissions on existing directory /var/lib/postgresql/data ... ok
database_1  | creating subdirectories ... ok
database_1  | selecting dynamic shared memory implementation ... posix
database_1  | selecting default max_connections ... 100
database_1  | selecting default shared_buffers ... 128MB
database_1  | selecting default time zone ... Etc/UTC
database_1  | creating configuration files ... ok
database_1  | running bootstrap script ... ok
database_1  | performing post-bootstrap initialization ... ok
database_1  | syncing data to disk ... ok
database_1  | 
database_1  | initdb: warning: enabling "trust" authentication for local connections
database_1  | You can change this by editing pg_hba.conf or using the option -A, or
database_1  | --auth-local and --auth-host, the next time you run initdb.
database_1  | 
database_1  | Success. You can now start the database server using:
database_1  | 
database_1  |     pg_ctl -D /var/lib/postgresql/data -l logfile start
database_1  | 
database_1  | waiting for server to start....2022-02-22 18:52:16.027 UTC [48] LOG:  starting PostgreSQL 14.2 (Debian 14.2-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
database_1  | 2022-02-22 18:52:16.029 UTC [48] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
database_1  | 2022-02-22 18:52:16.036 UTC [49] LOG:  database system was shut down at 2022-02-22 18:52:15 UTC
database_1  | 2022-02-22 18:52:16.044 UTC [48] LOG:  database system is ready to accept connections
database_1  |  done
database_1  | server started
database_1  | CREATE DATABASE
database_1  | 
database_1  | 
database_1  | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
database_1  | 
database_1  | 2022-02-22 18:52:16.406 UTC [48] LOG:  received fast shutdown request
database_1  | waiting for server to shut down....2022-02-22 18:52:16.408 UTC [48] LOG:  aborting any active transactions
database_1  | 2022-02-22 18:52:16.414 UTC [48] LOG:  background worker "logical replication launcher" (PID 55) exited with exit code 1
database_1  | 2022-02-22 18:52:16.416 UTC [50] LOG:  shutting down
database_1  | 2022-02-22 18:52:16.426 UTC [48] LOG:  database system is shut down
database_1  |  done
database_1  | server stopped
database_1  | 
database_1  | PostgreSQL init process complete; ready for start up.
database_1  | 
database_1  | 2022-02-22 18:52:16.553 UTC [1] LOG:  starting PostgreSQL 14.2 (Debian 14.2-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
database_1  | 2022-02-22 18:52:16.554 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
database_1  | 2022-02-22 18:52:16.555 UTC [1] LOG:  listening on IPv6 address "::", port 5432
database_1  | 2022-02-22 18:52:16.557 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
database_1  | 2022-02-22 18:52:16.562 UTC [62] LOG:  database system was shut down at 2022-02-22 18:52:16 UTC
database_1  | 2022-02-22 18:52:16.567 UTC [1] LOG:  database system is ready to accept connections
database_1  | 2022-02-22 18:54:15.451 UTC [72] ERROR:  relation "public.EventType" does not exist at character 61
database_1  | 2022-02-22 18:54:15.451 UTC [72] STATEMENT:  SELECT COUNT(*) FROM (SELECT "public"."EventType"."id" FROM "public"."EventType" WHERE 1=1 OFFSET $1) AS "sub"
database_1  | 2022-02-22 18:54:15.530 UTC [70] ERROR:  relation "public.users" does not exist at character 57
database_1  | 2022-02-22 18:54:15.530 UTC [70] STATEMENT:  SELECT COUNT(*) FROM (SELECT "public"."users"."id" FROM "public"."users" WHERE 1=1 OFFSET $1) AS "sub"
database_1  | 2022-02-22 18:54:15.535 UTC [71] ERROR:  relation "public.users" does not exist at character 849
database_1  | 2022-02-22 18:54:15.535 UTC [71] STATEMENT:  SELECT "public"."users"."id", "public"."users"."username", "public"."users"."name", "public"."users"."email", "public"."users"."emailVerified", "public"."users"."password", "public"."users"."bio", "public"."users"."avatar", "public"."users"."timeZone", "public"."users"."weekStart", "public"."users"."startTime", "public"."users"."endTime", "public"."users"."bufferTime", "public"."users"."hideBranding", "public"."users"."theme", "public"."users"."created", "public"."users"."completedOnboarding", "public"."users"."locale", "public"."users"."twoFactorSecret", "public"."users"."twoFactorEnabled", "public"."users"."identityProvider", "public"."users"."identityProviderId", "public"."users"."invitedTo", "public"."users"."plan", "public"."users"."brandColor", "public"."users"."away", "public"."users"."metadata", "public"."users"."verified" FROM "public"."users" WHERE 1=1 ORDER BY "public"."users"."id" ASC LIMIT $1 OFFSET $2
database_1  | 2022-02-22 18:54:15.590 UTC [73] ERROR:  relation "public.Credential" does not exist at character 62
database_1  | 2022-02-22 18:54:15.590 UTC [73] STATEMENT:  SELECT COUNT(*) FROM (SELECT "public"."Credential"."id" FROM "public"."Credential" WHERE 1=1 OFFSET $1) AS "sub"
database_1  | 2022-02-22 18:54:15.638 UTC [74] ERROR:  relation "public.DestinationCalendar" does not exist at character 71
database_1  | 2022-02-22 18:54:15.638 UTC [74] STATEMENT:  SELECT COUNT(*) FROM (SELECT "public"."DestinationCalendar"."id" FROM "public"."DestinationCalendar" WHERE 1=1 OFFSET $1) AS "sub"
database_1  | 2022-02-22 18:54:15.640 UTC [73] ERROR:  relation "public.users" does not exist at character 57
database_1  | 2022-02-22 18:54:15.640 UTC [73] STATEMENT:  SELECT COUNT(*) FROM (SELECT "public"."users"."id" FROM "public"."users" WHERE 1=1 OFFSET $1) AS "sub"
database_1  | 2022-02-22 18:54:15.641 UTC [72] ERROR:  relation "public.Team" does not exist at character 56
database_1  | 2022-02-22 18:54:15.641 UTC [72] STATEMENT:  SELECT COUNT(*) FROM (SELECT "public"."Team"."id" FROM "public"."Team" WHERE 1=1 OFFSET $1) AS "sub"
database_1  | 2022-02-22 18:54:15.645 UTC [72] ERROR:  relation "public.Membership" does not exist at character 98
database_1  | 2022-02-22 18:54:15.645 UTC [72] STATEMENT:  SELECT COUNT(*) FROM (SELECT "public"."Membership"."userId", "public"."Membership"."teamId" FROM "public"."Membership" WHERE 1=1 OFFSET $1) AS "sub"
database_1  | 2022-02-22 18:54:15.647 UTC [74] ERROR:  relation "public.VerificationRequest" does not exist at character 71
database_1  | 2022-02-22 18:54:15.647 UTC [74] STATEMENT:  SELECT COUNT(*) FROM (SELECT "public"."VerificationRequest"."id" FROM "public"."VerificationRequest" WHERE 1=1 OFFSET $1) AS "sub"
database_1  | 2022-02-22 18:54:15.649 UTC [73] ERROR:  relation "public.BookingReference" does not exist at character 68
database_1  | 2022-02-22 18:54:15.649 UTC [73] STATEMENT:  SELECT COUNT(*) FROM (SELECT "public"."BookingReference"."id" FROM "public"."BookingReference" WHERE 1=1 OFFSET $1) AS "sub"
database_1  | 2022-02-22 18:54:15.651 UTC [73] ERROR:  relation "public.Attendee" does not exist at character 60
database_1  | 2022-02-22 18:54:15.651 UTC [73] STATEMENT:  SELECT COUNT(*) FROM (SELECT "public"."Attendee"."id" FROM "public"."Attendee" WHERE 1=1 OFFSET $1) AS "sub"
database_1  | 2022-02-22 18:54:15.652 UTC [72] ERROR:  relation "public.DailyEventReference" does not exist at character 71
database_1  | 2022-02-22 18:54:15.652 UTC [72] STATEMENT:  SELECT COUNT(*) FROM (SELECT "public"."DailyEventReference"."id" FROM "public"."DailyEventReference" WHERE 1=1 OFFSET $1) AS "sub"
database_1  | 2022-02-22 18:54:15.654 UTC [74] ERROR:  relation "public.Booking" does not exist at character 59
database_1  | 2022-02-22 18:54:15.654 UTC [74] STATEMENT:  SELECT COUNT(*) FROM (SELECT "public"."Booking"."id" FROM "public"."Booking" WHERE 1=1 OFFSET $1) AS "sub"
database_1  | 2022-02-22 18:54:15.655 UTC [74] ERROR:  relation "public.Schedule" does not exist at character 60
database_1  | 2022-02-22 18:54:15.655 UTC [74] STATEMENT:  SELECT COUNT(*) FROM (SELECT "public"."Schedule"."id" FROM "public"."Schedule" WHERE 1=1 OFFSET $1) AS "sub"
database_1  | 2022-02-22 18:54:15.681 UTC [73] ERROR:  relation "public.Availability" does not exist at character 64
database_1  | 2022-02-22 18:54:15.681 UTC [73] STATEMENT:  SELECT COUNT(*) FROM (SELECT "public"."Availability"."id" FROM "public"."Availability" WHERE 1=1 OFFSET $1) AS "sub"
database_1  | 2022-02-22 18:54:15.681 UTC [72] ERROR:  relation "public.SelectedCalendar" does not exist at character 157
database_1  | 2022-02-22 18:54:15.681 UTC [72] STATEMENT:  SELECT COUNT(*) FROM (SELECT "public"."SelectedCalendar"."userId", "public"."SelectedCalendar"."integration", "public"."SelectedCalendar"."externalId" FROM "public"."SelectedCalendar" WHERE 1=1 OFFSET $1) AS "sub"
database_1  | 2022-02-22 18:54:15.682 UTC [72] ERROR:  relation "public.EventTypeCustomInput" does not exist at character 72
database_1  | 2022-02-22 18:54:15.682 UTC [72] STATEMENT:  SELECT COUNT(*) FROM (SELECT "public"."EventTypeCustomInput"."id" FROM "public"."EventTypeCustomInput" WHERE 1=1 OFFSET $1) AS "sub"
database_1  | 2022-02-22 18:54:15.683 UTC [74] ERROR:  relation "public.ResetPasswordRequest" does not exist at character 72
database_1  | 2022-02-22 18:54:15.683 UTC [74] STATEMENT:  SELECT COUNT(*) FROM (SELECT "public"."ResetPasswordRequest"."id" FROM "public"."ResetPasswordRequest" WHERE 1=1 OFFSET $1) AS "sub"
database_1  | 2022-02-22 18:54:15.684 UTC [73] ERROR:  relation "public.ReminderMail" does not exist at character 64
database_1  | 2022-02-22 18:54:15.684 UTC [73] STATEMENT:  SELECT COUNT(*) FROM (SELECT "public"."ReminderMail"."id" FROM "public"."ReminderMail" WHERE 1=1 OFFSET $1) AS "sub"
database_1  | 2022-02-22 18:54:15.684 UTC [73] ERROR:  relation "public.Payment" does not exist at character 59
database_1  | 2022-02-22 18:54:15.684 UTC [73] STATEMENT:  SELECT COUNT(*) FROM (SELECT "public"."Payment"."id" FROM "public"."Payment" WHERE 1=1 OFFSET $1) AS "sub"
database_1  | 2022-02-22 18:54:15.685 UTC [72] ERROR:  relation "public.Webhook" does not exist at character 59
database_1  | 2022-02-22 18:54:15.685 UTC [72] STATEMENT:  SELECT COUNT(*) FROM (SELECT "public"."Webhook"."id" FROM "public"."Webhook" WHERE 1=1 OFFSET $1) AS "sub"

UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined

Issue Summary

Trying to run the app using the docker container from github.com/calendso/docker results in an error when trying to log in using the newly created account.

Steps to Reproduce

  1. Use github.com/calendso/docker
  2. Create an account using the admin page
  3. Try to log in using that account
  4. Observe the following error:
> sudo docker-compose up --build --force-recreate
[sudo] password d33tah@d33tah-pc: 
Building calendso
Step 1/24 : FROM node:14-alpine as deps
 ---> fe39f43f1d22
Step 2/24 : RUN apk add --no-cache libc6-compat
 ---> Using cache
 ---> 3cac35c7427f
Step 3/24 : WORKDIR /app
 ---> Using cache
 ---> 24d999355ec0
Step 4/24 : COPY calendso/package.json calendso/yarn.lock ./
 ---> Using cache
 ---> cc5e7cde067a
Step 5/24 : COPY calendso/prisma prisma
 ---> Using cache
 ---> c6b3bcf320fb
Step 6/24 : RUN yarn install --frozen-lockfile
 ---> Using cache
 ---> c4deb15e8b88
Step 7/24 : FROM node:14-alpine as builder
 ---> fe39f43f1d22
Step 8/24 : WORKDIR /app
 ---> Using cache
 ---> c8fec6854aa0
Step 9/24 : COPY calendso .
 ---> Using cache
 ---> 0eb77f9fcd30
Step 10/24 : COPY --from=deps /app/node_modules ./node_modules
 ---> Using cache
 ---> ae93fc0ce496
Step 11/24 : RUN yarn build && yarn install --production --ignore-scripts --prefer-offline
 ---> Using cache
 ---> 686df08a9130
Step 12/24 : FROM node:14-alpine as runner
 ---> fe39f43f1d22
Step 13/24 : WORKDIR /app
 ---> Using cache
 ---> c8fec6854aa0
Step 14/24 : ENV NODE_ENV production
 ---> Using cache
 ---> fab0a069ca9f
Step 15/24 : COPY --from=builder /app/next.config.js ./
 ---> Using cache
 ---> ef738556d19f
Step 16/24 : COPY --from=builder /app/next-i18next.config.js ./
 ---> Using cache
 ---> 6981fa69b801
Step 17/24 : COPY --from=builder /app/public ./public
 ---> Using cache
 ---> d2bc0429dccc
Step 18/24 : COPY --from=builder /app/.next ./.next
 ---> Using cache
 ---> a6c138999c56
Step 19/24 : COPY --from=builder /app/node_modules ./node_modules
 ---> Using cache
 ---> ea3fd107cb1c
Step 20/24 : COPY --from=builder /app/package.json ./package.json
 ---> Using cache
 ---> 45dbe7abe7aa
Step 21/24 : COPY --from=builder /app/prisma ./prisma
 ---> Using cache
 ---> 88bb6d641d71
Step 22/24 : COPY  scripts scripts
 ---> Using cache
 ---> af30f5e325c5
Step 23/24 : EXPOSE 3000
 ---> Using cache
 ---> 69341fb82427
Step 24/24 : CMD ["/app/scripts/start.sh"]
 ---> Using cache
 ---> 7f1b0098b7a3
Successfully built 7f1b0098b7a3
Successfully tagged calendso-docker_calendso:latest
Recreating calendso-docker_db_1 ... done
Recreating calendso-docker_calendso_1 ... done
Attaching to calendso-docker_db_1, calendso-docker_calendso_1
calendso_1  | + /app/scripts/wait-for-it.sh db:5432 -- echo 'db is up'
calendso_1  | db is up
db_1        | 
db_1        | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1        | 
calendso_1  | + npx prisma db push
db_1        | 2021-10-17 20:48:34.743 UTC [1] LOG:  starting PostgreSQL 12.3 (Debian 12.3-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
db_1        | 2021-10-17 20:48:34.744 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
db_1        | 2021-10-17 20:48:34.744 UTC [1] LOG:  listening on IPv6 address "::", port 5432
db_1        | 2021-10-17 20:48:34.748 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1        | 2021-10-17 20:48:34.771 UTC [26] LOG:  database system was interrupted; last known up at 2021-10-17 13:40:04 UTC
db_1        | 2021-10-17 20:48:35.283 UTC [26] LOG:  database system was not properly shut down; automatic recovery in progress
db_1        | 2021-10-17 20:48:35.349 UTC [26] LOG:  redo starts at 0/171CE98
db_1        | 2021-10-17 20:48:35.349 UTC [26] LOG:  invalid record length at 0/171CED0: wanted 24, got 0
db_1        | 2021-10-17 20:48:35.349 UTC [26] LOG:  redo done at 0/171CE98
db_1        | 2021-10-17 20:48:35.530 UTC [1] LOG:  database system is ready to accept connections
calendso_1  | Prisma schema loaded from prisma/schema.prisma
calendso_1  | Datasource "db": PostgreSQL database "calendso", schema "public" at "db:5432"
calendso_1  | 
calendso_1  | The database is already in sync with the Prisma schema.
calendso_1  | 
✔ Generated Prisma Client (2.30.3) to ./node_modules/@prisma/client in 497ms
calendso_1  | 
calendso_1  | + yarn start
calendso_1  | yarn run v1.22.15
calendso_1  | $ next start
calendso_1  | ready - started server on 0.0.0.0:3000, url: http://localhost:3000
calendso_1  | react-i18next:: You will need to pass in an i18next instance by using initReactI18next
calendso_1  | [next-auth][error][client_fetch_error] 
calendso_1  | https://next-auth.js.org/errors#client_fetch_error session FetchError: request to http://localhost:3000/api/auth/session failed, reason: read ECONNRESET
calendso_1  |     at ClientRequest.<anonymous> (/app/node_modules/node-fetch/lib/index.js:1461:11)
calendso_1  |     at ClientRequest.emit (events.js:400:28)
calendso_1  |     at Socket.socketErrorListener (_http_client.js:475:9)
calendso_1  |     at Socket.emit (events.js:400:28)
calendso_1  |     at emitErrorNT (internal/streams/destroy.js:106:8)
calendso_1  |     at emitErrorCloseNT (internal/streams/destroy.js:74:3)
calendso_1  |     at processTicksAndRejections (internal/process/task_queues.js:82:21) {
calendso_1  |   type: 'system',
calendso_1  |   errno: 'ECONNRESET',
calendso_1  |   code: 'ECONNRESET'
calendso_1  | }
calendso_1  | prisma:query SELECT "public"."users"."id", "public"."users"."username", "public"."users"."name", "public"."users"."email", "public"."users"."emailVerified", "public"."users"."password", "public"."users"."bio", "public"."users"."avatar", "public"."users"."timeZone", "public"."users"."weekStart", "public"."users"."startTime", "public"."users"."endTime", "public"."users"."bufferTime", "public"."users"."hideBranding", "public"."users"."theme", "public"."users"."created", "public"."users"."completedOnboarding", "public"."users"."locale", "public"."users"."twoFactorSecret", "public"."users"."twoFactorEnabled", "public"."users"."plan" FROM "public"."users" WHERE "public"."users"."email" = $1 LIMIT $2 OFFSET $3
calendso_1  | [next-auth][warn][jwt_auto_generated_signing_key] 
calendso_1  | https://next-auth.js.org/warnings#jwt_auto_generated_signing_key
calendso_1  | (node:403) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
calendso_1  |     at new NodeError (internal/errors.js:322:7)
calendso_1  |     at Function.from (buffer.js:334:9)
calendso_1  |     at hkdf_extract (/app/node_modules/futoin-hkdf/hkdf.js:77:57)
calendso_1  |     at hkdf (/app/node_modules/futoin-hkdf/hkdf.js:147:17)
calendso_1  |     at hkdf (/app/node_modules/next-auth/dist/lib/jwt.js:130:32)
calendso_1  |     at getDerivedSigningKey (/app/node_modules/next-auth/dist/lib/jwt.js:143:18)
calendso_1  |     at Object.encode (/app/node_modules/next-auth/dist/lib/jwt.js:40:86)
calendso_1  |     at Object.callback (/app/node_modules/next-auth/dist/server/routes/callback.js:318:37)
calendso_1  | (Use `node --trace-warnings ...` to show where the warning was created)
calendso_1  | (node:403) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 24)
calendso_1  | (node:403) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Any other relevant information. For example, why do you consider this a bug and what did you expect to happen instead?

Technical details

  • Browser version: Firefox 93
  • Node.js version: v14.18.1

Absolute path to wait-for-it.sh in start.sh

calendso-78db69d569-k5h2j calendso 2022-02-23T21:36:56.280179743+01:00 + /app/scripts/wait-for-it.sh -- echo database is up
calendso-78db69d569-k5h2j calendso 2022-02-23T21:36:56.280573202+01:00 /calcom/scripts/start.sh: 4: /calcom/scripts/start.sh: /app/scripts/wait-for-it.sh: not found

The docker WORKDIR is /calcom but the path to wait-for-it.sh is hardcoded as /app in start.sh
The path should be relative to be independent of the WORKDIR

Update .env to .env.example

For pattern, and to help prevent accidental commits of a .env file with secrets, the .env file needs to be renamed to .env.example (matching the pattern in calendso/calendso), and added to a .gitignore file.

Allow setting all env variables at runtime

Currently, we need to set the environment variables at build time. This is because Next.js includes them in the final bundle.

It would be better if we can build a generic Docker image, and inject the environment variables at runtime.

See this discussion which has a way of doing it.

I am working on a Home Assistant addon for Calendso, and I have successfully built and run the project using this method. The addon is still in the experimental stages, however, you can see an example of the relevant code. Here a variable is set with a dummy value during build time. Here the variable values are overwritten at runtime.

Suggestion: Move this code into calendso/calendso repo

Why is the Dockerfile (and supporting scripts) and docker-compose.yml in a separate repository?
These files are usually found in the app's single repository, with the source code.
Is there a reason not to do that here?

  • Having a single repository is a lot more convenient for updates: no need to (constantly or periodically) update the git submodule and integrate changes such as new environment variables or filesystem mounts.
  • Having two repositories also adds a degree of complexity when working with a fork or branch of the project (which you want people to do so that they will make and contribute fixes and enhancements) since they need to commit and push [in the calendso repo] and update the submodule [in this repo] after every little change before they can build the updated image. I can see this being a huge headache for those working with Docker and actively making & testing changes in the calendso repo.
  • Also, with the current setup, it's not so simple to build an image for a specific tag in the caldendso repo .. e.g. Say I want v1.0 (latest official release).. This repo seems to use [for the submodule] the latest commit in the main branch of the calendso repo, not the latest official release in the calendso repo.. So I would have to (ughhh) find the SHA for the tag and scan through all the commits in this repo for the one that uses that SHA for the submodule, and use the SHA for that commit [in this repo] instead of just using a meaningfully/semantically named tag. That's time consuming, complicated, and obscures what version of calendso I'm using.

If I end up forking the project to make changes, I would be inclined to just include the docker configuration in my fork of calendso (and try contributing that in a PR), unless there's some reason this won't work or has some drawback I haven't thought of..

Docker OCI runtime exec failed

Hello,
I'm trying to install on my archlinux server Calendso with docker. The build was succesful however when I launched the second command line, I got the following error:

docker-compose exec calendso -- npx prisma studio OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "--": executable file not found in $PATH: unknown

Have you ever seen this error?
Sincerely

@calcom/lib not found

yarn install failes:

#11 1.256 error An unexpected error occurred: "https://registry.yarnpkg.com/@calcom%2flib: Not found".

Error: Invalid key length - Apple Calendar Integration

When trying to add the apple calendar I get the following error. Any ideas?
Error: Invalid key length
at Cipheriv.createCipherBase (internal/crypto/cipher.js:103:19)
at Cipheriv.createCipherWithIV (internal/crypto/cipher.js:121:20)
at new Cipheriv (internal/crypto/cipher.js:227:22)
at Object.createCipheriv (crypto.js:124:10)
at symmetricEncrypt (/app/.next/server/chunks/1027.js:29:66)
at handler (/app/.next/server/pages/api/integrations/apple/add.js:145:88)
at async Object.apiResolver (/app/node_modules/next/dist/server/api-utils.js:102:9)
at async Server.handleApiRequest (/app/node_modules/next/dist/server/next-server.js:1064:9)
at async Object.fn (/app/node_modules/next/dist/server/next-server.js:951:37)
at async Router.execute (/app/node_modules/next/dist/server/router.js:222:32)

Cannot find module `/app/node_modules/@hookform/resolvers/zod/dist/zod`

When following the instructions on the home page and running docker-compose up --build -d I get the following error from the logs in docker logs calendso-docker_calendso_1 -f:

+ /app/scripts/wait-for-it.sh database:5432 -- echo database is up
nc command is missing!
+ npx prisma migrate deploy
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "calendso", schema "public" at "database:5432"

65 migrations found in prisma/migrations

No pending migrations to apply.
+ yarn start
yarn run v1.22.17
$ next start
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
18:02:09.421 timeZoneName DEBUG [error] server side logged this: Error: Cannot find module '/app/node_modules/@hookform/resolvers/zod/dist/zod' 
18:02:09.434 timeZoneName INFO  [error] return props,  
{
  statusCode: 500,
  hasGetInitialPropsRun: true
}
react-i18next:: You will need to pass in an i18next instance by using initReactI18next
Error: Cannot find module '/app/node_modules/@hookform/resolvers/zod/dist/zod'
    at createEsmNotFoundErr (internal/modules/cjs/loader.js:929:15)
    at finalizeEsmResolution (internal/modules/cjs/loader.js:922:15)
    at resolveExports (internal/modules/cjs/loader.js:450:14)
    at Function.Module._findPath (internal/modules/cjs/loader.js:490:31)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:888:27)
    at Function.mod._resolveFilename (/app/node_modules/next/dist/build/webpack/require-hook.js:183:28)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object.66615 (/app/.next/server/pages/getting-started.js:876:18) {
  code: 'MODULE_NOT_FOUND',
  path: '/app/node_modules/@hookform/resolvers/package.json'
}

I can log in with the credentials I have set. But get a 500 page when going to /getting-started.

Unable to seed new database on startup

In the current build there is no way to seed a database that is not publicly accessible but is accessible to the Calendso container.
There needs to be a database seed option in addition to the migrations, for new deployments.

Separate Prisma Studio example into a separate service

For better practice, and at risk of new docker users unknowingly opening holes in the primary calendso service, the docker-compose file should break prisma studio into its own service (it can use the same docker image as calendso), with its own port exposed as opposed to multiple.

SMTP Email not working

Trying to setup the SMTP to work through Gmail, I am using the verified settings from the main repo but no emails are getting sent when I create a booking

# The following configuration for Gmail has been verified to work.
EMAIL_SERVER_HOST='smtp.gmail.com'
EMAIL_SERVER_PORT=465 // Tried port 587 as well
EMAIL_SERVER_USER='<gmail_emailAddress>'
## You will need to provision an App Password.
## @see https://support.google.com/accounts/answer/185833
EMAIL_SERVER_PASSWORD='<gmail_app_password>'

I am posting this to the docker repo as supposedly it should work as it has been "verified" in the readme of the main one. Getting no errors, the emails simply don't get sent.

Stripe Integration

Could you pls advise how to activate the stripe integration? The .env.example doesn't seem to have any reference to Stripe

SECRET issue

Hi,

I have installed calcom using Docker and when I open my app url, I get errors concerning missing secret
[next-auth][error][NO_SECRET] 2022-02-22T16:26:01.391583752Z https://next-auth.js.org/errors#no_secret Please define a secretin production. MissingSecret [MissingSecretError]: Please define asecret in production. 2022-02-22T16:26:01.391591995Z at assertConfig (/calcom/node_modules/next-auth/core/lib/assert.js:24:14) 2022-02-22T16:26:01.391598403Z at NextAuthHandler (/calcom/node_modules/next-auth/core/index.js:34:52) 2022-02-22T16:26:01.391602445Z at NextAuthNextHandler (/calcom/node_modules/next-auth/next/index.js:20:51) 2022-02-22T16:26:01.391606251Z at /calcom/node_modules/next-auth/next/index.js:56:38 2022-02-22T16:26:01.391609921Z at Object.apiResolver (/calcom/node_modules/next/dist/server/api-utils.js:101:15) 2022-02-22T16:26:01.391613598Z at runMicrotasks (<anonymous>) 2022-02-22T16:26:01.391617710Z at processTicksAndRejections (internal/process/task_queues.js:95:5) 2022-02-22T16:26:01.391621376Z at async NextNodeServer.runApi (/calcom/node_modules/next/dist/server/next-server.js:319:9) 2022-02-22T16:26:01.391625003Z at async Object.fn (/calcom/node_modules/next/dist/server/base-server.js:486:37) 2022-02-22T16:26:01.391628618Z at async Router.execute (/calcom/node_modules/next/dist/server/router.js:228:32) { 2022-02-22T16:26:01.391632681Z code: 'NO_SECRET'

I tried adding ' NEXTAUTH_SECRET' in env variables but it did not work.

Any ideas ?

Site reloads constantly after choosing a date

So after a successful Calendso installation with Docker, everything is working good but the site is refreshing every time and asks to send a message. I don't know if I am doing something wrong or if it's a bug. I recorded a video that shows everything:

Calendso.webpage.reloading.2021-08-12.a.la.s.13.45.03.mov

In the second ≈ 49 it loads the available hours

The .env file looks like this:

POSTGRES_USER=unicorn_user
POSTGRES_PASSWORD=magical_password
POSTGRES_DB=calendso
DATABASE_URL='postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}'
GOOGLE_API_CREDENTIALS='AyDS0C-OioHC-cUr27Qpid46VHE'
BASE_URL='http://agendar.incubadoradeases.com:3000'
NEXTAUTH_URL='http://agendar.incubadoradeases.com:3000'

# Remove this var if you don't want Calendso to collect anonymous usage
NEXT_PUBLIC_TELEMETRY_KEY=js.2pvs2bbpqq1zwcml.oi2jzirnbj1ev4tc57c5r

# Used for the Office 365 / Outlook.com Calendar integration
MS_GRAPH_CLIENT_ID=
MS_GRAPH_CLIENT_SECRET=

# Used for the Zoom integration
ZOOM_CLIENT_ID=I7TT8dRac9g
ZOOM_CLIENT_SECRET=c207KEwTtSIhP9gY

# E-mail settings
# Configures the global From: header whilst sending emails.
EMAIL_FROM='[email protected]'

# Configure SMTP settings (@see https://nodemailer.com/smtp/).
EMAIL_SERVER_HOST='smtp.example.com'
EMAIL_SERVER_PORT=587
EMAIL_SERVER_USER='email_user'
EMAIL_SERVER_PASSWORD='email_password'                                                                                     

Installing for production

Is there documentation on how to setup for production? Just read that this docker image is for local dev and evaluation only...
Ideally there would be a docker-compose that'd just work.

I'd be happy to write a setup and provide the docker-compose once I get it to work, but not sure where to start or if it's even possible to host for production.

Any hints or tutorials I've missed?

Docker "Service 'calendso' failed to build" due to "Step 4/31 : COPY calendso/apps/web/prisma"

Environment

  1. Fresh install of Ubuntu 20.04.3 LTS Desktop

Install Process

  1. Install Docker and Docker-Compose via the official Docker website procedure
  2. Clone calendso-docker (I have also tried this with --recursive at the end as mentioned in #12)
    git clone --recursive https://github.com/calendso/docker.git calendso-docker
  3. Change into the directory
    cd calendso-docker
  4. Rename .env.example to .env and update .env.
    cp .env.example .env
  5. Build and start calendso
    docker-compose up --build

Results

$sudo docker-compose up --build
Creating network "calendso-docker_stack" with the default driver
Creating volume "calendso-docker_database-data" with default driver
Pulling database (postgres:)...
latest: Pulling from library/postgres
5eb5b503b376: Pull complete
daa0467a6c48: Pull complete
7cf625de49ef: Pull complete
bb8afcc973b2: Pull complete
c74bf40d29ee: Pull complete
2ceaf201bb22: Pull complete
1255f255c0eb: Pull complete
12a9879c7aa1: Pull complete
4e80271c8de8: Pull complete
04d0275af286: Pull complete
3d4fe3f39342: Pull complete
60f2aefbd6d9: Pull complete
98ace1022c39: Pull complete
Digest: sha256:156c50d4b6fe6ea4e4645ccdeabf54fedc59a561bfece047cdf4c26a42deab72
Status: Downloaded newer image for postgres:latest
Building calendso
Sending build context to Docker daemon   26.1MB
Step 1/31 : FROM node:14 as deps
14: Pulling from library/node
a834d7c95167: Pull complete 
57b3fa6f1b88: Pull complete 
778df3ecaa0f: Pull complete 
d353c340774e: Pull complete 
6370e0bc373d: Pull complete 
fb61153482cd: Pull complete 
78fb5822e501: Pull complete 
ba3577a691be: Pull complete 
bd38fd0dd57b: Pull complete 
Digest: sha256:b2c75df8c9706156c38b4f1f678d00e11cb2bfda09fc4ab6e36ec17ac9163865
Status: Downloaded newer image for node:14
 ---> 9cb3f042a684
Step 2/31 : WORKDIR /calcom
 ---> Running in 3cb224df2841
Removing intermediate container 3cb224df2841
 ---> 34be7496817b
Step 3/31 : COPY calendso/apps/web/package.json calendso/apps/web/yarn.lock ./
 ---> f22c2b1deaa7
Step 4/31 : COPY calendso/apps/web/prisma prisma
COPY failed: file not found in build context or excluded by .dockerignore: stat calendso/apps/web/prisma: file does not exist
ERROR: Service 'calendso' failed to build : Build failed

Error: Could not find a production build in the '/app/.next' directory.

When I try to docker-compose up -d --build, the build is completed successfully but the calendso app container keeps restarting. Looking into docker logs, I get these errors:

+ /app/scripts/wait-for-it.sh db:5432 -- echo 'db is up'
db is up
+ npx prisma db push
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "calendso", schema "public" at "db:5432"

The database is already in sync with the Prisma schema.

✔ Generated Prisma Client (2.30.3) to ./node_modules/@prisma/client in 746ms

+ yarn start
yarn run v1.22.5
$ next start
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - Loaded env from /app/.env
Error: Could not find a production build in the '/app/.next' directory. Try building your app with 'next build' before starting the production server. https://nextjs.org/docs/messages/production-start-no-build-id
    at Server.readBuildId (/app/node_modules/next/dist/server/next-server.js:1573:23)
    at new Server (/app/node_modules/next/dist/server/next-server.js:92:29)
    at NextServer.createServer (/app/node_modules/next/dist/server/next.js:107:16)
    at async /app/node_modules/next/dist/server/next.js:119:31
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
+ /app/scripts/wait-for-it.sh db:5432 -- echo 'db is up'
db is up
+ npx prisma db push
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "calendso", schema "public" at "db:5432"

The database is already in sync with the Prisma schema.

✔ Generated Prisma Client (2.30.3) to ./node_modules/@prisma/client in 684ms

┌─────────────────────────────────────────────────────────┐
│  Update available 2.30.3 -> 3.2.1                       │
│                                                         │
│  This is a major update - please follow the guide at    │
│  https://pris.ly/d/major-version-upgrade                │
│                                                         │
│  Run the following to update                            │
│    npm i --save-dev prisma@latest                       │
│    npm i @prisma/client@latest                          │
└─────────────────────────────────────────────────────────┘
+ yarn start
yarn run v1.22.5
$ next start
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - Loaded env from /app/.env
Error: Could not find a production build in the '/app/.next' directory. Try building your app with 'next build' before starting the production server. https://nextjs.org/docs/messages/production-start-no-build-id
    at Server.readBuildId (/app/node_modules/next/dist/server/next-server.js:1573:23)
    at new Server (/app/node_modules/next/dist/server/next-server.js:92:29)
    at NextServer.createServer (/app/node_modules/next/dist/server/next.js:107:16)
    at async /app/node_modules/next/dist/server/next.js:119:31
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
+ /app/scripts/wait-for-it.sh db:5432 -- echo 'db is up'
db is up
+ npx prisma db push
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "calendso", schema "public" at "db:5432"

The database is already in sync with the Prisma schema.

✔ Generated Prisma Client (2.30.3) to ./node_modules/@prisma/client in 459ms

+ yarn start
yarn run v1.22.5
$ next start
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - Loaded env from /app/.env

docker-compose up --build fails

Trying to build the image with:

docker-compose up --build

and I get the following error:

COPY calendso/package.json calendso/yarn.lock ./
ERROR: Service 'calendso' failed to build: COPY failed: file not found in build context or excluded by .dockerignore: stat calendso/package.json: file does not exist

Not starting: Module_not_found

After docker-compose up --build
I get this on startup:

✔ Generated Prisma Client (2.30.3) to ./node_modules/@prisma/client in 530ms
calendso_1  |
calendso_1  | + yarn start
calendso_1  | yarn run v1.22.15
calendso_1  | $ next start
calendso_1  | ready - started server on 0.0.0.0:3000, url: http://localhost:3000
calendso_1  | Error: failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error
calendso_1  | Error: Cannot find module '@next/bundle-analyzer'
calendso_1  | Require stack:
calendso_1  | - /app/next.config.js
calendso_1  | - /app/node_modules/next/dist/server/config.js
calendso_1  | - /app/node_modules/next/dist/server/next.js
calendso_1  | - /app/node_modules/next/dist/server/lib/start-server.js
calendso_1  | - /app/node_modules/next/dist/cli/next-start.js
calendso_1  | - /app/node_modules/next/dist/bin/next
calendso_1  |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
calendso_1  |     at Function.mod._resolveFilename (/app/node_modules/next/dist/build/webpack/require-hook.js:96:28)
calendso_1  |     at Function.Module._load (internal/modules/cjs/loader.js:746:27)
calendso_1  |     at Module.require (internal/modules/cjs/loader.js:974:19)
calendso_1  |     at require (internal/modules/cjs/helpers.js:93:18)
calendso_1  |     at Object.<anonymous> (/app/next.config.js:5:28)
calendso_1  |     at Module._compile (internal/modules/cjs/loader.js:1085:14)
calendso_1  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
calendso_1  |     at Module.load (internal/modules/cjs/loader.js:950:32)
calendso_1  |     at Function.Module._load (internal/modules/cjs/loader.js:790:12) {
calendso_1  |   code: 'MODULE_NOT_FOUND',
calendso_1  |   requireStack: [
calendso_1  |     '/app/next.config.js',
calendso_1  |     '/app/node_modules/next/dist/server/config.js',
calendso_1  |     '/app/node_modules/next/dist/server/next.js',
calendso_1  |     '/app/node_modules/next/dist/server/lib/start-server.js',
calendso_1  |     '/app/node_modules/next/dist/cli/next-start.js',
calendso_1  |     '/app/node_modules/next/dist/bin/next'
calendso_1  |   ]
calendso_1  | }
calendso_1  | error Command failed with exit code 1.

How can I resolve this?
Thanks for help

Database url not read from .env file.

Following the steps to the letter in this, it appears that the postgres url supplied in the .env file is not passed to the build process.

This results in errors both in the docker-compose logs output, and also error messages visible via Prisma studio.

calendso_1  | Prisma schema loaded from prisma/schema.prisma
calendso_1  | Error: Get config: Schema Parsing P1012
calendso_1  |
calendso_1  | error: Error validating datasource `db`: the URL must start with the protocol `postgresql://` or `postgres://`.
calendso_1  |   -->  schema.prisma:6
calendso_1  |    |
calendso_1  |  5 |   provider = "postgresql"
calendso_1  |  6 |   url      = env("DATABASE_URL")
calendso_1  |    |
calendso_1  |
calendso_1  | Validation Error Count: 1
calendso_1  |

image

For what it's worth, manually updating calendso/prisma/schema.prisma with the desired URL allows Calendso to successfully deploy, but is not an ideal solution.

calendso built docker image fails to launch

EDIT:
@zephleggett answer fixed this issue: #23 (comment)

I have spent the last couple of days trying to find what is causing this issue and have not found any solutions; I am at a loss.

  • calendso works standalone eg: yarn start.
  • postgress docker container works.
  • followed the readme instructions precisely and left every option as default.
  • calendso docker container does not work... hmmm

the specific error i get is:

calendso-docker-calendso-1  | $ next start
calendso-docker-calendso-1  | ready - started server on 0.0.0.0:3000, url: http://localhost:3000
calendso-docker-calendso-1  | Error: failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error
calendso-docker-calendso-1  | Error: Cannot find module './next-i18next.config'
calendso-docker-calendso-1  | Require stack:
calendso-docker-calendso-1  | - /app/next.config.js
calendso-docker-calendso-1  | - /app/node_modules/next/dist/server/config.js
calendso-docker-calendso-1  | - /app/node_modules/next/dist/server/next.js
calendso-docker-calendso-1  | - /app/node_modules/next/dist/server/lib/start-server.js
calendso-docker-calendso-1  | - /app/node_modules/next/dist/cli/next-start.js
calendso-docker-calendso-1  | - /app/node_modules/next/dist/bin/next
calendso-docker-calendso-1  |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
calendso-docker-calendso-1  |     at Function.mod._resolveFilename (/app/node_modules/next/dist/build/webpack/require-hook.js:96:28)
calendso-docker-calendso-1  |     at Function.Module._load (internal/modules/cjs/loader.js:746:27)
calendso-docker-calendso-1  |     at Module.require (internal/modules/cjs/loader.js:974:19)
calendso-docker-calendso-1  |     at require (internal/modules/cjs/helpers.js:93:18)
calendso-docker-calendso-1  |     at Object.<anonymous> (/app/next.config.js:3:18)
calendso-docker-calendso-1  |     at Module._compile (internal/modules/cjs/loader.js:1085:14)
calendso-docker-calendso-1  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
calendso-docker-calendso-1  |     at Module.load (internal/modules/cjs/loader.js:950:32)
calendso-docker-calendso-1  |     at Function.Module._load (internal/modules/cjs/loader.js:790:12) {
calendso-docker-calendso-1  |   code: 'MODULE_NOT_FOUND',
calendso-docker-calendso-1  |   requireStack: [
calendso-docker-calendso-1  |     '/app/next.config.js',
calendso-docker-calendso-1  |     '/app/node_modules/next/dist/server/config.js',
calendso-docker-calendso-1  |     '/app/node_modules/next/dist/server/next.js',
calendso-docker-calendso-1  |     '/app/node_modules/next/dist/server/lib/start-server.js',
calendso-docker-calendso-1  |     '/app/node_modules/next/dist/cli/next-start.js',
calendso-docker-calendso-1  |     '/app/node_modules/next/dist/bin/next'
calendso-docker-calendso-1  |   ]
calendso-docker-calendso-1  | }
calendso-docker-calendso-1  | error Command failed with exit code 1.

if i remove the not found module, it comes up with another error:

calendso-docker-calendso-1  | $ next start
calendso-docker-calendso-1  | ready - started server on 0.0.0.0:3000, url: http://localhost:3000
calendso-docker-calendso-1  | Error: failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error
calendso-docker-calendso-1  | Error: Cannot find module '@next/bundle-analyzer'
calendso-docker-calendso-1  | Require stack:
calendso-docker-calendso-1  | - /app/next.config.js
calendso-docker-calendso-1  | - /app/node_modules/next/dist/server/config.js
calendso-docker-calendso-1  | - /app/node_modules/next/dist/server/next.js
calendso-docker-calendso-1  | - /app/node_modules/next/dist/server/lib/start-server.js
calendso-docker-calendso-1  | - /app/node_modules/next/dist/cli/next-start.js
calendso-docker-calendso-1  | - /app/node_modules/next/dist/bin/next
calendso-docker-calendso-1  |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
calendso-docker-calendso-1  |     at Function.mod._resolveFilename (/app/node_modules/next/dist/build/webpack/require-hook.js:96:28)
calendso-docker-calendso-1  |     at Function.Module._load (internal/modules/cjs/loader.js:746:27)
calendso-docker-calendso-1  |     at Module.require (internal/modules/cjs/loader.js:974:19)
calendso-docker-calendso-1  |     at require (internal/modules/cjs/helpers.js:93:18)
calendso-docker-calendso-1  |     at Object.<anonymous> (/app/next.config.js:5:28)
calendso-docker-calendso-1  |     at Module._compile (internal/modules/cjs/loader.js:1085:14)
calendso-docker-calendso-1  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
calendso-docker-calendso-1  |     at Module.load (internal/modules/cjs/loader.js:950:32)
calendso-docker-calendso-1  |     at Function.Module._load (internal/modules/cjs/loader.js:790:12) {
calendso-docker-calendso-1  |   code: 'MODULE_NOT_FOUND',
calendso-docker-calendso-1  |   requireStack: [
calendso-docker-calendso-1  |     '/app/next.config.js',
calendso-docker-calendso-1  |     '/app/node_modules/next/dist/server/config.js',
calendso-docker-calendso-1  |     '/app/node_modules/next/dist/server/next.js',
calendso-docker-calendso-1  |     '/app/node_modules/next/dist/server/lib/start-server.js',
calendso-docker-calendso-1  |     '/app/node_modules/next/dist/cli/next-start.js',
calendso-docker-calendso-1  |     '/app/node_modules/next/dist/bin/next'
calendso-docker-calendso-1  |   ]
calendso-docker-calendso-1  | }
calendso-docker-calendso-1  | error Command failed with exit code 1.

Full console build and error output:

shawn@Shawns-MacBook-Pro calendso-docker % docker-compose up --build                 

[+] Building 337.7s (23/23) FINISHED                                                                                                                                                                                                                       
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                  0.0s
 => => transferring dockerfile: 821B                                                                                                                                                                                                                  0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                     0.0s
 => => transferring context: 2B                                                                                                                                                                                                                       0.0s
 => [internal] load metadata for docker.io/library/node:14-alpine                                                                                                                                                                                     2.1s
 => [auth] library/node:pull token for registry-1.docker.io                                                                                                                                                                                           0.0s
 => [internal] load build context                                                                                                                                                                                                                     0.1s
 => => transferring context: 38.22kB                                                                                                                                                                                                                  0.1s
 => [deps 1/6] FROM docker.io/library/node:14-alpine@sha256:a251de4db0e0632446c0ba62adbe1e37ff148a53732e4574d2ed0f5462cc4407                                                                                                                          7.4s
 => => resolve docker.io/library/node:14-alpine@sha256:a251de4db0e0632446c0ba62adbe1e37ff148a53732e4574d2ed0f5462cc4407                                                                                                                               0.0s
 => => sha256:557f00fb5d780597b0e7bcdc6d93abeb7e73599bcbfeba5832dc5646a8d3f120 1.16kB / 1.16kB                                                                                                                                                        0.0s
 => => sha256:fe39f43f1d22b08e20e0e4493494bd2ae1270d2d68c20a65d77ac2a46e2054ab 6.53kB / 6.53kB                                                                                                                                                        0.0s
 => => sha256:a251de4db0e0632446c0ba62adbe1e37ff148a53732e4574d2ed0f5462cc4407 1.43kB / 1.43kB                                                                                                                                                        0.0s
 => => sha256:c7ad74aede755227d79ac0411c549922ad260721212dcb2833a558798a24e032 36.37MB / 36.37MB                                                                                                                                                      5.1s
 => => sha256:995c08d8ac36c3e26055c6a140c56fcc09741c9aadab8c226912fe3e6283a0fb 2.24MB / 2.24MB                                                                                                                                                        1.6s
 => => sha256:eac3374fce0fd639864aafd04a3f4886cea683230faa360ae57f557232c0351d 282B / 282B                                                                                                                                                            0.8s
 => => extracting sha256:c7ad74aede755227d79ac0411c549922ad260721212dcb2833a558798a24e032                                                                                                                                                             1.8s
 => => extracting sha256:995c08d8ac36c3e26055c6a140c56fcc09741c9aadab8c226912fe3e6283a0fb                                                                                                                                                             0.1s
 => => extracting sha256:eac3374fce0fd639864aafd04a3f4886cea683230faa360ae57f557232c0351d                                                                                                                                                             0.0s
 => [deps 2/6] RUN apk add --no-cache libc6-compat                                                                                                                                                                                                    1.0s
 => [builder 2/5] WORKDIR /app                                                                                                                                                                                                                        0.1s
 => [builder 3/5] COPY calendso .                                                                                                                                                                                                                     0.2s
 => [deps 3/6] WORKDIR /app                                                                                                                                                                                                                           0.0s
 => [deps 4/6] COPY calendso/package.json calendso/yarn.lock ./                                                                                                                                                                                       0.0s
 => [deps 5/6] COPY calendso/prisma prisma                                                                                                                                                                                                            0.0s
 => [deps 6/6] RUN yarn install --frozen-lockfile                                                                                                                                                                                                   156.3s
 => [builder 4/5] COPY --from=deps /app/node_modules ./node_modules                                                                                                                                                                                  12.3s 
 => [builder 5/5] RUN yarn build && yarn install --production --ignore-scripts --prefer-offline                                                                                                                                                     110.9s 
 => [runner 3/9] COPY --from=builder /app/next.config.js ./                                                                                                                                                                                           0.0s 
 => [runner 4/9] COPY --from=builder /app/public ./public                                                                                                                                                                                             0.0s 
 => [runner 5/9] COPY --from=builder /app/.next ./.next                                                                                                                                                                                               0.3s 
 => [runner 6/9] COPY --from=builder /app/node_modules ./node_modules                                                                                                                                                                                 9.1s 
 => [runner 7/9] COPY --from=builder /app/package.json ./package.json                                                                                                                                                                                 0.0s 
 => [runner 8/9] COPY --from=builder /app/prisma ./prisma                                                                                                                                                                                             0.1s 
 => [runner 9/9] COPY  scripts scripts                                                                                                                                                                                                                0.0s
 => exporting to image                                                                                                                                                                                                                               11.1s
 => => exporting layers                                                                                                                                                                                                                              11.1s
 => => writing image sha256:dae8c8539935f5e3576dda643d75f492f4de2357d2cbd48d40e67c0202bfc424                                                                                                                                                          0.0s
 => => naming to docker.io/library/calendso-docker_calendso                                                                                                                                                                                           0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
[+] Running 3/3
 ⠿ Network calendso-docker_default       Created                                                                                                                                                                                                      0.1s
 ⠿ Container calendso-docker-db-1        Created                                                                                                                                                                                                      0.2s
 ⠿ Container calendso-docker-calendso-1  Created                                                                                                                                                                                                      0.1s
Attaching to calendso-docker-calendso-1, calendso-docker-db-1
calendso-docker-db-1        | 
calendso-docker-db-1        | PostgreSQL Database directory appears to contain a database; Skipping initialization
calendso-docker-db-1        | 
calendso-docker-db-1        | 2021-10-13 11:49:41.635 UTC [1] LOG:  starting PostgreSQL 14.0 (Debian 14.0-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
calendso-docker-db-1        | 2021-10-13 11:49:41.636 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
calendso-docker-db-1        | 2021-10-13 11:49:41.636 UTC [1] LOG:  listening on IPv6 address "::", port 5432
calendso-docker-db-1        | 2021-10-13 11:49:41.639 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
calendso-docker-db-1        | 2021-10-13 11:49:41.662 UTC [27] LOG:  database system was shut down at 2021-10-12 21:47:04 UTC
calendso-docker-db-1        | 2021-10-13 11:49:41.733 UTC [1] LOG:  database system is ready to accept connections
calendso-docker-calendso-1  | + /app/scripts/wait-for-it.sh db:5432 -- echo 'db is up'
calendso-docker-calendso-1  | db is up
calendso-docker-calendso-1  | + npx prisma db push
calendso-docker-calendso-1  | Prisma schema loaded from prisma/schema.prisma
calendso-docker-calendso-1  | Datasource "db": PostgreSQL database "calendso", schema "public" at "db:5432"
calendso-docker-calendso-1  | 
calendso-docker-calendso-1  | The database is already in sync with the Prisma schema.
calendso-docker-calendso-1  | 
✔ Generated Prisma Client (2.30.3) to ./node_modules/@prisma/client in 411ms
calendso-docker-calendso-1  | 
calendso-docker-calendso-1  | + yarn start
calendso-docker-calendso-1  | yarn run v1.22.15
calendso-docker-calendso-1  | $ next start
calendso-docker-calendso-1  | ready - started server on 0.0.0.0:3000, url: http://localhost:3000
calendso-docker-calendso-1  | Error: failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error
calendso-docker-calendso-1  | Error: Cannot find module './next-i18next.config'
calendso-docker-calendso-1  | Require stack:
calendso-docker-calendso-1  | - /app/next.config.js
calendso-docker-calendso-1  | - /app/node_modules/next/dist/server/config.js
calendso-docker-calendso-1  | - /app/node_modules/next/dist/server/next.js
calendso-docker-calendso-1  | - /app/node_modules/next/dist/server/lib/start-server.js
calendso-docker-calendso-1  | - /app/node_modules/next/dist/cli/next-start.js
calendso-docker-calendso-1  | - /app/node_modules/next/dist/bin/next
calendso-docker-calendso-1  |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
calendso-docker-calendso-1  |     at Function.mod._resolveFilename (/app/node_modules/next/dist/build/webpack/require-hook.js:96:28)
calendso-docker-calendso-1  |     at Function.Module._load (internal/modules/cjs/loader.js:746:27)
calendso-docker-calendso-1  |     at Module.require (internal/modules/cjs/loader.js:974:19)
calendso-docker-calendso-1  |     at require (internal/modules/cjs/helpers.js:93:18)
calendso-docker-calendso-1  |     at Object.<anonymous> (/app/next.config.js:3:18)
calendso-docker-calendso-1  |     at Module._compile (internal/modules/cjs/loader.js:1085:14)
calendso-docker-calendso-1  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
calendso-docker-calendso-1  |     at Module.load (internal/modules/cjs/loader.js:950:32)
calendso-docker-calendso-1  |     at Function.Module._load (internal/modules/cjs/loader.js:790:12) {
calendso-docker-calendso-1  |   code: 'MODULE_NOT_FOUND',
calendso-docker-calendso-1  |   requireStack: [
calendso-docker-calendso-1  |     '/app/next.config.js',
calendso-docker-calendso-1  |     '/app/node_modules/next/dist/server/config.js',
calendso-docker-calendso-1  |     '/app/node_modules/next/dist/server/next.js',
calendso-docker-calendso-1  |     '/app/node_modules/next/dist/server/lib/start-server.js',
calendso-docker-calendso-1  |     '/app/node_modules/next/dist/cli/next-start.js',
calendso-docker-calendso-1  |     '/app/node_modules/next/dist/bin/next'
calendso-docker-calendso-1  |   ]
calendso-docker-calendso-1  | }
calendso-docker-calendso-1  | error Command failed with exit code 1.
calendso-docker-calendso-1  | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
calendso-docker-calendso-1 exited with code 1

any ideas?!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.