mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
use new dockerfile
This commit is contained in:
parent
86737c045a
commit
e3e7131304
@ -1,8 +1,10 @@
|
||||
FROM node:16-bullseye
|
||||
ENV NODE_ENV=production
|
||||
FROM node:16-bullseye-slim
|
||||
|
||||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
|
||||
|
||||
RUN apt update
|
||||
RUN apt install python -y
|
||||
RUN apt install --no-install-recommends curl python yarn build-essential -y
|
||||
|
||||
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
|
||||
|
||||
WORKDIR /home/node/app
|
||||
@ -14,7 +16,11 @@ COPY package.json ./
|
||||
COPY --chown=node:node . .
|
||||
|
||||
RUN chmod -R 777 /home/node/app
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
|
||||
CMD ["node", "/home/node/app/dist/index.js"]
|
||||
RUN export NODE_ENV=production
|
||||
|
||||
RUN yarn global add cross-env
|
||||
RUN yarn install --production
|
||||
RUN yarn build
|
||||
|
||||
CMD ["yarn", "run", "run:prod"]
|
Loading…
x
Reference in New Issue
Block a user