Skip to content

Commit 08f3c12

Browse files
authored
Merge pull request #45 from builderz-labs/feat/high-priority-v1.1
feat: Docker, session controls, model catalog, API rate limiting
2 parents 4f92c22 + 299faf5 commit 08f3c12

34 files changed

Lines changed: 739 additions & 134 deletions

.dockerignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules
2+
.git
3+
.data
4+
.next
5+
.env
6+
*.md
7+
.github
8+
ops
9+
scripts

Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM node:20-slim AS base
2+
RUN corepack enable && corepack prepare pnpm@latest --activate
3+
WORKDIR /app
4+
5+
FROM base AS deps
6+
COPY package.json pnpm-lock.yaml ./
7+
RUN pnpm install --frozen-lockfile
8+
9+
FROM base AS build
10+
COPY --from=deps /app/node_modules ./node_modules
11+
COPY . .
12+
RUN pnpm build
13+
14+
FROM node:20-slim AS runtime
15+
WORKDIR /app
16+
ENV NODE_ENV=production
17+
RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 nextjs
18+
COPY --from=build /app/.next/standalone ./
19+
COPY --from=build /app/.next/static ./.next/static
20+
COPY --from=build /app/public ./public
21+
USER nextjs
22+
EXPOSE 3000
23+
CMD ["node", "server.js"]

docker-compose.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
services:
2+
mission-control:
3+
build: .
4+
ports:
5+
- "3000:3000"
6+
env_file: .env
7+
volumes:
8+
- mc-data:/app/.data
9+
restart: unless-stopped
10+
11+
volumes:
12+
mc-data:

next.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
3+
output: 'standalone',
34
turbopack: {},
45

56
// Security headers
@@ -25,6 +26,9 @@ const nextConfig = {
2526
{ key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' },
2627
{ key: 'Content-Security-Policy', value: csp },
2728
{ key: 'Permissions-Policy', value: 'camera=(), microphone=(), geolocation=()' },
29+
...(process.env.MC_ENABLE_HSTS === '1' ? [
30+
{ key: 'Strict-Transport-Security', value: 'max-age=63072000; includeSubDomains; preload' }
31+
] : []),
2832
],
2933
},
3034
];

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"eslint-config-next": "^16.1.6",
2525
"next": "^16.1.6",
2626
"next-themes": "^0.4.6",
27+
"pino": "^10.3.1",
2728
"postcss": "^8.5.2",
2829
"react": "^19.0.1",
2930
"react-dom": "^19.0.1",
@@ -33,6 +34,7 @@
3334
"tailwindcss": "^3.4.17",
3435
"typescript": "^5.7.2",
3536
"ws": "^8.19.0",
37+
"zod": "^4.3.6",
3638
"zustand": "^5.0.11"
3739
},
3840
"devDependencies": {
@@ -47,6 +49,7 @@
4749
"@types/ws": "^8.18.1",
4850
"@vitejs/plugin-react": "^4.3.4",
4951
"jsdom": "^26.0.0",
52+
"pino-pretty": "^13.1.3",
5053
"vite-tsconfig-paths": "^5.1.4",
5154
"vitest": "^2.1.5"
5255
},

0 commit comments

Comments
 (0)