Skip to content

Commit 32f8af5

Browse files
committed
simplify docker
1 parent 9b6afd6 commit 32f8af5

File tree

7 files changed

+16546
-10912
lines changed

7 files changed

+16546
-10912
lines changed

samples/repo-base/.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

samples/repo-base/Dockerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
FROM node:20-alpine
22

3+
RUN apk add --no-cache curl
4+
35
WORKDIR /app
46

57
# Install dependencies based on the preferred package manager
6-
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./
8+
COPY package.json package-lock.json* .npmrc* ./
9+
10+
RUN npm ci
711

8-
RUN corepack enable pnpm && pnpm install --frozen-lockfile --prefer-offline
12+
COPY . .
913

10-
COPY src ./src
11-
COPY public ./public
12-
COPY next.config.ts .
13-
COPY tsconfig.json .
14+
RUN npm run build
1415

15-
RUN pnpm run build
16+
CMD [ "npm", "run", "start" ]

samples/repo-base/compose.dev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ services:
1414
restart: always
1515
ports:
1616
- 3000:3000
17-
command: ["pnpm", "run", "dev"]
17+
command: ["npm", "run", "dev"]
1818

1919
database:
2020
image: postgres:16

samples/repo-base/compose.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ services:
22
app:
33
build:
44
context: .
5+
dockerfile: Dockerfile
56
environment:
67
- DB_URL=postgres://postgres:${POSTGRES_PASSWORD}@database:5432/postgres
78
- DB_SSL=true

samples/repo-base/next.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { NextConfig } from "next";
22

33
const nextConfig: NextConfig = {
4-
output: "standalone",
54
};
65

76
export default nextConfig;

0 commit comments

Comments
 (0)