Skip to content
This repository has been archived by the owner on Nov 21, 2020. It is now read-only.

Change dockerfile to make full build inside container [WIP] #711

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
.env*
.git*
.prettierrc
.snyk
# .snyk
.yarn
.pnp.js
Dockerfile*
google_cred.json.sample
scripts
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dump.rdb
*.swp
*.swo
.migrate
.yarn

# Google config file
google_cred.json
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
FROM erxes/runner:latest
WORKDIR /erxes-api/
RUN chown -R node:node /erxes-api
COPY --chown=node:node package.json /erxes-api/package.json
COPY --chown=node:node .* /erxes-api/
RUN yarn install
COPY --chown=node:node . /erxes-api
RUN yarn build
USER node
EXPOSE 3300
ENTRYPOINT [ "node", "--max_old_space_size=8192", "dist" ]