Maybe fix?

This commit is contained in:
Liam 2022-10-29 14:08:49 +01:00
parent 5d9dfe860c
commit 4874deb21c
3 changed files with 7 additions and 6 deletions

@ -27,6 +27,9 @@ COPY . .
# Uncomment the following line in case you want to disable telemetry during the build.
ENV NEXT_TELEMETRY_DISABLED 1
# Install dependencies
RUN yarn
# Build the project
RUN yarn build
@ -53,8 +56,6 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
COPY --from=builder --chown=nextjs:nodejs /app/public ./.next/static
# Install dependencies
RUN yarn
RUN chown -R nextjs:nodejs /app
@ -64,5 +65,4 @@ EXPOSE 3000
ENV PORT 3000
ENTRYPOINT yarn react-env
CMD ["node", "server.js"]
CMD ["npm", "run", "start"]

@ -4,7 +4,7 @@
"scripts": {
"dev": "react-env -- next",
"build": "next build",
"start": "react-env -- APP_ENV=production next start -p 3001",
"start": "react-env -- && APP_ENV=production node server.js",
"lint": "next lint"
},
"dependencies": {

@ -17,7 +17,8 @@
"@beam-australia/react-env@^3.1.1":
version "3.1.1"
resolved "https://registry.npmjs.org/@beam-australia/react-env/-/react-env-3.1.1.tgz"
resolved "https://registry.yarnpkg.com/@beam-australia/react-env/-/react-env-3.1.1.tgz#63cb8316861b8fbdb4b9c550a62139cd90675e40"
integrity sha512-LdWzgqmu116t9+sOvONyB21bBmI8dm8g8s3KhnJVzCcK93GrdSisuIOtOkQPMYgenmVGTWQwWnbLAgoka/jAFw==
dependencies:
cross-spawn "^6.0.5"
dotenv "^8.0.0"