mirror of
https://github.com/He4eT/simple-spaceapi.git
synced 2026-05-04 17:37:24 +00:00
docker: initial commit
This commit is contained in:
parent
00e62feaa2
commit
42c322449d
3 changed files with 45 additions and 0 deletions
20
Dockerfile
Normal file
20
Dockerfile
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
FROM node:22-alpine
|
||||
# RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev nasm bash vips-dev
|
||||
|
||||
ARG NODE_ENV=production
|
||||
ENV NODE_ENV=$NODE_ENV
|
||||
ENV PATH=/app/node_modules/.bin:$PATH
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci --only=production
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN chown -R node:node /app
|
||||
USER node
|
||||
RUN npm run build
|
||||
|
||||
EXPOSE 1337
|
||||
CMD ["npm", "run", "start"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue