-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrap to container, minor improvements
- Loading branch information
1 parent
a5c5320
commit 173383c
Showing
7 changed files
with
196 additions
and
128 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,7 @@ | ||
* | ||
!src | ||
!config.js | ||
!LICENSE | ||
!package.json | ||
!package-lock.json | ||
!readme.md |
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,24 @@ | ||
# Build node_modules to avoid installing NPM (additinal container size) | ||
|
||
FROM alpine AS stage | ||
|
||
WORKDIR /app | ||
COPY . /app | ||
|
||
RUN apk add --update npm=12.15.0-r1 | ||
RUN npm install | ||
|
||
# Build aclual container | ||
|
||
FROM alpine | ||
|
||
COPY . /app | ||
COPY --from=stage /app/node_modules /app/node_modules | ||
WORKDIR /app | ||
|
||
RUN apk add --update nodejs=12.15.0-r1 | ||
|
||
EXPOSE 80 | ||
|
||
ENV APP__ENV_NAME=prod | ||
CMD node -r esm src/api.js |
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,13 @@ | ||
#!/bin/sh | ||
|
||
HUB=zitros/analytics-saviour | ||
|
||
docker build --rm -t image . | ||
|
||
if [ $# -eq 1 ] | ||
then | ||
docker tag image $HUB:$1 | ||
fi | ||
docker tag image $HUB:latest | ||
|
||
docker push $HUB |
Oops, something went wrong.