-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[backend] Production Docker image definition
- Loading branch information
Showing
4 changed files
with
25 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.git | ||
node_modules | ||
npm-debug |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# First stage: build server app | ||
FROM node:12 as builder | ||
ENV NODE_ENV=development | ||
WORKDIR /app | ||
COPY . . | ||
RUN yarn install --frozen-lockfile --non-interactive | ||
RUN yarn build | ||
|
||
# Second stage: leaner image to deploy and run the built app | ||
FROM node:12-alpine | ||
ENV NODE_ENV=production | ||
WORKDIR /app | ||
COPY --from=builder /app/package.json /app/yarn.lock ./ | ||
RUN yarn install --frozen-lockfile --non-interactive && yarn cache clean | ||
COPY --from=builder /app/dist ./dist | ||
CMD ["yarn", "start:prod"] |
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 |
---|---|---|
|
@@ -807,17 +807,10 @@ | |
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" | ||
integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= | ||
|
||
"@types/lodash-es@^4.17.3": | ||
version "4.17.3" | ||
resolved "https://registry.yarnpkg.com/@types/lodash-es/-/lodash-es-4.17.3.tgz#87eb0b3673b076b8ee655f1890260a136af09a2d" | ||
integrity sha512-iHI0i7ZAL1qepz1Y7f3EKg/zUMDwDfTzitx+AlHhJJvXwenP682ZyGbgPSc5Ej3eEAKVbNWKFuwOadCj5vBbYQ== | ||
dependencies: | ||
"@types/lodash" "*" | ||
|
||
"@types/lodash@*": | ||
version "4.14.153" | ||
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.153.tgz#5cb7dded0649f1df97938ac5ffc4f134e9e9df98" | ||
integrity sha512-lYniGRiRfZf2gGAR9cfRC3Pi5+Q1ziJCKqPmjZocigrSJUVPWf7st1BtSJ8JOeK0FLXVndQ1IjUjTco9CXGo/Q== | ||
"@types/lodash@^4.14.155": | ||
version "4.14.155" | ||
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.155.tgz#e2b4514f46a261fd11542e47519c20ebce7bc23a" | ||
integrity sha512-vEcX7S7aPhsBCivxMwAANQburHBtfN9RdyXFk84IJmu2Z4Hkg1tOFgaslRiEqqvoLtbCBi6ika1EMspE+NZ9Lg== | ||
|
||
"@types/mime@*": | ||
version "2.0.2" | ||
|
@@ -4529,11 +4522,6 @@ locate-path@^5.0.0: | |
dependencies: | ||
p-locate "^4.1.0" | ||
|
||
lodash-es@^4.17.15: | ||
version "4.17.15" | ||
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78" | ||
integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ== | ||
|
||
[email protected]: | ||
version "4.4.2" | ||
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" | ||
|