Skip to content

Conversation

@officialasit
Copy link

@officialasit officialasit commented Apr 14, 2021

Docker Support for Calendso. 🐳

Docker Support Added

  • Dockerfile to build a docker image
  • Docker Compose to Setup production environment with a few commands.

ToDo Tasks:

  • Create a Docker-Hub Account on Calendso & Push the Docker Image.
  • Setup CI/CD to build docker Images & Auto Push on Docker hub.

@vercel
Copy link

vercel bot commented Apr 14, 2021

@officialasit is attempting to deploy a commit to the calendso Team on Vercel.

To accomplish this, @officialasit needs to request access to the Team.

Afterwards, an owner of the Team is required to accept their membership request.

@officialasit officialasit changed the title 🐳 Added Docker Support Added Docker Support Apr 14, 2021
@gonrial gonrial mentioned this pull request Apr 15, 2021
@skluthe
Copy link

skluthe commented Apr 15, 2021

Didn't see this before my PR https://github.com/calendso/calendso/pull/18. There may be some stuff from there to help with this. It's using the LSIO base as they follow best practices and include s6supervisor which allows pre-init scripts and service management. It also includes nginx to serve the project as that'll likely be better than a dev server.

@marziman
Copy link

Hello @ALL I was about to bring the docker support. Any place I shall jump in, or focus on Kubernetes?

@officialasit
Copy link
Author

@gonrial I've commited the changes onto my Forked Repo, but for some reason its not appearing into this pull request.

@gisostallenberg
Copy link

For people who want to create a docker image before this is merged you could use a Dockerfile like this:

FROM alpine/git:v2.30.1 as src

RUN git clone https://github.com/calendso/calendso.git /srv

FROM node:15-alpine3.13

WORKDIR /opt/app
COPY --from=src /srv/. .
RUN adduser -S app && \
    yarn install && \
    chown -R app .

USER app
EXPOSE 3000 5555

CMD ["yarn", "dev"]

@aminnairi
Copy link

For people who want to create a docker image before this is merged you could use a Dockerfile like this:

RUN adduser -S app && \
    yarn install && \

No need to add a new user since there is already one that has a login and is named node and has its home folder at /home/node with the permissions 1000:1000.

@whiteyhat
Copy link

Any estimates on making this happen?

@mcnaveen
Copy link

It got updated 5 hours before. Is it good to go?

https://hub.docker.com/r/ctadeu/calendso

@marcoscannabrava
Copy link

Good. I suggest adding adminer to docker-compose too.

  adminer:
    image: adminer
    ports:
      - 8080:8080
    environment:
      ADMINER_DEFAULT_SERVER: postgres:5432

@Soneji
Copy link

Soneji commented Apr 23, 2021

Can we have the docker-compose.yml file in the root directory? I think it might be easier for people who git clone the project to use with docker. Or maybe a link to it from the main README?

@Soneji
Copy link

Soneji commented Apr 23, 2021

When running docker-compose up -d I get this error:

calendso_1  | Environment variables loaded from .env
calendso_1  | Prisma schema loaded from schema.prisma
calendso_1  | Datasource "db": PostgreSQL database "calendso", schema "public" at "postgres:5432"
calendso_1  | Error: P1001: Can't reach database server at `postgres`:`5432`
calendso_1  | 
calendso_1  | Please make sure your database server is running at `postgres`:`5432`.

The way to fix it is just by running docker-compose up -d again. Maybe a script similar to this could be added to the entrypoint:

until psql --host=$DB_HOST --port=$DB_PORT --username=$DB_USER $DB_NAME -w #&>/dev/null
do
  echo "Waiting for PostgreSQL..."
  sleep 5
done

echo "DB is up!"

