Compare commits
2 Commits
78cad5416e
...
645382b1b9
Author | SHA1 | Date | |
---|---|---|---|
645382b1b9 | |||
6e034108fc |
32
.devcontainer/Dockerfile
Normal file
32
.devcontainer/Dockerfile
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
FROM mcr.microsoft.com/devcontainers/javascript-node:24
|
||||||
|
|
||||||
|
# Install system dependencies
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
curl \
|
||||||
|
ca-certificates \
|
||||||
|
gnupg \
|
||||||
|
lsb-release \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install Tailscale
|
||||||
|
RUN curl -fsSL https://tailscale.com/install.sh | sh
|
||||||
|
|
||||||
|
# Install Bun as the node user
|
||||||
|
USER node
|
||||||
|
RUN curl -fsSL https://bun.sh/install | bash
|
||||||
|
ENV PATH="/home/node/.bun/bin:$PATH"
|
||||||
|
|
||||||
|
# Switch back to root for any remaining setup
|
||||||
|
USER root
|
||||||
|
|
||||||
|
# Ensure the node user owns their home directory
|
||||||
|
RUN chown -R node:node /home/node
|
||||||
|
|
||||||
|
# Set the default user back to node
|
||||||
|
USER node
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /workspace
|
||||||
|
|
||||||
|
# Verify installations
|
||||||
|
RUN bun --version && tailscale version
|
@@ -1,6 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "React + Bun + Convex Development",
|
"name": "React + Bun + Convex Development",
|
||||||
"image": "mcr.microsoft.com/devcontainers/javascript-node:24",
|
"build": {
|
||||||
|
"context": ".",
|
||||||
|
"dockerfile": "Dockerfile"
|
||||||
|
},
|
||||||
"features": {
|
"features": {
|
||||||
"ghcr.io/devcontainers/features/git:1": {},
|
"ghcr.io/devcontainers/features/git:1": {},
|
||||||
"ghcr.io/devcontainers/features/github-cli:1": {},
|
"ghcr.io/devcontainers/features/github-cli:1": {},
|
||||||
@@ -8,7 +11,7 @@
|
|||||||
"moby": false
|
"moby": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"postCreateCommand": "curl -fsSL https://bun.sh/install | bash && source ~/.bashrc && bun install",
|
"postCreateCommand": "bun install",
|
||||||
"customizations": {
|
"customizations": {
|
||||||
"vscode": {
|
"vscode": {
|
||||||
"extensions": [
|
"extensions": [
|
||||||
|
24
.gitpod/automations.yaml
Normal file
24
.gitpod/automations.yaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
services:
|
||||||
|
bun-dev:
|
||||||
|
name: Bun Development Server
|
||||||
|
description: Runs the Bun development server with hot reloading
|
||||||
|
commands:
|
||||||
|
start: |
|
||||||
|
echo "Starting Bun development server..."
|
||||||
|
cd /workspaces/workspaces
|
||||||
|
bun run dev
|
||||||
|
ready: |
|
||||||
|
# Check if the development server is responding
|
||||||
|
curl -f http://localhost:3001 > /dev/null 2>&1
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "Bun development server is ready"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Bun development server is not ready"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
stop: |
|
||||||
|
echo "Stopping Bun development server..."
|
||||||
|
pkill -f "bun.*dev"
|
||||||
|
triggeredBy:
|
||||||
|
- postEnvironmentStart
|
Reference in New Issue
Block a user