Skip to content

Conversation

gabidb
Copy link

@gabidb gabidb commented Dec 3, 2023

What does this PR do?

Fixes [CAL-2635] by changing build-time environment variables to run-time.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How should this be tested?

Scenario 1: Verify Image Build and Container Run

  • Build the image with (here you can see the logs):
    docker build --build-arg DATABASE_URL="postgresql://postgres:@host.docker.internal:5432/calendso" -t calcom-image-test .

  • Run a container using the image with runtime variables:
    docker run \ -e NEXTAUTH_SECRET="your_secret" \ -e DA TABASE_URL="your_database_url" \ -e CALENDSO_ENCRYPTION_KEY="your_key" \ -e NEXT_PUBLIC_WEBAPP_URL="http://localhost:3000" calcom-image-test

  • Expected Outcome: The container should start successfully with the provided variables. Test with invalid data to verify failure at runtime.

Scenario 2: Docker Compose

  • Start the setup using:
    docker compose up -d

Disclaimer

At this point Build arguments cannot be removed as there are checks in the background for the existence of these variables.
While this makes sense when setting those variables build-time, when requiring the variables to be set only run-time, these checks might be redundant.

@krumware
Copy link
Collaborator

Closing in favor of recent updates

@krumware krumware closed this Oct 17, 2025
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.

2 participants