-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
443bf67
commit 1590779
Showing
2 changed files
with
15 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,14 @@ | ||
FROM node:20.10-alpine3.19 | ||
ENV appDir /usr/src/app | ||
ENV appDir /usr/app | ||
|
||
# use changes to package.json to force Docker not to use the cache | ||
# when we change our application's nodejs dependencies: | ||
ADD package.json yarn.lock /tmp/ | ||
RUN cd /tmp && yarn install | ||
RUN mkdir -p ${appDir} && cp -a /tmp/node_modules ${appDir}/ | ||
|
||
# From here we load our application's code in, therefore the previous docker | ||
# "layer" thats been cached will be used if possible | ||
COPY express ${appDir}/express | ||
WORKDIR ${appDir} | ||
COPY . ${appDir} | ||
RUN yarn build | ||
# VOLUME ${appDir}/config | ||
|
||
# add webpack generated files | ||
COPY express ${appDir}/express | ||
|
||
EXPOSE 5000 | ||
WORKDIR ${appDir}/express | ||
CMD ["node", "server.js"] |