Skip to content
This repository was archived by the owner on Oct 29, 2025. It is now read-only.

Conversation

@adrian-d-hidalgo
Copy link

@adrian-d-hidalgo adrian-d-hidalgo commented Dec 3, 2023

What does this PR do?

This PR removes unnecessary code and processes and updates some commands to build a production bundle.

This PR complements calcom/cal.com#12686, so it should be updated to the latest commit to work correctly once merged.

Fixes #12032

Type of change

  • chore (non-breaking change which adds functionality)

How should this be tested?

  • clone repository git clone --recursive https://github.com/calcom/docker.git
  • make a copy of .env and .env.appStore from calcom examples, place them into the root docker project directory, and override whit your environment variables
  • make a copy from .env.database-example > .env.database
  • run docker-compose up

@emrysal
Copy link
Collaborator

emrysal commented Dec 3, 2023

@krumware for visibility.

The Docker build issues (or rather, having to rebuild after doing a docker pull to get the right env vars sorted) is an application issue; Could you elaborate more how this aims to resolve that?

@PIG208
Copy link

PIG208 commented Dec 3, 2023

Would it be helpful to revive #147?

@adrian-d-hidalgo
Copy link
Author

@krumware for visibility.

The Docker build issues (or rather, having to rebuild after doing a docker pull to get the right env vars sorted) is an application issue; Could you elaborate more how this aims to resolve that?

Hi @emrysal, I just pushed an update; the main goal now is that the image build process installs yarn dependencies and executes yarn build to generate the project bundle using mock environment variables (if you don't have them during the build process fails, this can later be overriden).

Finally you have the Docker image built you can bind .env files to pass your runtime variables like this:

docker run -p 127.0.0.1:3000:3000/tcp --volume "$(pwd)/.env:/calcom/.env" --volume "$(pwd)/.env.appStore:/calcom/.env.appStore"

With this new approach you can have an Official Docker Image that can be deployed individually that doesn't get generated with env keys, this satisfies with the issue that env variables should be runtime only now.

@krumware krumware self-requested a review December 3, 2023 18:56
@keithwillcode keithwillcode self-requested a review January 19, 2024 14:38
@compgeniuses
Copy link

looking forward to the implementations of these

@compgeniuses
Copy link

so the other PR seems to have closed in favour of this calcom/cal.com#13541

@komali2
Copy link

komali2 commented Feb 22, 2024

If I copy this PR, and follow the instructions, and then run docker compose up, i get this error:

[+] Building 6.2s (3/3) FINISHED                                                                                                    docker:default
 => [calcom internal] load build definition from Dockerfile                                                                                   0.9s
 => => transferring dockerfile: 1.45kB                                                                                                        0.0s
 => [calcom internal] load metadata for docker.io/library/node:18                                                                             0.1s
 => ERROR [calcom internal] load metadata for docker.io/library/builder-two:latest                                                            1.8s
------
 > [calcom internal] load metadata for docker.io/library/builder-two:latest:
------
failed to solve: builder-two: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CAL-2635] make cal.com dockerable – refactor constant.ts

6 participants