-
Notifications
You must be signed in to change notification settings - Fork 193
feat:add Docker support and auto ngrok url replace on restart #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
8269607
49c45a0
8dbac27
d279f7d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| node_modules | ||
| npm-debug.log* | ||
| *.log | ||
|
|
||
| .git | ||
| .gitignore | ||
| .DS_Store | ||
|
|
||
| .env | ||
| .env.local | ||
| .env.*.local | ||
| .convex | ||
|
|
||
| dist | ||
| build | ||
| debug/dist | ||
| .vite | ||
| .cache | ||
| *.tsbuildinfo | ||
|
|
||
| data | ||
| *.db | ||
| *.db-journal | ||
| *.sqlite | ||
| *.sqlite-journal |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| FROM node:22-bookworm-slim | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| ENV NODE_ENV=development | ||
|
|
||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends ca-certificates curl git gnupg \ | ||
| && curl -fsSL https://ngrok-agent.s3.amazonaws.com/ngrok.asc | tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null \ | ||
| && echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | tee /etc/apt/sources.list.d/ngrok.list \ | ||
| && apt-get update \ | ||
| && apt-get install -y --no-install-recommends ngrok \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Create non-root user — Claude Code blocks bypassPermissions when running as root | ||
| RUN useradd -m -u 1001 boop | ||
|
|
||
| COPY package*.json ./ | ||
| RUN npm ci && npm install -g @anthropic-ai/claude-code | ||
|
|
||
| COPY . . | ||
|
|
||
| RUN mkdir -p /home/boop/.claude /home/boop/.convex /home/boop/.sendblue \ | ||
| && chown -R boop:boop /app /home/boop | ||
|
|
||
| USER boop | ||
|
|
||
| EXPOSE 3456 5173 | ||
|
|
||
| CMD ["npm", "run", "dev"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| services: | ||
| boop: | ||
| build: | ||
| context: . | ||
| image: boop-agent:local | ||
| command: npm run dev | ||
| init: true | ||
| restart: unless-stopped | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| stop_signal: SIGINT | ||
| env_file: | ||
| - .env.local | ||
| environment: | ||
| NODE_ENV: development | ||
| BOOP_UPSTREAM_CHECK: "false" | ||
| ports: | ||
| - "3456:3456" | ||
| - "5173:5173" | ||
| volumes: | ||
| - .:/app | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The The common fix is to propagate the caller's UID/GID into the compose service: user: "${UID:-1001}:${GID:-1001}"Or set |
||
| - boop_node_modules:/app/node_modules | ||
| - boop_npm_cache:/home/boop/.npm | ||
| - ${HOME}/.convex:/home/boop/.convex | ||
| - ${HOME}/.claude:/home/boop/.claude | ||
| - ${HOME}/.sendblue:/home/boop/.sendblue | ||
| healthcheck: | ||
| test: | ||
| [ | ||
| "CMD-SHELL", | ||
| "node -e \"fetch('http://127.0.0.1:3456/health').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))\"", | ||
| ] | ||
| interval: 30s | ||
| timeout: 5s | ||
| retries: 3 | ||
| start_period: 30s | ||
|
|
||
| volumes: | ||
| boop_node_modules: | ||
| boop_npm_cache: | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
busterdist on abookwormbase imagenode:22-bookworm-slimis Debian 12. Pinning the ngrok APT source tobuster(Debian 10) is what ngrok's own docs prescribe (they only publish one dist), but it can causeapt-get updateto emit warnings on stricter APT configurations and may silently break if ngrok ever publishes abookwormentry that conflicts. Adding a comment explaining whybusteris intentional would prevent future confusion.