-
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.
Added support for Dockerfile while extracting git commit sha and version number fix #5
- Loading branch information
Manny
authored and
Manny
committed
Jul 10, 2020
1 parent
5b44331
commit fc60862
Showing
5 changed files
with
49 additions
and
5 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,23 @@ | ||
node_modules/ | ||
build | ||
dist | ||
*.log | ||
.env | ||
yarn.lock | ||
package-lock.json | ||
.eslintcache | ||
**/.DS_Store | ||
coverage | ||
prisma/migrations/*.lock | ||
.huskyrc | ||
.lintstagedrc | ||
.nvmrc | ||
.prettierignore | ||
.prettierrc | ||
*.md | ||
jest.config.js | ||
.eslintignore | ||
.eslintrc.js | ||
commitlint.config.js | ||
postman | ||
.github |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM node:alpine | ||
|
||
COPY $PWD /home/node | ||
|
||
WORKDIR /home/node | ||
|
||
RUN yarn install --production=true; \ | ||
yarn build; \ | ||
apk add git; \ | ||
cp .env.example .env; \ | ||
sed -i "/COMMIT=/c\COMMIT=$(git log -1 --format="%H")" .env; \ | ||
sed -i "/VERSION=/c\VERSION=$(node -p 'require(`./package.json`).version')" .env; \ | ||
apk del git; | ||
|
||
EXPOSE 80 | ||
|
||
CMD ["/bin/sh", "-c", "yarn start"] |
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