docker mvp

This commit is contained in:
2025-08-16 01:53:05 -04:00
parent 8ae1a11385
commit d0418895a5
4 changed files with 29 additions and 32 deletions

17
.dockerignore Normal file
View File

@@ -0,0 +1,17 @@
node_modules
Dockerfile*
docker-compose*
.dockerignore
.git
.gitignore
README.md
FIXME.md
LICENSE
.vscode
Makefile
helm-charts
.env
.editorconfig
.idea
coverage*

View File

@@ -1,35 +1,14 @@
# ===================== # syntax=docker.io/docker/dockerfile:1
# Build Stage
# =====================
FROM oven/bun:1.2.10-alpine AS builder
WORKDIR /app FROM oven/bun:1.2.10 AS base
# Install dependencies COPY package.json bun.lock* ./
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile RUN bun install --frozen-lockfile
# Copy rest of app
COPY . . COPY . .
# Build Next.js app
RUN bun run build RUN bun run build
# =====================
# Runtime Stage
# =====================
FROM oven/bun:1.2.10-alpine
WORKDIR /app
# Copy only necessary files from builder
COPY --from=builder /app/package.json /app/package.json
COPY --from=builder /app/.next /app/.next
COPY --from=builder /app/public /app/public
COPY --from=builder /app/node_modules /app/node_modules
# Expose port
EXPOSE 3000 EXPOSE 3000
# Run in production CMD ["bun", "start"]
CMD ["bun", "run", "start"]

View File

@@ -5,12 +5,12 @@ services:
restart: unless-stopped restart: unless-stopped
# ports: # ports:
# - "3000:3000" # - "3000:3000"
environment: # environment:
NODE_ENV: production # NODE_ENV: production
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY} # OPENROUTER_API_KEY: ${OPENROUTER_API_KEY}
volumes: # volumes:
- .:/app # - .:/app
- /app/node_modules # - /app/node_modules
networks: networks:
- traefik - traefik
- internal - internal

View File

@@ -9,12 +9,13 @@ const withPWA = require("next-pwa")({
// const nextConfig: NextConfig = { // const nextConfig: NextConfig = {
// /* config options here */ // /* config options here */
// reactStrictMode: true,
// }; // };
const nextConfig: NextConfig = withPWA({ const nextConfig: NextConfig = withPWA({
/* config options here */ /* config options here */
reactStrictMode: true, reactStrictMode: true,
// output: "export", // output: "standalone",
}); });
export default nextConfig; export default nextConfig;