File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55# --------------------------------------------------------------------------------
66# BASE IMAGE
77# --------------------------------------------------------------------------------
8- FROM node:16.2.0 -alpine as base
8+ FROM node:16-alpine as base
99
1010RUN apk add --no-cache make g++ git
1111
@@ -22,6 +22,10 @@ COPY package*.json ./
2222
2323RUN npm ci
2424
25+ # This the appropriate necessary extra for node:16-alpine
26+ # Other options are https://www.npmjs.com/search?q=%40next%2Fswc
27+ RUN npm i @next/swc-linux-x64-musl --no-save
28+
2529
2630# ---------------
2731# PROD DEPS
@@ -54,7 +58,7 @@ RUN npm run build
5458# MAIN IMAGE
5559# --------------------------------------------------------------------------------
5660
57- FROM node:16.2.0 -alpine as production
61+ FROM node:16-alpine as production
5862
5963# Let's make our home
6064WORKDIR /usr/src/docs
Original file line number Diff line number Diff line change 11import next from 'next'
22
3+ // This import is necessary, as of Jan 2022 to avoid a segmentation fault.
4+ // Next is suppose to automatically pick up the `next.config.js` file
5+ // but if you don't specify it to the `next()` constructor you currently
6+ // get a seg fault.
7+ // Possibly relevant: https://github.com/vercel/next.js/issues/33008
8+ import conf from '../next.config.js'
9+
310const { NODE_ENV } = process . env
411const isDevelopment = NODE_ENV === 'development'
512
6- export const nextApp = next ( { dev : isDevelopment } )
13+ export const nextApp = next ( { dev : isDevelopment , conf } )
714export const nextHandleRequest = nextApp . getRequestHandler ( )
815await nextApp . prepare ( )
916
Original file line number Diff line number Diff line change 11/// <reference types="next" />
2- /// <reference types="next/types/global" />
32/// <reference types="next/image-types/global" />
43
54// NOTE: This file should not be edited
You can’t perform that action at this time.
0 commit comments