Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions mesher/client/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Dependency and build output directories
node_modules
.next
dist
coverage

# Test and tooling artifacts
test-results
playwright-report

# VCS and local config
.git
.gitignore
*.log
.env
.env.*
38 changes: 38 additions & 0 deletions mesher/client/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM node:22-bookworm-slim AS base

WORKDIR /app
ENV NEXT_TELEMETRY_DISABLED=1

FROM base AS deps

COPY package.json package-lock.json ./
RUN npm install

FROM deps AS dev

COPY . .
EXPOSE 3000
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]

FROM deps AS builder

COPY . .
RUN npm run build

FROM deps AS production

WORKDIR /app
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1

# copy TanStack Start runtime output
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/server.mjs ./server.mjs
COPY --from=builder /app/mesher-backend-origin.mjs ./mesher-backend-origin.mjs
COPY --from=builder /app/public ./public
RUN npm prune --omit=dev

EXPOSE 3000
USER node

CMD ["node", "server.mjs"]
12 changes: 12 additions & 0 deletions mesher/client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ hyperpush-mono/
mesher/
client/
```
## Docker Compose

Use the following Docker Compose commands for development and production:

```bash
# Development
docker compose up dev

# Production (build and run in detached mode)
docker compose up prod --build -d
```


## Maintainer workflow

Expand Down
30 changes: 30 additions & 0 deletions mesher/client/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
services:
dev:
build:
context: .
target: dev
container_name: Client-dev
volumes:
- .:/app
- /app/node_modules
- /app/.next
ports:
- "3000:3000"
command: npm run dev -- --host 0.0.0.0
restart: unless-stopped

prod:
build:
context: .
target: production
container_name: Client-prod
ports:
- "3000:3000"
restart: unless-stopped

builder:
build:
context: .
target: builder
container_name: Client-builder
command: npm run build
Loading
Loading