Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore: add devcontainer config to simplify contributing to Langfuse (#2267)

4t8ddb1692e178600
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
new file mode 100644
index 0000000000..ecf027de4c
--- /dev/null
+++ b/.devcontainer/devcontainer.json
@@ -0,0 +1,14 @@
+{
+ "name": "langfuse dev",
+ "image": "mcr.microsoft.com/devcontainers/javascript-node:20-bookworm",
+ "features": {
+ "ghcr.io/devcontainers/features/docker-in-docker:2": {
+ "version": "latest",
+ "moby": true
+ }
+ },
+ "forwardPorts": [3000],
+
+ "onCreateCommand": "npm install -g [email protected]",
+ "postCreateCommand": "cp .env.dev.example .env && pnpm run dx-f"
+}
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index c7911470cc..33166df5f4 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -151,6 +151,8 @@ Requirements
- Node.js 20 as specified in the [.nvmrc](.nvmrc)
- Docker to run the database locally
+**Note:** You can also simply run Langfuse in a **GitHub Codespace** via the provided devcontainer. To do this, click on the green "Code" button in the top right corner of the repository and select "Open with Codespaces".
+
**Steps**
1. Fork the repository and clone it locally
diff --git a/package.json b/package.json
index bccedf7091..b0f6195f52 100644
--- a/package.json
+++ b/package.json
@@ -17,7 +17,8 @@
"db:seed": "turbo run db:seed",
"db:seed:examples": "turbo run db:seed:examples",
"nuke": "bash ./scripts/nuke.sh",
- "dx": "pnpm i && pnpm --filter=shared run db:reset && pnpm --filter=shared run db:seed:examples && pnpm run dev",
+ "dx": "pnpm i && pnpm run infra:dev:up && pnpm --filter=shared run db:reset && pnpm --filter=shared run db:seed:examples && pnpm run dev",
+ "dx-f": "pnpm i && pnpm run infra:dev:up && pnpm --filter=shared run db:reset -f && pnpm --filter=shared run db:seed:examples && pnpm run dev",
"build": "turbo run build",
"start": "turbo run start",
"dev": "turbo run dev",