POSTGRES_USER: postgres
POSTGRES_PASSWORD: p0stgr3s_pass
ports:
- '5432:5432'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to expose this port? The Calendso container will already find the database because of Docker's internal routing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a best practice to document them, for what it's worth. It also helps if you want to use an external postgresql client.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend leaving it there but commented out as it could be a security issue for anyone who adds the compose file to their server and exposes their db port by accident. Docker exposed ports often bypass firewalls too!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rberrelleza, why is it a best practice? In the container on the Docker hub it's probably already mentioned if you want to use it that way. What it does now is use that port (possibly blocking other postgres services) and leave a security risk as @Soneji mentioned.
I should/could have been more clear of my reasoning, but these are the biggest reasons to not expose a port if it's not needed. Postgres isn't a service that needs to communicate with the outside world in this context.

@codefriar
Copy link

While I can get the docker image (https://hub.docker.com/r/ctadeu/calendso) to run, whenever I load it in the browser, I get the following stack trace in the docker-compose logs. (Docker compose file below stacktrace)

calendso_1  | TypeError: Object(...) is not a function
calendso_1  |     at Function.Login.getInitialProps (webpack-internal:///./pages/auth/login.tsx:173:88)
calendso_1  |     at loadGetInitialProps (/usr/src/app/node_modules/next/dist/next-server/lib/utils.js:5:101)
calendso_1  |     at loadGetInitialProps (/usr/src/app/node_modules/next/dist/next-server/lib/utils.js:5:24)
calendso_1  |     at renderToHTML (/usr/src/app/node_modules/next/dist/next-server/server/render.js:28:1529)
calendso_1  |     at runMicrotasks (<anonymous>)
calendso_1  |     at processTicksAndRejections (internal/process/task_queues.js:97:5)
calendso_1  |     at async /usr/src/app/node_modules/next/dist/next-server/server/next-server.js:109:97
calendso_1  |     at async /usr/src/app/node_modules/next/dist/next-server/server/next-server.js:102:142
calendso_1  |     at async DevServer.renderToHTMLWithComponents (/usr/src/app/node_modules/next/dist/next-server/server/next-server.js:134:387)
calendso_1  |     at async DevServer.renderToHTML (/usr/src/app/node_modules/next/dist/next-server/server/next-server.js:135:522)
calendso_1  |     at async DevServer.renderToHTML (/usr/src/app/node_modules/next/dist/server/next-dev-server.js:34:578)
calendso_1  |     at async DevServer.render (/usr/src/app/node_modules/next/dist/next-server/server/next-server.js:72:236)
calendso_1  |     at async Object.fn (/usr/src/app/node_modules/next/dist/next-server/server/next-server.js:56:580)
calendso_1  |     at async Router.execute (/usr/src/app/node_modules/next/dist/next-server/server/router.js:23:67)
calendso_1  |     at async DevServer.run (/usr/src/app/node_modules/next/dist/next-server/server/next-server.js:66:1042)
calendso_1  |     at async DevServer.handleRequest (/usr/src/app/node_modules/next/dist/next-server/server/next-server.js:34:504)

docker-compose.yml

---
version: '3'

# This networks section required for the package to be visible to Traefik.
# DO NOT Remove
networks:
  traefik_network:
    external:
      name: vivumlab_traefik
  calendso_network:

services:
  calendso:
    restart: unless-stopped
    # REQUIRED
    image: ctadeu/calendso:0.0.11
    networks:
      - traefik_network
      - calendso_network
    depends_on:
      - db
    environment:
      - DATABASE_URL=postgresql://calendso_user:RANDOM@db:5432
      - GOOGLE_API_CREDENTIALS=REDACTED
      - NEXTAUTH_URL=https://REDACTED
      - MS_GRAPH_CLIENT_ID=foo
      - MS_GRAPH_CLIENT_SECRET=bar
    volumes:
      - "/home/kpoorman/vivumlab/calendso/config:/etc/calendso"
      - "/home/kpoorman/vivumlab/calendso/logs:/var/log/calendso"
      - "/home/kpoorman/vivumlab/calendso/data:/var/opt/calendso"
      - "/home/kpoorman/vivumlab/calendso/certs:/certs"
      - "/home/kpoorman/vivumlab/calendso/backups:/var/opt/calendso/backups"
    labels:
      - "traefik.http.services.calendso.loadbalancer.server.scheme=http"
      - "traefik.http.services.calendso.loadbalancer.server.port=3000"
      - "traefik.enable=true"
      - "traefik.docker.network=vivumlab_traefik"
      - "traefik.http.routers.calendso-http.service=calendso"
      - "traefik.http.routers.calendso-http.rule=Host(`REDACTED`)"
      - "traefik.http.routers.calendso-http.entrypoints=http"
      - "traefik.http.routers.calendso-http.middlewares=redirect@file"
      - "traefik.http.routers.calendso.service=calendso"
      - "traefik.http.routers.calendso.rule=Host(`REDACTED`)"
      - "traefik.http.routers.calendso.entrypoints=https"
      - "traefik.http.routers.calendso.middlewares=hsts@file"
      - "traefik.http.routers.calendso.tls=true"
      - "traefik.http.routers.calendso.tls.certresolver=dns"
      - "traefik.http.routers.calendso.tls.domains[0].main=REDACTED.com"
      - "traefik.http.routers.calendso.tls.domains[0].sans=*.REDACTED.com"


  db:
    image: "postgres"
    restart: unless-stopped
    networks:
      - calendso_network
    environment:
      - POSTGRES_DB=calendso_db
      - POSTGRES_PASSWORD=RANDOM
      - POSTGRES_USER=calendso_user
      - PGDATA=/database
    volumes:
      - "/home/kpoorman/vivumlab/calendso/db:/var/lib/postgresql/data"
      - tmpfs_calendso_vol:/cache

volumes:
  tmpfs_calendso_vol:
    driver_opts:
      type: tmpfs
      device: tmpfs

Any help is appreciated.

@pumfleet
Copy link
Contributor

Closing this as we don't officially support Docker installations. At some point we may reconsider supporting Docker however, so thanks for all of your help.

@pumfleet pumfleet closed this Jun 22, 2021
@astratagem
Copy link

astratagem commented Jun 22, 2021

we don't officially support Docker installations

Why not? It would significantly reduce the barrier to entry for new developer-users.

I’m curious why this PR was closed… doesn’t it add support for Docker installations? If you don’t want to support Docker, couldn’t you just say that in the readme and still allow merging PRs like this one?

@dl-lim
Copy link

dl-lim commented Jun 28, 2021

Wow, I just found out about this amazing project and here I find that one of the most popular deployment tools is not going to be supported and the issue is closed just like that, discouraging further discussion on it. Why take this approach towards your users' wishes? Is this what calendso's approach is towards open source? Please let us know before we invest further in the project

@joaomelorodrigues
Copy link

Bumped on the same need. Docker should really be a thing to use here.

@dl-lim dl-lim mentioned this pull request Jun 29, 2021
@mattronix
Copy link

Can we please get docker support its an absolute must in the cloud era.

@pumfleet
Copy link
Contributor

From the point of view of this project; we would like to support every hosting option out there; whether Docker, K8s, Nginx, Apache, Vercel, Netlify, ...

The challenge we are facing is the following: Once we add a hosting option (in this case Docker) to our repository: we are expected to support that hosting option in an official capacity. Internally, we are currently focused fully on feature-parity with our competitors, and release our first stable version; and this means we don't really have resource that can be allocated to maintain Docker within our team, so maintaining Docker would be impossible on our end at this point in time.

If we merge Docker and something breaks, this is likely result in damage to our reputation as a company - and crucially, we wouldn't have the internal knowledge to address this. Due to the nature of OS we are unable to guarantee the community will jump in either.

As the maintainer of this project however I do acknowledge this is something sorely wanted; and I am eager to find a solution that works for the community as a whole. Any feedback offering suggestions to resolve this challenge are much appreciated.

@alexanderadam
Copy link

alexanderadam commented Jun 29, 2021

How about explicitly writing that you won't official maintain the Docker image but you will accept fixes and documentation for it (and maybe configure a GH action that automatically publishes releases on an official calendso organisation image on Docker Hub — it's free and already usable with GitHub)?

This way you won't need to feel guilty once the image brakes broke but you still allow all systems that rely on containers (i.e. Docker, K8s, podman, …) to be used.

@mattronix
Copy link

Indeed that would be awesome, even if the PR is community supported, or just make it a separate repo with just the files and say it’s without warranty and all prs are welcome might make it easier to decouple the code from the maintenance process of Docker.

git clone
Docker build
Here’s a compose file
Your on your own

If you have CI would be more then happy to help automate the build process I have it working already for us.

@emrysal
Copy link
Contributor

emrysal commented Jul 2, 2021

Hi everyone,

There is a new repository @ https://github.com/calendso/docker intended for Docker configuration files. I've taken the liberty to add some skeleton, structure to how I think it makes sense (after looking at similar repositories); and a start on the README.

Thanks to everyone that added and discussed this PR, and also the feedback that suggested this method. Please raise the PRs against the calendso/docker repo and let's get this merged in!

By the way, feel free to create an issue in the new repo if there's anything that need doing for:

  • Create a Docker-Hub Account on Calendso & Push the Docker Image; or
  • Setup CI/CD to build docker Images & Auto Push on Docker hub.

Ps. I set this up using submodules, but if it is preferred not to use them feel free to ditch.

Hope this helps,

@PeerRich
Copy link
Member

PeerRich commented Jul 3, 2021

Thank you everyone for helping out! This is really cool to see. I am glad we can finally bring Calendso to Docker, even though our core team has limited experience. Great community effort, thank you! 🎉

@officialasit
Copy link
Author

It's great to see that docker support for calendso has finally arrived. 🥳 ❤️

@PeerRich
Copy link
Member

PeerRich commented Jul 3, 2021

we're hoping to get at least one docker expert into the core team to call it "official docker image" and properly support it 🙏

zomars pushed a commit that referenced this pull request Feb 15, 2022
zomars pushed a commit that referenced this pull request May 23, 2023
devin-ai-integration bot pushed a commit that referenced this pull request Jan 14, 2026
- Fix #1: Weekly schedule now shows multiple time slots per day in AvailabilityTab
- Fix #2: Allow numeric input fields to be empty with proper validation
- Fix #3: Add native iOS date picker for date range in Limits tab
- Fix #4: Change 'Email verification' to 'Booker email verification' in Advanced tab
- Fix #5: Fix Requires confirmation comparison logic in buildPartialUpdatePayload
- Fix #6: Forward parameters toggle already working, verified wiring
- Fix #7: Add toggles for redirect booking URL and interface language in Advanced tab
- Fix #8: Increase scroll padding at bottom from 200 to 350 for better keyboard access
dhairyashiil added a commit that referenced this pull request Jan 14, 2026
* fix(companion): iOS event type detail fixes

- Fix #1: Weekly schedule now shows multiple time slots per day in AvailabilityTab
- Fix #2: Allow numeric input fields to be empty with proper validation
- Fix #3: Add native iOS date picker for date range in Limits tab
- Fix #4: Change 'Email verification' to 'Booker email verification' in Advanced tab
- Fix #5: Fix Requires confirmation comparison logic in buildPartialUpdatePayload
- Fix #6: Forward parameters toggle already working, verified wiring
- Fix #7: Add toggles for redirect booking URL and interface language in Advanced tab
- Fix #8: Increase scroll padding at bottom from 200 to 350 for better keyboard access

* fix(companion): conditional scroll padding for limits and advanced tabs only

* fix(companion): remove static date text from iOS date picker, keep only picker

* fix(companion): simplify iOS date picker to match RescheduleScreen pattern

* update code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.