mirror of
https://github.com/gnmyt/myspeed.git
synced 2025-12-30 09:40:13 -06:00
Created the Dockerfile
This commit is contained in:
26
Dockerfile
Executable file
26
Dockerfile
Executable file
@@ -0,0 +1,26 @@
|
||||
FROM node:16-alpine
|
||||
RUN apk add g++ make cmake python3 --no-cache
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
WORKDIR /myspeed
|
||||
|
||||
COPY --chown=node:node ./client ./client
|
||||
COPY --chown=node:node ./server ./server
|
||||
COPY --chown=node:node ./package.json ./package.json
|
||||
|
||||
RUN npm install
|
||||
RUN cd client && npm install
|
||||
RUN npm run build
|
||||
RUN rm -rf /myspeed/client
|
||||
RUN mkdir -p /myspeed/data
|
||||
|
||||
RUN chown -R node:node /myspeed
|
||||
|
||||
USER node
|
||||
|
||||
VOLUME ["/myspeed/data"]
|
||||
|
||||
EXPOSE 5216
|
||||
|
||||
CMD ["node", "server"]
|
||||
Reference in New Issue
Block a user