Skip to content

Commit b3118c0

Browse files
committed
Try to enhance codespaces
1 parent 413da99 commit b3118c0

2 files changed

Lines changed: 23 additions & 6 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,5 @@ COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.json devbox.json
99
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.lock devbox.lock
1010
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} .env.example .env
1111

12-
13-
RUN devbox run -- echo "Installed Packages." && nix-store --gc && nix-store --optimise
14-
15-
RUN devbox shellenv --init-hook >> ~/.profile
12+
# All devbox commands are deferred to postCreateCommand for Codespaces compatibility.
13+
# The Nix package resolution fails during Docker build in resource-constrained environments.

.devcontainer/devcontainer.json

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,31 @@
44
"dockerfile": "./Dockerfile",
55
"context": ".."
66
},
7-
"postCreateCommand": "bin/ensure-root-env-file && devbox run setup",
7+
"postCreateCommand": "bin/ensure-root-env-file && devbox shellenv --init-hook >> ~/.profile && devbox run setup",
8+
"postStartCommand": "devbox services up --background",
9+
"forwardPorts": [5173, 8081, 8083, 4000],
10+
"portsAttributes": {
11+
"5173": {
12+
"label": "Frontend",
13+
"onAutoForward": "openBrowserOnce"
14+
},
15+
"8081": {
16+
"label": "Builder API"
17+
},
18+
"8083": {
19+
"label": "Library API"
20+
},
21+
"4000": {
22+
"label": "Firebase Emulator UI"
23+
}
24+
},
825
"customizations": {
926
"vscode": {
1027
"settings": {},
1128
"extensions": [
12-
"jetpack-io.devbox"
29+
"jetpack-io.devbox",
30+
"kie-group.dmn-vscode-extension",
31+
"esbenp.prettier-vscode"
1332
]
1433
}
1534
},

0 commit comments

Comments
 (0)