attempt to get docker working
This commit is contained in:
parent
2de61aa0d1
commit
7ea5a287f1
4 changed files with 35 additions and 4 deletions
3
.dockerignore
Normal file
3
.dockerignore
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
.DS_Store
|
||||||
|
node_modules
|
||||||
|
dist
|
24
Dockerfile
Normal file
24
Dockerfile
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
FROM node:lts-alpine AS base
|
||||||
|
RUN npm i -g pnpm
|
||||||
|
WORKDIR /app
|
||||||
|
COPY package.json pnpm-lock.yaml ./
|
||||||
|
|
||||||
|
FROM base as prod-deps
|
||||||
|
RUN pnpm install -P
|
||||||
|
|
||||||
|
FROM base as build-deps
|
||||||
|
RUN pnpm install
|
||||||
|
|
||||||
|
FROM build-deps as build
|
||||||
|
COPY . .
|
||||||
|
RUN pnpm run build
|
||||||
|
|
||||||
|
|
||||||
|
FROM base as runtime
|
||||||
|
COPY --from=prod-deps /app/node_modules .
|
||||||
|
COPY --from=build /app/dist ./dist
|
||||||
|
|
||||||
|
ENV HOST=0.0.0.0
|
||||||
|
ENV PORT=4321
|
||||||
|
EXPOSE 4321
|
||||||
|
CMD node ./dist/server/entry.mjs
|
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -23,8 +23,10 @@
|
||||||
"npm-watch": "^0.11.0",
|
"npm-watch": "^0.11.0",
|
||||||
"reading-time": "^1.5.0",
|
"reading-time": "^1.5.0",
|
||||||
"rollup": "^3.29.4",
|
"rollup": "^3.29.4",
|
||||||
"sass": "^1.68.0",
|
"sass": "^1.68.0"
|
||||||
"typescript": "^5.2.2"
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"typescript": "^5.4.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@ampproject/remapping": {
|
"node_modules/@ampproject/remapping": {
|
||||||
|
|
|
@ -35,7 +35,9 @@
|
||||||
"npm-watch": "^0.11.0",
|
"npm-watch": "^0.11.0",
|
||||||
"reading-time": "^1.5.0",
|
"reading-time": "^1.5.0",
|
||||||
"rollup": "^3.29.4",
|
"rollup": "^3.29.4",
|
||||||
"sass": "^1.68.0",
|
"sass": "^1.68.0"
|
||||||
"typescript": "^5.2.2"
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"typescript": "^5.4.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue