-
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.
🚀 Adição do projeto inteiro no container - Conseguindo rodar o projeto localmente e via docker - Adição do product-ms no compose - Adição de DockerFile pra gerar a img do product-ms - Adição de scripts pra startar e parar a aplicação
- Loading branch information
Eduardo
committed
Sep 12, 2021
1 parent
a07b9d9
commit 6470914
Showing
5 changed files
with
53 additions
and
2 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,10 @@ | ||
cd "$(find ~ -type d -name product-ms-quarkus | head -1)" | ||
|
||
mvn clean package -Dmaven.test.skip=true | ||
|
||
docker image build -t product-ms-quarkus . -f ./src/main/docker/Dockerfile | ||
|
||
docker-compose -f src/main/docker/docker-compose.yaml up -d product-ms-database | ||
docker-compose -f src/main/docker/docker-compose.yaml up -d product-ms-quarkus | ||
|
||
echo "containers gerados com sucesso!" |
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,6 @@ | ||
docker container rm --force product-ms-quarkus && docker container rm --force product-ms-quarkus-database | ||
|
||
docker image rm $(docker images 'product-ms-quarkus') | ||
docker image rm $(docker images 'mongo') | ||
|
||
echo "containers & suas imagens foram parados e removidos com sucesso!" |
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,18 @@ | ||
FROM openjdk:11 | ||
|
||
ENV MONGODB_URL="mongodb://admin:admin123@product-ms-database:27015/product-ms" | ||
|
||
WORKDIR /deployments | ||
|
||
COPY target/quarkus-app/lib/ /deployments/lib/ | ||
COPY target/quarkus-app/*.jar /deployments/ | ||
COPY target/quarkus-app/app/ /deployments/app/ | ||
COPY target/quarkus-app/quarkus/ /deployments/quarkus/ | ||
|
||
CMD ["java", "-jar", "quarkus-run.jar"] | ||
|
||
RUN ls -l /deployments | ||
|
||
RUN echo '\n\n * * * Imagem gerada com sucesso * * * \n' | ||
|
||
|
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