File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ node_modules
2+ dist
3+ .git
4+ .github
5+ e2e
6+ playwright-report
7+ test-results
8+ .DS_Store
9+ .env * .local
Original file line number Diff line number Diff line change 3232 cache : pnpm
3333 - run : pnpm install --frozen-lockfile --prefer-offline
3434 - run : pnpm build
35+
36+ docker :
37+ name : 🐳 Docker build & push
38+ if : github.event_name == 'push'
39+ needs : nextjs
40+ runs-on : ubuntu-latest
41+ permissions :
42+ contents : read
43+ packages : write
44+ steps :
45+ - uses : actions/checkout@main
46+ - uses : docker/setup-buildx-action@v3
47+ - uses : docker/login-action@v3
48+ with :
49+ registry : ghcr.io
50+ username : ${{ github.actor }}
51+ password : ${{ secrets.GITHUB_TOKEN }}
52+ - uses : docker/build-push-action@v6
53+ with :
54+ context : .
55+ push : true
56+ tags : |
57+ ghcr.io/lyonjs/lyonjs.github.com:latest
58+ ghcr.io/lyonjs/lyonjs.github.com:${{ github.sha }}
59+ cache-from : type=gha
60+ cache-to : type=gha,mode=max
Original file line number Diff line number Diff line change 1+ FROM node:24-alpine AS deps
2+
3+ RUN corepack enable pnpm
4+
5+ WORKDIR /app
6+ COPY package.json pnpm-lock.yaml ./
7+ RUN pnpm install --frozen-lockfile
8+
9+ FROM node:24-alpine AS build
10+
11+ RUN corepack enable pnpm
12+
13+ WORKDIR /app
14+ COPY --from=deps /app/node_modules ./node_modules
15+ COPY . .
16+ RUN pnpm build
17+
18+ FROM node:24-alpine AS runner
19+
20+ WORKDIR /app
21+
22+ ENV NODE_ENV=production
23+ ENV HOSTNAME=0.0.0.0
24+ ENV PORT=3000
25+
26+ RUN addgroup --system --gid 1001 nodejs && \
27+ adduser --system --uid 1001 nextjs
28+
29+ COPY --from=build /app/public ./public
30+ COPY --from=build --chown=nextjs:nodejs /app/dist/standalone ./
31+ COPY --from=build --chown=nextjs:nodejs /app/dist/static ./dist/static
32+
33+ USER nextjs
34+
35+ EXPOSE 3000
36+
37+ CMD ["node" , "server.js" ]
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ const withMDX = require('@next/mdx')();
22
33/** @type {import('next').NextConfig } */
44const nextConfig = {
5+ output : 'standalone' ,
56 experimental : {
67 mdxRs : true ,
78 } ,
You can’t perform that action at this time.
0 commit comments