Skip to content

Commit

Permalink
feat(app-service): add npm install flags config;
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow committed Feb 9, 2022
1 parent 8a5cc5d commit 463daa6
Show file tree
Hide file tree
Showing 11 changed files with 340 additions and 476 deletions.
7 changes: 4 additions & 3 deletions packages/app-service/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# node_modules
.env
ecosystem.config.js
# dist
dist
data
src
# src
tests
commitlint.config.js
ecosystem.config.js.tpl
Expand All @@ -12,4 +12,5 @@ ecosystem.config.js.tpl
.env.production
.gitignore
Dockerfile
http
http
node_modules
15 changes: 12 additions & 3 deletions packages/app-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,20 @@ RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSI
&& tar -C /usr/local/bin -xzvf dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& rm dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz

RUN npm install npm -g

EXPOSE 8000
WORKDIR /app
ENV LOG_LEVEL=debug
COPY --chown=node:node . /app
RUN mkdir /app/data || true
RUN chown node:node /app/data
COPY . /app
# COPY --chown=node:node . /app
# RUN mkdir /app/data || true
# RUN chown node:node /app/data
RUN npm install
RUN npm run build
RUN chown -R node:node /app/node_modules
RUN chown node:node /app/package.json
RUN chown node:node /app/package-lock.json

USER node
CMD [ "sh", "/app/start.sh" ]
Loading

0 comments on commit 463daa6

Please sign in to comment.