From 7e82bd2247e43ee4338fafcc93db3dc020af3b99 Mon Sep 17 00:00:00 2001 From: david alvarez <99325990+bidof@users.noreply.github.com> Date: Sat, 24 Feb 2024 01:46:08 +0100 Subject: [PATCH 1/3] Update release.yml --- .github/workflows/release.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8bece02..9ddf038 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,10 @@ name: Deploy on release on: - release: - types: [published] + push: + branches: + -master + -releases jobs: unit-tests: @@ -51,7 +53,9 @@ jobs: - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@v5 env: - API_URI: http://${{ secrets.DEPLOY_HOST }}:8000 + API_URI: http://${{ secrets.DEPLOY_HOST || 'localhost' }}:8000 + + with: name: arquisoft/wiq_es04c/webapp username: ${{ github.actor }} @@ -109,7 +113,7 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io - workdir: gatewayservice + workdir: ./gatewayservice docker-push-questionservice: name: Push question service Docker Image to GitHub Packages runs-on: ubuntu-latest @@ -126,7 +130,7 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io - workdir: questionservice + workdir: ./questionservice deploy: name: Deploy over SSH @@ -140,7 +144,8 @@ jobs: user: ${{ secrets.DEPLOY_USER }} key: ${{ secrets.DEPLOY_KEY }} command: | - wget https://raw.githubusercontent.com/arquisoft/wiq_es04c/master/docker-compose.yml -O docker-compose.yml - wget https://raw.githubusercontent.com/arquisoft/wiq_es04c/master/.env -O .env + wget https://raw.githubusercontent.com/arquisoft/wiq_es04c/releases/docker-compose.yml -O docker-compose.yml + wget https://raw.githubusercontent.com/arquisoft/wiq_es04c/releases/.env -O .env + git clone -b releases https://github.com/Arquisoft/wiq_es04c.git docker compose --profile prod down docker compose --profile prod up -d From 30a2e23ee31fb8456c2ef4092a5b37fed9b1f12d Mon Sep 17 00:00:00 2001 From: Augusto <49859508+augustocristian@users.noreply.github.com> Date: Sun, 3 Mar 2024 18:36:33 +0100 Subject: [PATCH 2/3] Solving problems connectivity (wrong ghcrio image names) --- docker-compose.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 44fb37f..51d222d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3' services: mongodb: - container_name: mongodb-${teamname:-defaultASW} + container_name: mongodb-${teamname:-wiq_0} image: mongo profiles: ["dev", "prod"] volumes: @@ -12,8 +12,8 @@ services: - mynetwork authservice: - container_name: authservice-${teamname:-defaultASW} - image: ghcr.io/arquisoft/wiq_0/authservice:latest + container_name: authservice-${teamname:-wiq_0} + image: ghcr.io/arquisoft/${teamname:-wiq_0}/authservice:latest profiles: ["dev", "prod"] build: ./users/authservice depends_on: @@ -26,8 +26,8 @@ services: MONGODB_URI: mongodb://mongodb:27017/userdb userservice: - container_name: userservice-${teamname:-defaultASW} - image: ghcr.io/arquisoft/wiq_0/userservice:latest + container_name: userservice-${teamname:-wiq_0} + image: ghcr.io/arquisoft/${teamname:-wiq_0}/userservice:latest profiles: ["dev", "prod"] build: ./users/userservice depends_on: @@ -40,8 +40,8 @@ services: MONGODB_URI: mongodb://mongodb:27017/userdb gatewayservice: - container_name: gatewayservice-${teamname:-defaultASW} - image: ghcr.io/arquisoft/wiq_0/gatewayservice:latest + container_name: gatewayservice-${teamname:-wiq_0} + image: ghcr.io/arquisoft/${teamname:-wiq_0}/gatewayservice:latest profiles: ["dev", "prod"] build: ./gatewayservice depends_on: @@ -58,7 +58,7 @@ services: USER_SERVICE_URL: http://userservice:8001 questionservice: - container_name: questionservice-${teamname:-defaultASW} + container_name: questionservice-${teamname:-wiq_0} build: ./questionservice ports: - "8003:8003" @@ -66,8 +66,8 @@ services: - mynetwork webapp: - container_name: webapp-${teamname:-defaultASW} - image: ghcr.io/arquisoft/wiq_0/webapp:latest + container_name: webapp-${teamname:-wiq_0} + image: ghcr.io/arquisoft/${teamname:-wiq_0}/webapp:latest profiles: ["dev", "prod"] build: ./webapp depends_on: @@ -77,7 +77,7 @@ services: prometheus: image: prom/prometheus - container_name: prometheus-${teamname:-defaultASW} + container_name: prometheus-${teamname:-wiq_0} profiles: ["dev"] networks: - mynetwork @@ -91,7 +91,7 @@ services: grafana: image: grafana/grafana - container_name: grafana-${teamname:-defaultASW} + container_name: grafana-${teamname:-wiq_0} profiles: ["dev"] networks: - mynetwork From 51b45e22538eab0eb84fa2b0c2776185c0a45d34 Mon Sep 17 00:00:00 2001 From: Augusto Date: Sun, 3 Mar 2024 21:57:10 +0100 Subject: [PATCH 3/3] Replaced wiq_0-wiq_es04c --- gatewayservice/package.json | 6 +++--- questionservice/package.json | 6 +++--- users/authservice/package.json | 6 +++--- users/userservice/package.json | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gatewayservice/package.json b/gatewayservice/package.json index fd16c42..03b5cc2 100644 --- a/gatewayservice/package.json +++ b/gatewayservice/package.json @@ -9,14 +9,14 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/arquisoft/wiq_0.git" + "url": "git+https://github.com/arquisoft/wiq_es04c.git" }, "author": "", "license": "ISC", "bugs": { - "url": "https://github.com/arquisoft/wiq_0/issues" + "url": "https://github.com/arquisoft/wiq_es04c/issues" }, - "homepage": "https://github.com/arquisoft/wiq_0#readme", + "homepage": "https://github.com/arquisoft/wiq_es04c#readme", "dependencies": { "axios": "^1.6.5", "cors": "^2.8.5", diff --git a/questionservice/package.json b/questionservice/package.json index ad9e8d9..7094837 100644 --- a/questionservice/package.json +++ b/questionservice/package.json @@ -9,14 +9,14 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/arquisoft/wiq_0.git" + "url": "git+https://github.com/arquisoft/wiq_es04c.git" }, "author": "", "license": "ISC", "bugs": { - "url": "https://github.com/arquisoft/wiq_0/issues" + "url": "https://github.com/arquisoft/wiq_es04c/issues" }, -"homepage": "https://github.com/arquisoft/wiq_0#readme", +"homepage": "https://github.com/arquisoft/wiq_es04c#readme", "dependencies": { "bcrypt": "^5.1.1", "body-parser": "^1.20.2", diff --git a/users/authservice/package.json b/users/authservice/package.json index 6b5b623..7438a5b 100644 --- a/users/authservice/package.json +++ b/users/authservice/package.json @@ -9,14 +9,14 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/arquisoft/wiq_0.git" + "url": "git+https://github.com/arquisoft/wiq_es04c.git" }, "author": "", "license": "ISC", "bugs": { - "url": "https://github.com/arquisoft/wiq_0/issues" + "url": "https://github.com/arquisoft/wiq_es04c/issues" }, - "homepage": "https://github.com/arquisoft/wiq_0#readme", + "homepage": "https://github.com/arquisoft/wiq_es04c#readme", "dependencies": { "bcrypt": "^5.1.1", "body-parser": "^1.20.2", diff --git a/users/userservice/package.json b/users/userservice/package.json index 2462c8e..9ea341c 100644 --- a/users/userservice/package.json +++ b/users/userservice/package.json @@ -9,14 +9,14 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/arquisoft/wiq_0.git" + "url": "git+https://github.com/arquisoft/wiq_es04c.git" }, "author": "", "license": "ISC", "bugs": { - "url": "https://github.com/arquisoft/wiq_0/issues" + "url": "https://github.com/arquisoft/wiq_es04c/issues" }, - "homepage": "https://github.com/arquisoft/wiq_0#readme", + "homepage": "https://github.com/arquisoft/wiq_es04c#readme", "dependencies": { "bcrypt": "^5.1.1", "body-parser": "^1.20.2",