-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docker): adicionar os arquivos Dockerfile e Makefile
fix #10
- Loading branch information
1 parent
ba3462c
commit 8664b6b
Showing
3 changed files
with
66 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM node:latest | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY package*.json ./ | ||
|
||
RUN npm install --production | ||
|
||
COPY . . | ||
|
||
EXPOSE 3000 | ||
|
||
CMD [ "npm", "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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.PHONY: build build\run run stop clean | ||
# serverest | ||
|
||
NAME_IMAGE=serverest | ||
PORT=3000 | ||
|
||
build: | ||
@DOCKER_BUILDKIT=1 docker build -t ${NAME_IMAGE}/${NAME_IMAGE} . | ||
|
||
build/run: build run | ||
|
||
run: | ||
@docker run -p ${PORT}:3000 ${NAME_IMAGE}/${NAME_IMAGE} | ||
|
||
stop: | ||
@docker stop -t 0 $$(docker ps -q --filter ancestor=${NAME_IMAGE}/${NAME_IMAGE}) | ||
|
||
clean: | ||
@docker rmi -f serverest/serverest |