-
Notifications
You must be signed in to change notification settings - Fork 13.2k
feat: add dev container for zero-config local development #28915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gfernandez-me
wants to merge
4
commits into
calcom:main
Choose a base branch
from
gfernandez-me:feat/add-devcontainer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+111
−3
Open
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
1472242
feat: add dev container for zero-config local development
gfernandez-me 243b205
fix: remove Redis host port binding to prevent startup conflicts
gfernandez-me ca3c745
Merge branch 'main' into feat/add-devcontainer
gfernandez-me 43e13bb
chore: update database credentials in .env.example and README.md
gfernandez-me File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "name": "Cal.diy", | ||
| "dockerComposeFile": "docker-compose.yml", | ||
| "service": "app", | ||
| "workspaceFolder": "/workspace", | ||
|
|
||
| // Override DATABASE_URL/REDIS_URL to use the Docker service names. | ||
| // These take precedence over .env, so no need to edit that file for the DB connection. | ||
| "remoteEnv": { | ||
| "DATABASE_URL": "postgresql://postgres:postgres@database:5432/calendso", | ||
| "DATABASE_DIRECT_URL": "postgresql://postgres:postgres@database:5432/calendso", | ||
| "REDIS_URL": "redis://redis:6379" | ||
| }, | ||
|
|
||
| // On first container start: copy .env.example → .env only when .env is absent, then always install deps | ||
| // HUSKY=0 skips git hook installation, which fails in container environments | ||
| "postCreateCommand": "[ -f .env ] || cp .env.example .env; HUSKY=0 yarn install", | ||
|
|
||
| // Forward the web app port to the host | ||
| "forwardPorts": [3000], | ||
|
|
||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "biomejs.biome", | ||
| "bradlc.vscode-tailwindcss", | ||
| "prisma.prisma" | ||
| ] | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Dev container services - PostgreSQL and Redis for local development. | ||
| # The app itself runs in the devcontainer, not here. | ||
| services: | ||
| app: | ||
| image: mcr.microsoft.com/devcontainers/javascript-node:1-20-bookworm | ||
| volumes: | ||
| - ..:/workspace:cached | ||
| command: sleep infinity | ||
| depends_on: | ||
| - database | ||
| - redis | ||
|
|
||
| database: | ||
| image: postgres:15-alpine | ||
| restart: unless-stopped | ||
| environment: | ||
| POSTGRES_USER: postgres | ||
| POSTGRES_PASSWORD: postgres | ||
| POSTGRES_DB: calendso | ||
| ports: | ||
| # Expose on 5450 to match DATABASE_URL in .env.example | ||
| - "5450:5432" | ||
| volumes: | ||
| - postgres-data:/var/lib/postgresql/data | ||
|
|
||
| redis: | ||
| image: redis:7-alpine | ||
| restart: unless-stopped | ||
| volumes: | ||
| - redis-data:/data | ||
|
|
||
| volumes: | ||
| postgres-data: | ||
| redis-data: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.