From 4b6975dcad8446122b6bc4c7ccbf1c78c6f70a90 Mon Sep 17 00:00:00 2001 From: baraganio Date: Mon, 29 Apr 2024 01:21:35 +0200 Subject: [PATCH] =?UTF-8?q?A=C3=B1adiendo=20grafana=20y=20prometheus=20al?= =?UTF-8?q?=20despliegue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 34 +++++++++++++++++++ docker-compose.yml | 4 +-- gatewayservice/monitoring/grafana/Dockerfile | 3 ++ .../monitoring/prometheus/Dockerfile | 3 ++ 4 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 gatewayservice/monitoring/grafana/Dockerfile create mode 100644 gatewayservice/monitoring/prometheus/Dockerfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3c729863..d37d9904 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -150,6 +150,40 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io workdir: gatewayservice + docker-push-prometheus: + name: Push Prometheus Docker Image to GitHub Packages + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + needs: [e2e-tests] + steps: + - uses: actions/checkout@v4 + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@v5 + with: + name: arquisoft/wiq_es2c/gatewayservice/monitoring/prometheus + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + registry: ghcr.io + workdir: gatewayservice/monitoring/prometheus + docker-push-grafana: + name: Push Grafana Docker Image to GitHub Packages + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + needs: [e2e-tests] + steps: + - uses: actions/checkout@v4 + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@v5 + with: + name: arquisoft/wiq_es2c/gatewayservice/monitoring/grafana + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + registry: ghcr.io + workdir: gatewayservice/monitoring/grafana deploy: name: Deploy over SSH runs-on: ubuntu-latest diff --git a/docker-compose.yml b/docker-compose.yml index 04eca969..285f04f9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -101,7 +101,7 @@ services: prometheus: image: prom/prometheus container_name: prometheus-${teamname:-defaultASW} - profiles: ["dev"] + profiles: ["dev","prod"] networks: - mynetwork volumes: @@ -115,7 +115,7 @@ services: grafana: image: grafana/grafana container_name: grafana-${teamname:-defaultASW} - profiles: ["dev"] + profiles: ["dev","prod"] networks: - mynetwork volumes: diff --git a/gatewayservice/monitoring/grafana/Dockerfile b/gatewayservice/monitoring/grafana/Dockerfile new file mode 100644 index 00000000..d652dd48 --- /dev/null +++ b/gatewayservice/monitoring/grafana/Dockerfile @@ -0,0 +1,3 @@ +FROM grafana/grafana + +COPY . . \ No newline at end of file diff --git a/gatewayservice/monitoring/prometheus/Dockerfile b/gatewayservice/monitoring/prometheus/Dockerfile new file mode 100644 index 00000000..e2aee68f --- /dev/null +++ b/gatewayservice/monitoring/prometheus/Dockerfile @@ -0,0 +1,3 @@ +FROM prom/prometheus + +COPY . . \ No newline at end of file