Skip to content

Commit 32a4a08

Browse files
committed
chore: update dependencies and add devcontainer configuration
1 parent 18e8e72 commit 32a4a08

5 files changed

Lines changed: 211 additions & 124 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Base image with Node.js
2+
FROM mcr.microsoft.com/devcontainers/typescript-node:24-bookworm
3+
4+
# Install Bun as the node user
5+
RUN su - node -c "curl -fsSL https://bun.sh/install | bash"
6+
7+
# Set environment variables for Bun
8+
ENV BUN_INSTALL="/home/node/.bun"
9+
ENV PATH="$BUN_INSTALL/bin:$PATH"
10+
11+
RUN /home/node/.bun/bin/bunx playwright install-deps
12+
13+
# Set zsh as default shell for the existing non-root user (node in this image)
14+
ARG USERNAME=node
15+
RUN if id -u "$USERNAME" >/dev/null 2>&1; then chsh -s "$(which zsh)" "$USERNAME"; else echo "user $USERNAME not found"; fi
16+
17+
# Default shell
18+
CMD [ "zsh" ]

.devcontainer/devcontainer.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"name": "Workflow Builder",
3+
"build": { "dockerfile": "./Dockerfile" },
4+
5+
"customizations": {
6+
"vscode": {
7+
"settings": {
8+
"terminal.integrated.defaultProfile.linux": "zsh"
9+
},
10+
"extensions": [
11+
"oven.bun-vscode",
12+
"dbaeumer.vscode-eslint",
13+
"esbenp.prettier-vscode",
14+
"zardoy.ts-essential-plugins",
15+
"bradlc.vscode-tailwindcss",
16+
"vscode-icons-team.vscode-icons",
17+
"unifiedjs.vscode-mdx"
18+
]
19+
}
20+
},
21+
22+
"remoteUser": "node",
23+
24+
"features": {
25+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
26+
"ghcr.io/devcontainers/features/git:1": {},
27+
"ghcr.io/devcontainers/features/python:1": { "version": "3.12" }
28+
},
29+
"mounts": [
30+
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind",
31+
"source=/var/run/docker.sock,target=/var/run/docker-host.sock,type=bind"
32+
],
33+
"postCreateCommand": "sudo chmod 666 /var/run/docker-host.sock && sudo usermod -aG docker node || true",
34+
"runArgs": ["--add-host=host.docker.internal:host-gateway"],
35+
36+
"remoteEnv": {
37+
"DATABASE_URL": "postgres://postgres:postgres@host.docker.internal:54422/postgres",
38+
"SUPABASE_URL": "http://host.docker.internal:54421",
39+
"DOCKER_HOST": "unix:///var/run/docker-host.sock"
40+
},
41+
"postAttachCommand": "bash -c 'if [ -z \"$(git config --global user.name)\" ]; then read -p \"Enter your git name: \" git_name && git config --global user.name \"$git_name\" || true; fi; if [ -z \"$(git config --global user.email)\" ]; then read -p \"Enter your git email: \" git_email && git config --global user.email \"$git_email\" || true; fi'",
42+
"portsAttributes": {
43+
"5173": { "label": "Vite Application" },
44+
"6006": { "label": "Storybook" },
45+
"54421": { "label": "API" },
46+
"54422": { "label": "Postgres Database" },
47+
"54423": { "label": "Supabase Studio" },
48+
"54424": { "label": "Email Testing" }
49+
}
50+
}

0 commit comments

Comments
 (0)