From 55ff0cfe0bb75cf2927092a1218084474585939c Mon Sep 17 00:00:00 2001 From: Luis Eduardo Date: Mon, 25 Nov 2024 16:05:26 -0300 Subject: [PATCH] docker aws --- .github/workflows/prod.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index 1c13aa2..9fa077f 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -23,4 +23,16 @@ jobs: - name: Build Docker Image run: docker build -t luiseduardoalencar/gestao_vagas . - name: Publish Image - run: docker push luiseduardoalencar/gestao_vagas \ No newline at end of file + run: docker push luiseduardoalencar/gestao_vagas + + deploy: + needs: build + runs-on: self-hosted + steps: + - name: Pull image docker hub + run: docker pull luiseduardoalencar/gestao_vagas:latest + - name: remove container + run: docker rm -f + - name: Run docker container gestao-vagas + run: docker run -d -p 8080:8080 -e DATABASE_URL=${{secrets.DATABASE_URL}} -e DATABASE_PASSWORD=${{secrets.DATABASE_PASSWORD}} -e DATABASE_USERNAME=${{secrets.DATABASE_USERNAME}} --name gestao-vagas luiseduardoalencar/gestao_vagas +