-
-
Notifications
You must be signed in to change notification settings - Fork 459
Expand file tree
/
Copy pathdevcontainer.json
More file actions
67 lines (60 loc) · 3.16 KB
/
Copy pathdevcontainer.json
File metadata and controls
67 lines (60 loc) · 3.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
"name": "supabase/realtime",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},
// mix test starts its own Postgres containers with `docker run -p <port>:5432` and then
// connects at 127.0.0.1:<port> (test/support/test_tenant_db/backend/docker.ex). Those
// published ports live on the daemon's network namespace; on a bridge they are not there.
"runArgs": ["--network=host"],
// The workspace must sit at its host path: bind-mount sources are resolved by the host
// daemon, yet compose.dbs.yml and docker.ex both hand it paths from inside here. A mismatch
// mounts empty dirs instead, so the Postgres init scripts never run and you get a confusing
// supabase_admin/_realtime failure rather than a mount error.
"workspaceMount": "source=${localWorkspaceFolder},target=${localWorkspaceFolder},type=bind",
"workspaceFolder": "${localWorkspaceFolder}",
"remoteUser": "vscode",
"features": {
// moby-cli is not published for trixie; false installs upstream docker-ce-cli instead.
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": { "moby": false }
},
// Nothing PATH-related belongs in here: ${containerEnv:PATH} is only substituted in
// remoteEnv, so in containerEnv it self-references and the container loses even /usr/bin.
// The Dockerfile's ENV already covers every process.
"containerEnv": {
// The workspace's `mise trust`, declarative and covering nested configs
// (test/e2e/.tool-versions). Untrusted, every shim aborts and takes [env] down with it,
// so mix would boot without METRICS_JWT_SECRET. Set here rather than in post-create so
// tool resolution never waits on a hook - the language server may start first.
"MISE_TRUSTED_CONFIG_PATHS": "${localWorkspaceFolder}"
},
// Write-heavy, many-small-file dirs: several times slower over a macOS bind mount even
// under VirtioFS. All are gitignored, so keeping them out of the host tree loses nothing.
"mounts": [
"source=realtime-build-${devcontainerId},target=${containerWorkspaceFolder}/_build,type=volume",
"source=realtime-deps-${devcontainerId},target=${containerWorkspaceFolder}/deps,type=volume",
"source=realtime-node-modules-${devcontainerId},target=${containerWorkspaceFolder}/assets/node_modules,type=volume",
"source=realtime-plts-${devcontainerId},target=${containerWorkspaceFolder}/priv/plts,type=volume"
],
"postCreateCommand": ".devcontainer/post-create.sh",
"customizations": {
"vscode": {
"extensions": [
"JakeBecker.elixir-ls",
"phoenixframework.phoenix"
],
// The vscode user's login shell is zsh (Dockerfile), but VS Code's terminal profile
// picker doesn't follow /etc/passwd, so it needs its own explicit zsh profile too.
// The IDE may flag "zsh" here as invalid while editing on the host - that's the
// *local* editor validating against shells on your machine, not the container's;
// it resolves once VS Code actually connects into the devcontainer.
"settings": {
"terminal.integrated.profiles.linux": {
"zsh": { "path": "/usr/bin/zsh" }
},
"terminal.integrated.defaultProfile.linux": "zsh"
}
}
}
}