Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

node_modules/
# .next/
.next/
out/
dist/

Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM node:20-alpine AS builder
WORKDIR /app

# Install pnpm
RUN corepack enable

# Copy and Install dependencies
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
Comment on lines +4 to +9

# Copy source and build the application
COPY . .
RUN pnpm build

# --- runtime ---
FROM node:20-alpine

RUN addgroup -S appgroup && adduser -S -G appgroup -u 1001 appuser
WORKDIR /app

COPY --from=builder --chown=appuser:appgroup /app/.next/standalone ./
COPY --from=builder --chown=appuser:appgroup /app/.next/static .next/static
COPY --from=builder --chown=appuser:appgroup /app/public public

EXPOSE 3000
USER appuser
CMD ["node", "server.js"]
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
frontend:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
volumes:
- .:/app
- /app/node_modules
Comment on lines +3 to +10
environment:
- WATCHPACK_POLLING=true
4 changes: 4 additions & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ const nextConfig: NextConfig = {
compiler: {
styledComponents: true,
},
eslint: {
ignoreDuringBuilds: true,
},
output: 'standalone',
};

export default nextConfig;
Loading