mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +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 ca-certificates
|
||||
|
||||
# Create workdir
|
||||
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
|
||||
|
||||
EXPOSE 9000
|
||||
|
||||
COPY --chown=node:node ./package.json .
|
||||
COPY --chown=node:node ./src ./src
|
||||
|
||||
RUN chmod -R 777 /home/node/app
|
||||
# Install modules & rebuild for host
|
||||
RUN npm install
|
||||
|
||||
# Start server
|
||||
RUN export NODE_ENV=production
|
||||
CMD ["npm", "run", "start"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user