Merge pull request 'Release v0.3.2' (#94) from v0.3.2/improve-dockerfile into develop
Reviewed-on: #94
This commit is contained in:
commit
69d68d4012
19
Dockerfile
19
Dockerfile
|
@ -1,21 +1,28 @@
|
||||||
# PHASE 1: copy and build
|
# PHASE 1: copy and build
|
||||||
|
|
||||||
FROM node:22.2.0-alpine3.19 AS build
|
FROM node:22-alpine AS build
|
||||||
|
ENV NEXT_TELEMETRY_DISABLED 1
|
||||||
|
ENV NEXT_PRIVATE_STANDALONE true
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
RUN rm -rf node_modules && npm i --package-lock-only && npm ci
|
||||||
RUN rm -rf node_modules && npm install && npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# PHASE 2: prepare for exec
|
# PHASE 2: prepare for exec
|
||||||
|
|
||||||
FROM node:22.2.0-alpine3.19 AS exec
|
FROM node:22-alpine AS exec
|
||||||
|
ENV NEXT_TELEMETRY_DISABLED 1
|
||||||
|
ENV NODE_ENV production
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY --from=build /app/. .
|
COPY --from=build /app/.next/standalone .
|
||||||
|
COPY --from=build /app/.next/static ./.next/static
|
||||||
|
COPY --from=build /app/public ./public
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
CMD ["npm", "run", "start"]
|
ENTRYPOINT [ "node" ]
|
||||||
|
CMD ["server.js"]
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "proxyraye-next",
|
"name": "proxyraye-next",
|
||||||
"version": "0.3.0",
|
"version": "0.3.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|
Loading…
Reference in New Issue