kopia lustrzana https://github.com/Stopka/fedisearch
Container structure is now closer to repository and is now using yarn
rodzic
5e3e152fa6
commit
b8f5d28dd5
12
Dockerfile
12
Dockerfile
|
@ -2,13 +2,13 @@ FROM node:18-bullseye AS prebuild
|
|||
FROM prebuild AS build
|
||||
WORKDIR /srv
|
||||
COPY application/package*.json ./
|
||||
RUN npm install --frozen-lockfile
|
||||
RUN yarn install
|
||||
COPY application/. .
|
||||
RUN chmod -R uog+r .
|
||||
RUN npm run build
|
||||
RUN yarn build
|
||||
|
||||
FROM build as dev
|
||||
CMD npm run dev
|
||||
CMD yarn dev
|
||||
|
||||
FROM prebuild AS prod
|
||||
RUN groupadd -g 1001 nodejs
|
||||
|
@ -19,6 +19,6 @@ WORKDIR /srv
|
|||
COPY --from=build /srv/node_modules ./node_modules
|
||||
COPY --from=build /srv/package*.json ./
|
||||
COPY --from=build /srv/next.config.js ./
|
||||
COPY --from=build --chown=nextjs:nodejs /srv/src/.next ./.next
|
||||
COPY --from=build /srv/src/public ./public
|
||||
CMD node_modules/.bin/next start
|
||||
COPY --from=build --chown=nextjs:nodejs /srv/src/.next ./src/.next
|
||||
COPY --from=build /srv/src/public ./src/public
|
||||
CMD yarn start
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"scripts": {
|
||||
"dev": "next dev ./src --hostname 0.0.0.0",
|
||||
"build": "next build ./src",
|
||||
"start": "next start",
|
||||
"start": "next start ./src",
|
||||
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
||||
"generate:graphql-types": "graphql-codegen-esm --config graphql-codegen.yml"
|
||||
},
|
||||
|
|
Ładowanie…
Reference in New Issue