mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
fix dockerfile
This commit is contained in:
parent
3e66136897
commit
a644e88200
8
packages/wrapper/.dockerignore
Normal file
8
packages/wrapper/.dockerignore
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
./node_modules
|
||||||
|
./build
|
||||||
|
./dist
|
||||||
|
./ssl
|
||||||
|
|
||||||
|
# secrets
|
||||||
|
./api.production.env
|
||||||
|
./.env
|
@ -12,16 +12,23 @@ RUN apt install -y --no-install-recommends git
|
|||||||
RUN apt install -y --no-install-recommends ssh
|
RUN apt install -y --no-install-recommends ssh
|
||||||
RUN apt install -y --no-install-recommends ca-certificates
|
RUN apt install -y --no-install-recommends ca-certificates
|
||||||
|
|
||||||
|
# Create workdir
|
||||||
WORKDIR /home/node/app
|
WORKDIR /home/node/app
|
||||||
|
|
||||||
|
# Copy Files
|
||||||
|
COPY package.json ./
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Fix permissions
|
||||||
|
RUN chmod -R 777 /home/node/app
|
||||||
|
RUN chown -R node:node /home/node/app
|
||||||
|
|
||||||
|
# Set user to node
|
||||||
USER node
|
USER node
|
||||||
|
|
||||||
EXPOSE 9000
|
# Install modules & rebuild for host
|
||||||
|
|
||||||
COPY --chown=node:node ./package.json .
|
|
||||||
COPY --chown=node:node ./src ./src
|
|
||||||
|
|
||||||
RUN chmod -R 777 /home/node/app
|
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
|
# Start server
|
||||||
RUN export NODE_ENV=production
|
RUN export NODE_ENV=production
|
||||||
CMD ["npm", "run", "start"]
|
CMD ["npm", "run", "start"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user