Skip to content
Merged
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
34 changes: 34 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Include any files or directories that you don't want to be copied to your
# container here (e.g., local build artifacts, temporary files, etc.).
#
# For more help, visit the .dockerignore file reference guide at
# https://docs.docker.com/go/build-context-dockerignore/

**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/.next
**/.cache
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/charts
**/docker-compose*
**/compose.y*ml
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
**/build
**/dist
LICENSE
README.md
22 changes: 22 additions & 0 deletions compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
services:
web:
build:
context: .
dockerfile: web/Dockerfile.dev

container_name: next-dev

ports:
- '3000:3000'

volumes:
- .:/app
- /app/web/node_modules
- /app/node_modules

working_dir: /app/web

environment:
NODE_ENV: development

command: pnpm dev
15 changes: 15 additions & 0 deletions compose.prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
services:
web:
build:
context: .
dockerfile: web/Dockerfile

container_name: next-prod

ports:
- '3000:3000'

env_file:
- web/.env.production

restart: unless-stopped
26 changes: 26 additions & 0 deletions web/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM node:22-alpine

RUN apk add --no-cache libc6-compat

ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"

RUN corepack enable

WORKDIR /app

COPY package.json pnpm-lock.yaml ./pnpm-workspace.yaml ./
COPY eslint.config.mjs ./
Copy web ./web

WORKDIR /app/web

RUN pnpm install --frozen-lockfile

ENV NODE_ENV=production

RUN pnpm build

EXPOSE 3000

CMD ["pnpm", "start"]
22 changes: 22 additions & 0 deletions web/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM node:22-alpine

RUN apk add --no-cache libc6-compat

ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"

RUN corepack enable

WORKDIR /app

COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
COPY eslint.config.mjs ./
COPY web ./web

WORKDIR /app/web

RUN pnpm install

EXPOSE 3000

CMD ["pnpm", "dev"]
1 change: 1 addition & 0 deletions web/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const nextConfig: NextConfig = {
},
},
},
output: 'standalone',
};

export default nextConfig;
Loading