mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-03-21 17:24:28 -05:00
feat: update dockerfile to work with nuxt
This commit is contained in:
parent
0b8735fa47
commit
f44bcd3ad0
5
.dockerignore
Normal file
5
.dockerignore
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
.git/
|
||||
node_modules/
|
||||
.env
|
||||
.nuxt
|
||||
.output
|
||||
13
Dockerfile
13
Dockerfile
|
|
@ -4,7 +4,7 @@ ARG app_dir="/home/node/app"
|
|||
|
||||
|
||||
# * Base Node.js image
|
||||
FROM node:20-alpine AS base
|
||||
FROM node:22-alpine AS base
|
||||
ARG app_dir
|
||||
WORKDIR ${app_dir}
|
||||
|
||||
|
|
@ -35,14 +35,15 @@ RUN npm run build
|
|||
FROM base AS final
|
||||
ARG app_dir
|
||||
|
||||
RUN mkdir -p ${app_dir}/logs && chown node:node ${app_dir}/logs
|
||||
|
||||
ENV NODE_ENV=production
|
||||
USER node
|
||||
ENV NODE_ENV=production
|
||||
ENV NITRO_HOST=0.0.0.0
|
||||
ENV NITRO_PORT=8080
|
||||
EXPOSE 8080
|
||||
|
||||
COPY package.json .
|
||||
|
||||
COPY --from=dependencies ${app_dir}/node_modules ${app_dir}/node_modules
|
||||
COPY --from=build ${app_dir} ${app_dir}
|
||||
COPY --from=build ${app_dir}/.output ${app_dir}/.output
|
||||
|
||||
CMD ["node", "."]
|
||||
CMD ["node", "--enable-source-maps", ".output/server/index.mjs"]
|
||||
|
|
|
|||
|
|
@ -5,8 +5,9 @@
|
|||
"license": "AGPL-3.0-only",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"start": "node --enable-source-maps .",
|
||||
"start": "node --enable-source-maps .output/server/index.mjs",
|
||||
"build": "nuxt build",
|
||||
"prepare": "nuxt prepare",
|
||||
"dev": "nuxt dev",
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "eslint . --fix"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user