From 013d04536ab86b8ab1ef8c76f43110a0ac7ca1d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Tru=C3=A9bano?= Date: Sat, 9 Mar 2024 17:52:27 +0100 Subject: [PATCH 01/59] Adding new technologies to documentation section 4 and adding azure to section 7 --- docs/images/10-Quality-Tree-EN.png | Bin 32001 -> 0 bytes docs/src/04_solution_strategy.adoc | 2 +- docs/src/07_deployment_view.adoc | 39 +++++++++++++++++------------ 3 files changed, 24 insertions(+), 17 deletions(-) delete mode 100644 docs/images/10-Quality-Tree-EN.png diff --git a/docs/images/10-Quality-Tree-EN.png b/docs/images/10-Quality-Tree-EN.png deleted file mode 100644 index dbae1bf1b111345eab9bbe7ec4ea924bd99f88b5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32001 zcmdqJ2T)Vrw=WJBEFcIdy-EP3_g++LXpw*vX-eol^p1)m5D3zHP&(42_a=cz7oVc(iGV9lhdQl*KZI^jm8S$H{S2$XmuuEfG@lR(Eax`>89; zwLS%M2)r7#?_V_~p}AW!`{iZ-gV4+epWd>tu+Sz%#x}GB_8-nxZ}z$$Z1isI_wHQ| z_G&@AJVpxKw3?QSbw+YV3ib7$&ePG+smc5K`Tc}w78&zl>OI!YyJFb2x#H~x>>dOM z2MbC`rF5&u7V2^d3JBblm6aVF8F}ufM@dUhkBE+r9(Eq5;#8T=ELv&dDP4NVe_FD& zo`{Dpnd!PfsIQZ-3&2T6OOAkq_w9*dWmRdvACZV?bcw z2Wli(@Cg4Q22@a-G#vN$V$86fhMn3!H`sA=h_e54L)HD*lz%S9OoW3q|G5Zu?8wgj z=c(*!bEwWgH~hb7_OJBpF7<*xfBw8*QBxz18%B38x)vGL@FnmVQsh7j4vRR1BqV6E zva$*qMe5XYD6U?;I{5P^rHP42m9=PeSy>qkEiD+A;0Sje=Isu@=-IVH?q+VUZEc|r zt0jc)mhGM*X$+o+w~5Mp!C4$w`&0%T-8!(d@RsnMsC9~$;u@@Ym>F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04_solution_strategy.adoc +++ b/docs/src/04_solution_strategy.adoc @@ -33,13 +33,13 @@ See https://docs.arc42.org/section-4/[Solution Strategy] in the arc42 documentat === Technologies * *React*: JavaScript library for web and native user interfaces. It allows developers to create interactive web applications by breaking down the UI into reusable components. React uses a declarative approach to efficiently update and render components, resulting in faster and more maintainable code. It's widely adopted in the industry due to its simplicity, performance, and robustness. -* *Svelte*: modern JavaScript framework that compiles code at build time for efficient updates to the DOM. It emphasizes smaller bundle sizes and better performance, offering a simpler approach to building dynamic web applications compared to traditional frameworks like React or Vue. * *Node.js*: JavaScript runtime that enables running JavaScript code outside of web browsers. It's renowned for its event-driven architecture and extensive collection of packages, making it ideal for building scalable server-side applications. + *Express.js*: Express.js, often simply called Express, is a minimalist web application framework for Node.js. It simplifies the process of building web applications by providing a robust set of features, including middleware support, routing, and templating engines. Express is known for its flexibility, simplicity, and performance, making it a popular choice for developing web applications and APIs in Node.js. * *.NET*: versatile developer platform for creating web, mobile, desktop, and cloud applications. It supports multiple programming languages and provides a rich set of libraries and tools for building software solutions. With built-in support for creating APIs and consuming web services, .NET makes it simple to develop and integrate with backend systems and services. * *Wikidata*: Wikidata provides a REST API for retrieving information related to any topic. It helps us to dynamically generate questions for our game using it from any programming language. * *MongoDB*: popular NoSQL database known for its flexibility and scalability. It stores data in flexible JSON-like documents and is widely used in modern web development for its simplicity and ability to handle large volumes of data. * *Cucumber*: Testing tool that supports Behavior Driven Development (BDD) and allows us also to comply testability quality attribute. +* *SonarCloud*: Cloud-based service provided by SonarSource, which offers continuous code quality analysis and automated code reviews for software development projects. It helps developers identify and fix bugs, security vulnerabilities, and code smells in their codebase to improve overall software quality. * *Arc42*: framework (template) used for documenting and communicating software architectures. It provides a template for describing the architecture of a software system, covering aspects such as stakeholders, requirements, architecture decisions, components, interfaces, and quality attributes. arc42 helps teams create consistent and comprehensible architecture documentation, enabling better communication, understanding, and maintenance of software systems throughout their lifecycle. * *npm*: default package manager for Node.js, providing a command-line interface to install, manage, and publish JavaScript packages. With over a million packages available in its registry, npm simplifies adding functionality to Node.js projects by handling dependencies and providing tools for versioning and publishing packages. * *Docker*: platform that will be used for deploying our services inside containers. Containers are lightweight, portable, and self-sufficient units that contain everything needed to run an application, including the code, runtime, system tools, libraries, and settings. Docker enables developers to package their applications along with all dependencies into containers, ensuring consistency across different environments, such as development, testing, and production. diff --git a/docs/src/07_deployment_view.adoc b/docs/src/07_deployment_view.adoc index 66a39e3..2673084 100644 --- a/docs/src/07_deployment_view.adoc +++ b/docs/src/07_deployment_view.adoc @@ -98,28 +98,30 @@ General view of system's infrastructure [plantuml, target=deployment-diagram, format=png] .... actor client as "Client" -frame UbuntuServer { - frame Docker { +frame Azure { + frame UbuntuServer { + frame Docker { - frame WebAPP { - node React - } + frame WebAPP { + node React + } - frame NodeJSGateway { - node Authentication + frame NodeJSGateway { + node Authentication - node Users - } + node Users + } - database MongoDB { - node UsersDatabase + database MongoDB { + node UsersDatabase - node ResultsDatabase - } + node ResultsDatabase + } - frame .NET { - node RestAPI + frame .NET { + node RestAPI + } } } } @@ -130,6 +132,10 @@ frame GitHub{ node dockerCompose } + frame wiq_en3a{ + node project + } + } .NET -- ResultsDatabase : MongoDB (port 27017) @@ -138,7 +144,8 @@ WebAPP -- NodeJSGateway : (port 8000:8002) WebAPP -- .NET : .NET (port TBD) client -- WebAPP : Web Browser (port 3000) -Docker -- GitHubActions : on release +GitHubActions -- UbuntuServer : on release +Docker -- wiq_en3a .... From dc176bca3e45e75388c1322dd4e6dd96864bd6b8 Mon Sep 17 00:00:00 2001 From: ritacatuxo <87928858+ritacatuxo@users.noreply.github.com> Date: Tue, 12 Mar 2024 19:42:48 +0100 Subject: [PATCH 02/59] docker file --- users/authservice/Dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 users/authservice/Dockerfile diff --git a/users/authservice/Dockerfile b/users/authservice/Dockerfile new file mode 100644 index 0000000..7132990 --- /dev/null +++ b/users/authservice/Dockerfile @@ -0,0 +1,20 @@ +# Use an official Node.js runtime as a parent image +FROM node:20 + +# Set the working directory in the container +WORKDIR /usr/src/authservice + +# Copy package.json and package-lock.json to the working directory +COPY package*.json ./ + +# Install app dependencies +RUN npm install + +# Copy the app source code to the working directory +COPY . . + +# Expose the port the app runs on +EXPOSE 8002 + +# Define the command to run your app +CMD ["node", "auth-service.js"] From 35327d32d6fe4e6b11b1cafc67261cc7642ec99a Mon Sep 17 00:00:00 2001 From: ritacatuxo <87928858+ritacatuxo@users.noreply.github.com> Date: Tue, 12 Mar 2024 19:43:15 +0100 Subject: [PATCH 03/59] docker file --- users/userservice/Dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 users/userservice/Dockerfile diff --git a/users/userservice/Dockerfile b/users/userservice/Dockerfile new file mode 100644 index 0000000..f325e8b --- /dev/null +++ b/users/userservice/Dockerfile @@ -0,0 +1,20 @@ +# Use an official Node.js runtime as a parent image +FROM node:20 + +# Set the working directory in the container +WORKDIR /usr/src/userservice + +# Copy package.json and package-lock.json to the working directory +COPY package*.json ./ + +# Install app dependencies +RUN npm install + +# Copy the app source code to the working directory +COPY . . + +# Expose the port the app runs on +EXPOSE 8001 + +# Define the command to run your app +CMD ["node", "user-service.js"] From af98d0cbfc9b857d7c0b2698a2bc46c4bb50ad2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Tru=C3=A9bano?= Date: Tue, 12 Mar 2024 19:52:59 +0100 Subject: [PATCH 04/59] Update release.yml --- .github/workflows/release.yml | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fd6ca88..5e9a25e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,28 +5,7 @@ on: types: [published] jobs: - unit-tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: npm --prefix users/authservice ci - - run: npm --prefix users/userservice ci - - run: npm --prefix gatewayservice ci - - run: npm --prefix webapp ci - - run: npm --prefix users/authservice test -- --coverage - - run: npm --prefix users/userservice test -- --coverage - - run: npm --prefix gatewayservice test -- --coverage - - run: npm --prefix webapp test -- --coverage - - name: Analyze with SonarCloud - uses: sonarsource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} e2e-tests: - needs: [unit-tests] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 0bc92f406bd482abb0684a246fdd825f253c10b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Tru=C3=A9bano?= Date: Tue, 12 Mar 2024 20:05:17 +0100 Subject: [PATCH 05/59] Build.yml update --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 410b5a8..31a575e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,5 +24,6 @@ jobs: - name: Analyze with SonarCloud uses: sonarsource/sonarcloud-github-action@master env: + CI: "" GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From 338f128891d0a15f79cd6865d722e93d9587e641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Tru=C3=A9bano?= Date: Tue, 12 Mar 2024 20:09:15 +0100 Subject: [PATCH 06/59] Update .yml --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 31a575e..410b5a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,5 @@ jobs: - name: Analyze with SonarCloud uses: sonarsource/sonarcloud-github-action@master env: - CI: "" GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From 636388e0d450309969544bed458e8b6ed5248171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Tru=C3=A9bano?= <124297960+UO289930@users.noreply.github.com> Date: Tue, 12 Mar 2024 20:17:27 +0100 Subject: [PATCH 07/59] Update release.yml --- .github/workflows/release.yml | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e9a25e..6fe7451 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,26 +5,13 @@ on: types: [published] jobs: - e2e-tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: npm --prefix users/authservice install - - run: npm --prefix users/userservice install - - run: npm --prefix gatewayservice install - - run: npm --prefix webapp install - - run: npm --prefix webapp run build - - run: npm --prefix webapp run test:e2e + docker-push-webapp: name: Push webapp 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 @@ -44,7 +31,6 @@ jobs: permissions: contents: read packages: write - needs: [e2e-tests] steps: - uses: actions/checkout@v4 - name: Publish to Registry @@ -61,7 +47,6 @@ jobs: permissions: contents: read packages: write - needs: [e2e-tests] steps: - uses: actions/checkout@v4 - name: Publish to Registry @@ -78,7 +63,6 @@ jobs: permissions: contents: read packages: write - needs: [e2e-tests] steps: - uses: actions/checkout@v4 - name: Publish to Registry From 13e8862a42faf440dcc40a0680ebbbfe5619138a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Tru=C3=A9bano?= Date: Tue, 12 Mar 2024 20:24:21 +0100 Subject: [PATCH 08/59] Update .yml --- .github/workflows/release.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e9a25e..c1e07bf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,26 +5,31 @@ on: types: [published] jobs: - e2e-tests: +docker-push-wikidata-service: + name: Push wikidata Docker Image to GitHub Packages runs-on: ubuntu-latest + permissions: + contents: read + packages: write steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@v5 + env: + API_URI: http://${{ secrets.DEPLOY_HOST }}:7259 with: - node-version: 20 - - run: npm --prefix users/authservice install - - run: npm --prefix users/userservice install - - run: npm --prefix gatewayservice install - - run: npm --prefix webapp install - - run: npm --prefix webapp run build - - run: npm --prefix webapp run test:e2e + name: arquisoft/wiq_en3a/wikidata-service + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + registry: ghcr.io + workdir: wikidata-service + buildargs: API_URI docker-push-webapp: name: Push webapp 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 @@ -44,7 +49,6 @@ jobs: permissions: contents: read packages: write - needs: [e2e-tests] steps: - uses: actions/checkout@v4 - name: Publish to Registry @@ -61,7 +65,6 @@ jobs: permissions: contents: read packages: write - needs: [e2e-tests] steps: - uses: actions/checkout@v4 - name: Publish to Registry @@ -78,7 +81,6 @@ jobs: permissions: contents: read packages: write - needs: [e2e-tests] steps: - uses: actions/checkout@v4 - name: Publish to Registry From 38a3ea6b44591a6faff76883a01f30f68aa27c61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Tru=C3=A9bano?= Date: Tue, 12 Mar 2024 20:27:11 +0100 Subject: [PATCH 09/59] Update .yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b7f389d..bc6e11e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: env: API_URI: http://${{ secrets.DEPLOY_HOST }}:7259 with: - name: arquisoft/wiq_en3a/wikidata-service + name: arquisoft/wiq_en3a/wikidata_service username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io From cd27d4030cded9e4a141a52aeb263c70385a7767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Tru=C3=A9bano?= Date: Tue, 12 Mar 2024 20:29:10 +0100 Subject: [PATCH 10/59] Update .yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bc6e11e..f996d69 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io - workdir: wikidata-service + workdir: wikidata_service buildargs: API_URI docker-push-webapp: name: Push webapp Docker Image to GitHub Packages From 9a36311192a62bd8b871a7b23c81e93fb368d346 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Wed, 13 Mar 2024 22:56:55 +0100 Subject: [PATCH 11/59] Changes in Dockerfile of wikidata --- wikidata_service/WikiDataTest/Dockerfile | 31 +++++++++--------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/wikidata_service/WikiDataTest/Dockerfile b/wikidata_service/WikiDataTest/Dockerfile index ab322a5..8e01f1f 100644 --- a/wikidata_service/WikiDataTest/Dockerfile +++ b/wikidata_service/WikiDataTest/Dockerfile @@ -1,26 +1,17 @@ -#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. - -#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed. -#For more information, please see https://aka.ms/containercompat - -FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base +# Use the official image as a parent image. +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env WORKDIR /app -EXPOSE 7259 -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build -ARG BUILD_CONFIGURATION=Release -WORKDIR /src -COPY ["WikiDataTest/WikiDataTest.csproj", "WikiDataTest/"] -RUN dotnet restore "./WikiDataTest/./WikiDataTest.csproj" -COPY . . -WORKDIR "/src/WikiDataTest" -RUN dotnet build "./WikiDataTest.csproj" -c %BUILD_CONFIGURATION% -o /app/build +# Copy csproj and restore as distinct layers +COPY *.csproj ./ +RUN dotnet restore -FROM build AS publish -ARG BUILD_CONFIGURATION=Release -RUN dotnet publish "./WikiDataTest.csproj" -c %BUILD_CONFIGURATION% -o /app/publish /p:UseAppHost=false +# Copy everything else and build +COPY . ./ +RUN dotnet publish -c Release -o out -FROM base AS final +# Build runtime image +FROM mcr.microsoft.com/dotnet/aspnet:6.0 WORKDIR /app -COPY --from=publish /app/publish . +COPY --from=build-env /app/out . ENTRYPOINT ["dotnet", "WikiDataTest.dll"] \ No newline at end of file From 70cd740ce4af3de77587c1dd7e7d9377e9e64eb8 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Wed, 13 Mar 2024 23:32:40 +0100 Subject: [PATCH 12/59] Moving Dockerfile of folder --- wikidata_service/{WikiDataTest => }/Dockerfile | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename wikidata_service/{WikiDataTest => }/Dockerfile (100%) diff --git a/wikidata_service/WikiDataTest/Dockerfile b/wikidata_service/Dockerfile similarity index 100% rename from wikidata_service/WikiDataTest/Dockerfile rename to wikidata_service/Dockerfile From 9760dc87f50f970848294331dc873b8fcd933067 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Wed, 13 Mar 2024 23:38:28 +0100 Subject: [PATCH 13/59] Changing DockerFile again --- wikidata_service/Dockerfile | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/wikidata_service/Dockerfile b/wikidata_service/Dockerfile index 8e01f1f..3958188 100644 --- a/wikidata_service/Dockerfile +++ b/wikidata_service/Dockerfile @@ -1,17 +1,22 @@ -# Use the official image as a parent image. -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env +FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base WORKDIR /app +EXPOSE 80 +EXPOSE 443 -# Copy csproj and restore as distinct layers -COPY *.csproj ./ -RUN dotnet restore +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +ARG BUILD_CONFIGURATION=Release +WORKDIR /src +COPY ["WikiDataTest/WikiDataTest.csproj", "WikiDataTest/"] +RUN dotnet restore "./WikiDataTest/./WikiDataTest.csproj" +COPY . . +WORKDIR "/src/WikiDataTest" +RUN dotnet build "./WikiDataTest.csproj" -c %BUILD_CONFIGURATION% -o /app/build -# Copy everything else and build -COPY . ./ -RUN dotnet publish -c Release -o out +FROM build AS publish +ARG BUILD_CONFIGURATION=Release +RUN dotnet publish "./WikiDataTest.csproj" -c %BUILD_CONFIGURATION% -o /app/publish /p:UseAppHost=false -# Build runtime image -FROM mcr.microsoft.com/dotnet/aspnet:6.0 +FROM base AS final WORKDIR /app -COPY --from=build-env /app/out . +COPY --from=publish /app/publish . ENTRYPOINT ["dotnet", "WikiDataTest.dll"] \ No newline at end of file From 9aa364d7e97ea6edd737fdb8e56fd64e9d919970 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Wed, 13 Mar 2024 23:40:42 +0100 Subject: [PATCH 14/59] Changing docker-compose --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 76c4b76..fc80d7b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,7 @@ services: wikidata_service: container_name: wikidata_service-${teamname:-defaultASW} image: ghcr.io/arquisoft/wiq_en3a/wikidata_service:latest - build: ./wikidata_service/WikiDataTest + build: ./wikidata_service profiles: ["dev", "prod"] ports: - "7259:7259" From b3b450bca9faaed74a6a5029a95fddc484c14fc2 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Thu, 14 Mar 2024 10:34:26 +0100 Subject: [PATCH 15/59] Changes on build and release.yml --- .github/workflows/build.yml | 3 +++ .github/workflows/release.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 410b5a8..72fb80c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,6 +18,9 @@ jobs: - run: npm --prefix gatewayservice ci - run: npm --prefix webapp ci + - run: dotnet build ./wikidata_service/WikidataService.csproj + - run: npm --prefix authservice ci + - run: npm --prefix userservice ci - run: npm --prefix gatewayservice test -- --coverage - run: npm --prefix webapp test -- --coverage diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f996d69..0d98d5a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -94,7 +94,7 @@ jobs: deploy: name: Deploy over SSH runs-on: ubuntu-latest - needs: [docker-push-userservice,docker-push-authservice,docker-push-gatewayservice,docker-push-webapp] + needs: [docker-push-userservice,docker-push-authservice,docker-push-gatewayservice,docker-push-webapp, docker-push-wikidata-service] steps: - name: Deploy over SSH uses: fifsky/ssh-action@master From 2f530948a4b72e97eeda5d7818707f983214c730 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Thu, 14 Mar 2024 10:47:28 +0100 Subject: [PATCH 16/59] Build.yml improvement --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 72fb80c..5b09f38 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,6 +15,9 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 20 + - uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0' - run: npm --prefix gatewayservice ci - run: npm --prefix webapp ci From 85e79e5680b458ac608f21e64b823b5c3e81bdc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Tru=C3=A9bano?= <124297960+UO289930@users.noreply.github.com> Date: Thu, 14 Mar 2024 11:20:53 +0100 Subject: [PATCH 17/59] Update wikidata projext path in build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5b09f38..9887a95 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: - run: npm --prefix gatewayservice ci - run: npm --prefix webapp ci - - run: dotnet build ./wikidata_service/WikidataService.csproj + - run: dotnet build ./wikidata_service/WikiDataTest/WikiDataTest.csproj - run: npm --prefix authservice ci - run: npm --prefix userservice ci From d8110dbf6ac02da50c09984de07850857292654b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Tru=C3=A9bano=20Robles?= Date: Thu, 14 Mar 2024 13:28:49 +0100 Subject: [PATCH 18/59] Deployment fixes --- gatewayservice/gateway-service.js | 10 ++++++++++ webapp/src/stores/playing-store.ts | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 88b84c8..c09eb16 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -8,6 +8,7 @@ const port = 8000; const authServiceUrl = process.env.AUTH_SERVICE_URL || 'http://localhost:8002'; const userServiceUrl = process.env.USER_SERVICE_URL || 'http://localhost:8001'; +const wikidataServiceUrl = process.env.WIKIDATA_SERVICE_URL || 'http://localhost:7259'; app.use(cors()); app.use(express.json()); @@ -41,6 +42,15 @@ app.post('/adduser', async (req, res) => { } }); +app.get('/WikiData/getCapitalQuestions', async (_req, res) => { + try { + const userResponse = await axios.get(wikidataServiceUrl+'/WikiData/getCapitalQuestions', req.body); + res.json(userResponse.data); + } catch (error) { + res.status(error.response.status).json({ error: error.response.data.error }); + } +}); + // Start the gateway service const server = app.listen(port, () => { console.log(`Gateway Service listening at http://localhost:${port}`); diff --git a/webapp/src/stores/playing-store.ts b/webapp/src/stores/playing-store.ts index b748e55..e0032b3 100644 --- a/webapp/src/stores/playing-store.ts +++ b/webapp/src/stores/playing-store.ts @@ -57,7 +57,7 @@ interface GameQuestions{ } const retrieveQuestions = () => { - return fetch('https://localhost:7259/WikiData/GetCapitalsQuestions') + return fetch('/WikiData/GetCapitalsQuestions') .then((response) => response.json()) .catch((error) => { console.error('There was a problem with the questions:', error); From d9342cb3a9db7358a6e695e37430ea30d9b6e28e Mon Sep 17 00:00:00 2001 From: sergiollende Date: Thu, 14 Mar 2024 13:29:07 +0100 Subject: [PATCH 19/59] Improvement docker files and .yml --- .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 45 ++++++++++++++++------------------- docker-compose.yml | 2 ++ 3 files changed, 24 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5b09f38..f0b7ef3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,9 +21,9 @@ jobs: - run: npm --prefix gatewayservice ci - run: npm --prefix webapp ci - - run: dotnet build ./wikidata_service/WikidataService.csproj - run: npm --prefix authservice ci - run: npm --prefix userservice ci + - run: dotnet build ./wikidata_service/WikidataService.csproj - run: npm --prefix gatewayservice test -- --coverage - run: npm --prefix webapp test -- --coverage diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0d98d5a..b2f7170 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,25 +5,6 @@ on: types: [published] jobs: - docker-push-wikidata-service: - name: Push wikidata Docker Image to GitHub Packages - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - uses: actions/checkout@v4 - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@v5 - env: - API_URI: http://${{ secrets.DEPLOY_HOST }}:7259 - with: - name: arquisoft/wiq_en3a/wikidata_service - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - registry: ghcr.io - workdir: wikidata_service - buildargs: API_URI docker-push-webapp: name: Push webapp Docker Image to GitHub Packages runs-on: ubuntu-latest @@ -43,8 +24,8 @@ jobs: registry: ghcr.io workdir: webapp buildargs: API_URI - docker-push-authservice: - name: Push auth service Docker Image to GitHub Packages + docker-push-wikidata-service: + name: Push wikidata Docker Image to GitHub Packages runs-on: ubuntu-latest permissions: contents: read @@ -54,11 +35,27 @@ jobs: - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@v5 with: - name: arquisoft/wiq_en3a/authservice + name: arquisoft/wiq_en3a/wikidata_service username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io - workdir: users/authservice + workdir: wikidata_service + docker-push-authservice: + name: Push auth service Docker Image to GitHub Packages + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@v5 + with: + name: arquisoft/wiq_en3a/authservice + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + registry: ghcr.io + workdir: users/authservice docker-push-userservice: name: Push user service Docker Image to GitHub Packages runs-on: ubuntu-latest @@ -106,4 +103,4 @@ jobs: wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/master/docker-compose.yml -O docker-compose.yml wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/master/.env docker compose down - docker compose --profile prod up -d + docker compose --profile prod up -d --pull always diff --git a/docker-compose.yml b/docker-compose.yml index fc80d7b..b323060 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -66,6 +66,8 @@ services: environment: AUTH_SERVICE_URL: http://authservice:8002 USER_SERVICE_URL: http://userservice:8001 + WIKIDATA_SERVICE_URL: http://wikidata_service:7259 + webapp: container_name: webapp-${teamname:-defaultASW} From cdc0020b680be641e28e4b5e0dc16d4de2b607d4 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Thu, 14 Mar 2024 13:57:37 +0100 Subject: [PATCH 20/59] Fetching correctly with API adn docker --- gatewayservice/gateway-service.js | 4 ++-- webapp/src/services/auth-service.ts | 2 +- webapp/src/stores/playing-store.ts | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index c09eb16..43d570f 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -42,9 +42,9 @@ app.post('/adduser', async (req, res) => { } }); -app.get('/WikiData/getCapitalQuestions', async (_req, res) => { +app.get('/WikiData/GetCapitalQuestions', async (_req, res) => { try { - const userResponse = await axios.get(wikidataServiceUrl+'/WikiData/getCapitalQuestions', req.body); + const userResponse = await axios.get(wikidataServiceUrl+'/WikiData/GetCapitalQuestions', req.body); res.json(userResponse.data); } catch (error) { res.status(error.response.status).json({ error: error.response.data.error }); diff --git a/webapp/src/services/auth-service.ts b/webapp/src/services/auth-service.ts index f09a188..7f9d5a5 100644 --- a/webapp/src/services/auth-service.ts +++ b/webapp/src/services/auth-service.ts @@ -3,7 +3,7 @@ import { jwtDecode } from "jwt-decode"; import { useUserStore } from '../stores/user-store'; import { useStats } from '../stores/playing-store'; -const API_URL = 'http://localhost:8002'; +const API_URL = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000'; export type JwtPayload = { username: string; diff --git a/webapp/src/stores/playing-store.ts b/webapp/src/stores/playing-store.ts index e0032b3..4a9abb7 100644 --- a/webapp/src/stores/playing-store.ts +++ b/webapp/src/stores/playing-store.ts @@ -56,8 +56,10 @@ interface GameQuestions{ startGame: () => void } +const API_URL = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000'; + const retrieveQuestions = () => { - return fetch('/WikiData/GetCapitalsQuestions') + return fetch(`${API_URL}/WikiData/GetCapitalsQuestions`) .then((response) => response.json()) .catch((error) => { console.error('There was a problem with the questions:', error); From 33a8d59ef2f3d6fbc7fc91605f95fee8eb573ab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Tru=C3=A9bano?= Date: Thu, 14 Mar 2024 15:17:35 +0100 Subject: [PATCH 21/59] Fixing gateway routing for deployment --- gatewayservice/gateway-service.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 43d570f..2664cc8 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -25,7 +25,7 @@ app.get('/health', (_req, res) => { app.post('/login', async (req, res) => { try { // Forward the login request to the authentication service - const authResponse = await axios.post(authServiceUrl+'/login', req.body); + const authResponse = await axios.post(authServiceUrl+'/auth/login', req.body); res.json(authResponse.data); } catch (error) { res.status(error.response.status).json({ error: error.response.data.error }); @@ -35,7 +35,7 @@ app.post('/login', async (req, res) => { app.post('/adduser', async (req, res) => { try { // Forward the add user request to the user service - const userResponse = await axios.post(userServiceUrl+'/adduser', req.body); + const userResponse = await axios.post(userServiceUrl+'/user/adduser', req.body); res.json(userResponse.data); } catch (error) { res.status(error.response.status).json({ error: error.response.data.error }); From 611e8f3367b8a4e30b80da6f16b890a3609966ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Tru=C3=A9bano?= Date: Thu, 14 Mar 2024 16:07:36 +0100 Subject: [PATCH 22/59] Fixing routing issues --- gatewayservice/gateway-service.js | 19 +++++++++++++++---- webapp/src/services/auth-service.ts | 6 +++--- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 2664cc8..e74b13c 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -25,7 +25,7 @@ app.get('/health', (_req, res) => { app.post('/login', async (req, res) => { try { // Forward the login request to the authentication service - const authResponse = await axios.post(authServiceUrl+'/auth/login', req.body); + const authResponse = await axios.post(authServiceUrl+'/login', req.body); res.json(authResponse.data); } catch (error) { res.status(error.response.status).json({ error: error.response.data.error }); @@ -35,22 +35,33 @@ app.post('/login', async (req, res) => { app.post('/adduser', async (req, res) => { try { // Forward the add user request to the user service - const userResponse = await axios.post(userServiceUrl+'/user/adduser', req.body); + const userResponse = await axios.post(userServiceUrl+'/adduser', req.body); res.json(userResponse.data); } catch (error) { res.status(error.response.status).json({ error: error.response.data.error }); } }); -app.get('/WikiData/GetCapitalQuestions', async (_req, res) => { +app.post('/edituser', async (req, res) => { try { - const userResponse = await axios.get(wikidataServiceUrl+'/WikiData/GetCapitalQuestions', req.body); + // Forward the edit user request to the user service + const userResponse = await axios.post(userServiceUrl+'/edituser', req.body); res.json(userResponse.data); } catch (error) { res.status(error.response.status).json({ error: error.response.data.error }); } }); +app.get('/WikiData/GetCapitalsQuestions', async (_req, res) => { + try { + // Forward the edit user request to the user service + const wikiResponse = await axios.get(wikidataServiceUrl+'/WikiData/GetCapitalsQuestions', req.body); + res.json(wikiResponse.data); + } catch (error) { + res.status(error.response.status).json({ error: error.response.data.error }); + } +}); + // Start the gateway service const server = app.listen(port, () => { console.log(`Gateway Service listening at http://localhost:${port}`); diff --git a/webapp/src/services/auth-service.ts b/webapp/src/services/auth-service.ts index 7f9d5a5..142af5f 100644 --- a/webapp/src/services/auth-service.ts +++ b/webapp/src/services/auth-service.ts @@ -22,7 +22,7 @@ export const loginWithToken = () => { export const login = async (username: string, password: string)=> { try { - const response = await axios.post(`${API_URL}/auth/login`, { username, password }); + const response = await axios.post(`${API_URL}/login`, { username, password }); //const response = await axios.post("http://localhost:8002/auth/login", { username, password }); const token = response.data.token; console.log('token:', token); @@ -37,7 +37,7 @@ export const login = async (username: string, password: string)=> { export const register = async (email:string, username: string, password: string) => { try { - const response = await axios.post(`${API_URL}/user/adduser`, { username, password, email }); + const response = await axios.post(`${API_URL}/adduser`, { username, password, email }); console.log('response:', response); const name = response.data; return name; @@ -50,7 +50,7 @@ export const register = async (email:string, username: string, password: string) export const updateStats = async (questions_answered: number, correctly_answered_questions: number) => { const username = getUsername(); try { - await axios.post(`${API_URL}/user/editUser`, { username, questions_answered, correctly_answered_questions }); + await axios.post(`${API_URL}/edituser`, { username, questions_answered, correctly_answered_questions }); updateStatsState(questions_answered, correctly_answered_questions); return true; } catch (error) { From b191adbaf7b2137d496f2183de7a11a1cb59e2d4 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Thu, 14 Mar 2024 17:47:58 +0100 Subject: [PATCH 23/59] Another change on routes --- gatewayservice/gateway-service.js | 6 +++--- users/userservice/user-service.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index e74b13c..2a4bca8 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -25,7 +25,7 @@ app.get('/health', (_req, res) => { app.post('/login', async (req, res) => { try { // Forward the login request to the authentication service - const authResponse = await axios.post(authServiceUrl+'/login', req.body); + const authResponse = await axios.post(authServiceUrl + '/auth/login', req.body); res.json(authResponse.data); } catch (error) { res.status(error.response.status).json({ error: error.response.data.error }); @@ -35,7 +35,7 @@ app.post('/login', async (req, res) => { app.post('/adduser', async (req, res) => { try { // Forward the add user request to the user service - const userResponse = await axios.post(userServiceUrl+'/adduser', req.body); + const userResponse = await axios.post(userServiceUrl + '/user/adduser', req.body); res.json(userResponse.data); } catch (error) { res.status(error.response.status).json({ error: error.response.data.error }); @@ -45,7 +45,7 @@ app.post('/adduser', async (req, res) => { app.post('/edituser', async (req, res) => { try { // Forward the edit user request to the user service - const userResponse = await axios.post(userServiceUrl+'/edituser', req.body); + const userResponse = await axios.post(userServiceUrl + '/user/edituser', req.body); res.json(userResponse.data); } catch (error) { res.status(error.response.status).json({ error: error.response.data.error }); diff --git a/users/userservice/user-service.js b/users/userservice/user-service.js index ca8fdc1..388cce4 100644 --- a/users/userservice/user-service.js +++ b/users/userservice/user-service.js @@ -9,7 +9,7 @@ const User = require('./user-model') // GET route to retrieve an specific user by username // 'http://localhost:8002/getOneUser?username=nombre_de_usuario' -router.get('/getUser', async (req, res) => { +router.get('/getuser', async (req, res) => { try { // access to the database @@ -76,7 +76,7 @@ router.post('/adduser', async (req, res) => { // edit a user to update the total and correct question answered -router.post('/editUser', async (req, res) => { +router.post('/edituser', async (req, res) => { try { // --- find the user to be updated From 19bc338339efe7eb66b29e536518586749b37fba Mon Sep 17 00:00:00 2001 From: sergiollende Date: Thu, 14 Mar 2024 18:11:24 +0100 Subject: [PATCH 24/59] UserService change --- .github/workflows/release.yml | 20 ++------------------ docker-compose.yml | 22 +++------------------- gatewayservice/gateway-service.js | 5 ++--- users/index.js | 2 -- 4 files changed, 7 insertions(+), 42 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b2f7170..9ca3d8b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,22 +40,6 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io workdir: wikidata_service - docker-push-authservice: - name: Push auth service Docker Image to GitHub Packages - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - uses: actions/checkout@v4 - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@v5 - with: - name: arquisoft/wiq_en3a/authservice - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - registry: ghcr.io - workdir: users/authservice docker-push-userservice: name: Push user service Docker Image to GitHub Packages runs-on: ubuntu-latest @@ -71,7 +55,7 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io - workdir: users/userservice + workdir: users docker-push-gatewayservice: name: Push gateway service Docker Image to GitHub Packages runs-on: ubuntu-latest @@ -91,7 +75,7 @@ jobs: deploy: name: Deploy over SSH runs-on: ubuntu-latest - needs: [docker-push-userservice,docker-push-authservice,docker-push-gatewayservice,docker-push-webapp, docker-push-wikidata-service] + needs: [docker-push-userservice,docker-push-gatewayservice,docker-push-webapp, docker-push-wikidata-service] steps: - name: Deploy over SSH uses: fifsky/ssh-action@master diff --git a/docker-compose.yml b/docker-compose.yml index b323060..7fa53d8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,29 +21,15 @@ services: networks: - mynetwork - authservice: - container_name: authservice-${teamname:-defaultASW} - image: ghcr.io/arquisoft/wiq_en3a/authservice:latest - profiles: ["dev", "prod"] - build: ./users/authservice - depends_on: - - mongodb - ports: - - "8002:8002" - networks: - - mynetwork - environment: - MONGODB_URI: mongodb://mongodb:27017/userdb - userservice: container_name: userservice-${teamname:-defaultASW} image: ghcr.io/arquisoft/wiq_en3a/userservice:latest profiles: ["dev", "prod"] - build: ./users/userservice + build: ./users depends_on: - mongodb ports: - - "8001:8001" + - "8002:8002" networks: - mynetwork environment: @@ -57,15 +43,13 @@ services: depends_on: - mongodb - userservice - - authservice - wikidata_service ports: - "8000:8000" networks: - mynetwork environment: - AUTH_SERVICE_URL: http://authservice:8002 - USER_SERVICE_URL: http://userservice:8001 + USER_SERVICE_URL: http://userservice:8002 WIKIDATA_SERVICE_URL: http://wikidata_service:7259 diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 2a4bca8..5b01e3e 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -6,8 +6,7 @@ const promBundle = require('express-prom-bundle'); const app = express(); const port = 8000; -const authServiceUrl = process.env.AUTH_SERVICE_URL || 'http://localhost:8002'; -const userServiceUrl = process.env.USER_SERVICE_URL || 'http://localhost:8001'; +const userServiceUrl = process.env.USER_SERVICE_URL || 'http://localhost:8002'; const wikidataServiceUrl = process.env.WIKIDATA_SERVICE_URL || 'http://localhost:7259'; app.use(cors()); @@ -25,7 +24,7 @@ app.get('/health', (_req, res) => { app.post('/login', async (req, res) => { try { // Forward the login request to the authentication service - const authResponse = await axios.post(authServiceUrl + '/auth/login', req.body); + const authResponse = await axios.post(userServiceUrl + '/auth/login', req.body); res.json(authResponse.data); } catch (error) { res.status(error.response.status).json({ error: error.response.data.error }); diff --git a/users/index.js b/users/index.js index cc30a54..32776f4 100644 --- a/users/index.js +++ b/users/index.js @@ -32,8 +32,6 @@ app.use('/auth', authRoutes); app.use('/user', userRoutes); - - // Start the server const server = app.listen(port, () => { console.log(`Auth Service listening at http://localhost:${port}`); From 06529f2943f524ac7c3a3b120f77559e2fb71f68 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Thu, 14 Mar 2024 18:39:46 +0100 Subject: [PATCH 25/59] Change on release.yml --- .github/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9ca3d8b..3466d20 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,6 +40,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io workdir: wikidata_service + buildargs: API_URI docker-push-userservice: name: Push user service Docker Image to GitHub Packages runs-on: ubuntu-latest @@ -56,6 +57,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io workdir: users + buildargs: API_URI docker-push-gatewayservice: name: Push gateway service Docker Image to GitHub Packages runs-on: ubuntu-latest @@ -72,6 +74,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io workdir: gatewayservice + buildargs: API_URI deploy: name: Deploy over SSH runs-on: ubuntu-latest From aa39078341cd6f5d10662573ec19797ba074212c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Tru=C3=A9bano?= Date: Thu, 14 Mar 2024 20:18:46 +0100 Subject: [PATCH 26/59] Fixing errors --- gatewayservice/gateway-service.js | 10 +++++----- .../WikiDataTest/Properties/launchSettings.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 5b01e3e..241eec9 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -27,7 +27,7 @@ app.post('/login', async (req, res) => { const authResponse = await axios.post(userServiceUrl + '/auth/login', req.body); res.json(authResponse.data); } catch (error) { - res.status(error.response.status).json({ error: error.response.data.error }); + console.error(error); } }); @@ -37,7 +37,7 @@ app.post('/adduser', async (req, res) => { const userResponse = await axios.post(userServiceUrl + '/user/adduser', req.body); res.json(userResponse.data); } catch (error) { - res.status(error.response.status).json({ error: error.response.data.error }); + console.error(error); } }); @@ -47,17 +47,17 @@ app.post('/edituser', async (req, res) => { const userResponse = await axios.post(userServiceUrl + '/user/edituser', req.body); res.json(userResponse.data); } catch (error) { - res.status(error.response.status).json({ error: error.response.data.error }); + console.error(error); } }); app.get('/WikiData/GetCapitalsQuestions', async (_req, res) => { try { // Forward the edit user request to the user service - const wikiResponse = await axios.get(wikidataServiceUrl+'/WikiData/GetCapitalsQuestions', req.body); + const wikiResponse = await axios.get(wikidataServiceUrl+'/WikiData/GetCapitalsQuestions'); res.json(wikiResponse.data); } catch (error) { - res.status(error.response.status).json({ error: error.response.data.error }); + console.error(error); } }); diff --git a/wikidata_service/WikiDataTest/Properties/launchSettings.json b/wikidata_service/WikiDataTest/Properties/launchSettings.json index ecc521d..730a8b3 100644 --- a/wikidata_service/WikiDataTest/Properties/launchSettings.json +++ b/wikidata_service/WikiDataTest/Properties/launchSettings.json @@ -8,7 +8,7 @@ "ASPNETCORE_ENVIRONMENT": "Development" }, "dotnetRunMessages": true, - "applicationUrl": "https://localhost:7259;http://localhost:5276" + "applicationUrl": "http://localhost:7259;http://localhost:5276" }, "IIS Express": { "commandName": "IISExpress", From f419244ed8f7d3e9a2ea381cafccefc42aa2c1b8 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Wed, 20 Mar 2024 15:23:15 +0100 Subject: [PATCH 27/59] Changes on release.yml --- .github/workflows/release.yml | 3 --- gatewayservice/gateway-service.js | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3466d20..9ca3d8b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,6 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io workdir: wikidata_service - buildargs: API_URI docker-push-userservice: name: Push user service Docker Image to GitHub Packages runs-on: ubuntu-latest @@ -57,7 +56,6 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io workdir: users - buildargs: API_URI docker-push-gatewayservice: name: Push gateway service Docker Image to GitHub Packages runs-on: ubuntu-latest @@ -74,7 +72,6 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io workdir: gatewayservice - buildargs: API_URI deploy: name: Deploy over SSH runs-on: ubuntu-latest diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 5b01e3e..5867ce7 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -54,7 +54,7 @@ app.post('/edituser', async (req, res) => { app.get('/WikiData/GetCapitalsQuestions', async (_req, res) => { try { // Forward the edit user request to the user service - const wikiResponse = await axios.get(wikidataServiceUrl+'/WikiData/GetCapitalsQuestions', req.body); + const wikiResponse = await axios.get(wikidataServiceUrl+'/WikiData/GetCapitalsQuestions'); res.json(wikiResponse.data); } catch (error) { res.status(error.response.status).json({ error: error.response.data.error }); From b2f3e49eb917b8b2b99d91ebca612d66011de1e8 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Wed, 20 Mar 2024 15:34:37 +0100 Subject: [PATCH 28/59] Try other release --- .github/workflows/release.yml | 10 +++++++--- docker-compose.yml | 7 ++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9ca3d8b..41da384 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,22 +8,26 @@ jobs: docker-push-webapp: name: Push webapp Docker Image to GitHub Packages runs-on: ubuntu-latest + permissions: contents: read packages: write steps: - uses: actions/checkout@v4 + - name: Create .env file + run: echo "REACT_APP_API_ENDPOINT=http://${{ secrets.DEPLOY_HOST }}:8080" > webapp/.env - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@v5 env: - API_URI: http://${{ secrets.DEPLOY_HOST }}:8000 + REACT_APP_API_ENDPOINT: http://${{ secrets.DEPLOY_HOST }}:8000 with: name: arquisoft/wiq_en3a/webapp username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io workdir: webapp - buildargs: API_URI + buildargs: | + REACT_APP_API_ENDPOINT docker-push-wikidata-service: name: Push wikidata Docker Image to GitHub Packages runs-on: ubuntu-latest @@ -86,5 +90,5 @@ jobs: command: | wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/master/docker-compose.yml -O docker-compose.yml wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/master/.env - docker compose down + docker compose --profile prod down docker compose --profile prod up -d --pull always diff --git a/docker-compose.yml b/docker-compose.yml index 7fa53d8..35eefd2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -57,7 +57,12 @@ services: container_name: webapp-${teamname:-defaultASW} image: ghcr.io/arquisoft/wiq_en3a/webapp:latest profiles: ["dev", "prod"] - build: ./webapp + build: + args: + REACT_APP_API_ENDPOINT: ${API_URI} + context: ./webapp + environment: + - REACT_APP_API_ENDPOINT=${API_URI} depends_on: - gatewayservice ports: From 6157f00aea4fa6c8688c10fc93e036a5c4055d74 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Wed, 20 Mar 2024 15:58:05 +0100 Subject: [PATCH 29/59] release try --- .github/workflows/release.yml | 11 ++++------- docker-compose.yml | 7 +------ gatewayservice/gateway-service.js | 6 +++--- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 41da384..f221668 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,21 +14,18 @@ jobs: packages: write steps: - uses: actions/checkout@v4 - - name: Create .env file - run: echo "REACT_APP_API_ENDPOINT=http://${{ secrets.DEPLOY_HOST }}:8080" > webapp/.env - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@v5 env: - REACT_APP_API_ENDPOINT: http://${{ secrets.DEPLOY_HOST }}:8000 + API_URI: http://${{ secrets.DEPLOY_HOST }}:8000 with: name: arquisoft/wiq_en3a/webapp username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io workdir: webapp - buildargs: | - REACT_APP_API_ENDPOINT - docker-push-wikidata-service: + buildargs: API_URI + docker-push-wikidataservice: name: Push wikidata Docker Image to GitHub Packages runs-on: ubuntu-latest permissions: @@ -79,7 +76,7 @@ jobs: deploy: name: Deploy over SSH runs-on: ubuntu-latest - needs: [docker-push-userservice,docker-push-gatewayservice,docker-push-webapp, docker-push-wikidata-service] + needs: [docker-push-userservice,docker-push-gatewayservice,docker-push-webapp, docker-push-wikidataservice] steps: - name: Deploy over SSH uses: fifsky/ssh-action@master diff --git a/docker-compose.yml b/docker-compose.yml index 35eefd2..7fa53d8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -57,12 +57,7 @@ services: container_name: webapp-${teamname:-defaultASW} image: ghcr.io/arquisoft/wiq_en3a/webapp:latest profiles: ["dev", "prod"] - build: - args: - REACT_APP_API_ENDPOINT: ${API_URI} - context: ./webapp - environment: - - REACT_APP_API_ENDPOINT=${API_URI} + build: ./webapp depends_on: - gatewayservice ports: diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 241eec9..bd4fea3 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -21,7 +21,7 @@ app.get('/health', (_req, res) => { res.json({ status: 'OK' }); }); -app.post('/login', async (req, res) => { +app.post(userServiceUrl + '/login', async (req, res) => { try { // Forward the login request to the authentication service const authResponse = await axios.post(userServiceUrl + '/auth/login', req.body); @@ -31,7 +31,7 @@ app.post('/login', async (req, res) => { } }); -app.post('/adduser', async (req, res) => { +app.post(userServiceUrl + '/adduser', async (req, res) => { try { // Forward the add user request to the user service const userResponse = await axios.post(userServiceUrl + '/user/adduser', req.body); @@ -51,7 +51,7 @@ app.post('/edituser', async (req, res) => { } }); -app.get('/WikiData/GetCapitalsQuestions', async (_req, res) => { +app.get(wikidataServiceUrl + '/WikiData/GetCapitalsQuestions', async (_req, res) => { try { // Forward the edit user request to the user service const wikiResponse = await axios.get(wikidataServiceUrl+'/WikiData/GetCapitalsQuestions'); From b45ee7bab7ec8bc95e2846abad262fb1299b1713 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Wed, 20 Mar 2024 16:11:09 +0100 Subject: [PATCH 30/59] Other try --- .github/workflows/release.yml | 15 ++++++++++----- docker-compose.yml | 11 +++++++---- gatewayservice/gateway-service.js | 6 +++--- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f221668..22c0bf2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,24 +8,29 @@ jobs: docker-push-webapp: name: Push webapp Docker Image to GitHub Packages runs-on: ubuntu-latest - permissions: contents: read packages: write steps: - uses: actions/checkout@v4 + + - name: Create .env file + run: echo "REACT_APP_API_ENDPOINT=http://${{ secrets.DEPLOY_HOST }}:8000" > webapp/.env + - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@v5 env: - API_URI: http://${{ secrets.DEPLOY_HOST }}:8000 + REACT_APP_API_ENDPOINT: http://${{ secrets.DEPLOY_HOST }}:8000 + teamname: wiq_en3a with: name: arquisoft/wiq_en3a/webapp username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io workdir: webapp - buildargs: API_URI - docker-push-wikidataservice: + buildargs: | + REACT_APP_API_ENDPOINT + docker-push-wikidata-service: name: Push wikidata Docker Image to GitHub Packages runs-on: ubuntu-latest permissions: @@ -76,7 +81,7 @@ jobs: deploy: name: Deploy over SSH runs-on: ubuntu-latest - needs: [docker-push-userservice,docker-push-gatewayservice,docker-push-webapp, docker-push-wikidataservice] + needs: [docker-push-userservice,docker-push-gatewayservice,docker-push-webapp, docker-push-wikidata-service] steps: - name: Deploy over SSH uses: fifsky/ssh-action@master diff --git a/docker-compose.yml b/docker-compose.yml index 7fa53d8..d09bc15 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -57,11 +57,14 @@ services: container_name: webapp-${teamname:-defaultASW} image: ghcr.io/arquisoft/wiq_en3a/webapp:latest profiles: ["dev", "prod"] - build: ./webapp - depends_on: - - gatewayservice + build: + args: + REACT_APP_API_ENDPOINT: ${API_URI} + context: ./webapp + environment: + - REACT_APP_API_ENDPOINT=${API_URI} ports: - - "3000:3000" + - "3000:3000" prometheus: image: prom/prometheus diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index bd4fea3..241eec9 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -21,7 +21,7 @@ app.get('/health', (_req, res) => { res.json({ status: 'OK' }); }); -app.post(userServiceUrl + '/login', async (req, res) => { +app.post('/login', async (req, res) => { try { // Forward the login request to the authentication service const authResponse = await axios.post(userServiceUrl + '/auth/login', req.body); @@ -31,7 +31,7 @@ app.post(userServiceUrl + '/login', async (req, res) => { } }); -app.post(userServiceUrl + '/adduser', async (req, res) => { +app.post('/adduser', async (req, res) => { try { // Forward the add user request to the user service const userResponse = await axios.post(userServiceUrl + '/user/adduser', req.body); @@ -51,7 +51,7 @@ app.post('/edituser', async (req, res) => { } }); -app.get(wikidataServiceUrl + '/WikiData/GetCapitalsQuestions', async (_req, res) => { +app.get('/WikiData/GetCapitalsQuestions', async (_req, res) => { try { // Forward the edit user request to the user service const wikiResponse = await axios.get(wikidataServiceUrl+'/WikiData/GetCapitalsQuestions'); From 70dd67281d6db1c6334857be693e361cb1e1d515 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Wed, 20 Mar 2024 16:37:05 +0100 Subject: [PATCH 31/59] Assign API_URI --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 22c0bf2..2ae75ed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -85,6 +85,8 @@ jobs: steps: - name: Deploy over SSH uses: fifsky/ssh-action@master + env: + API_URI: ${{ secrets.DEPLOY_HOST }} with: host: ${{ secrets.DEPLOY_HOST }} user: ${{ secrets.DEPLOY_USER }} From 27d51a5b54f9c731f6a055b21ae8652b6e531553 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Wed, 20 Mar 2024 16:51:40 +0100 Subject: [PATCH 32/59] Try without localhost --- .github/workflows/release.yml | 4 ++-- webapp/src/services/auth-service.ts | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ae75ed..3dfbdfb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,12 +15,12 @@ jobs: - uses: actions/checkout@v4 - name: Create .env file - run: echo "REACT_APP_API_ENDPOINT=http://${{ secrets.DEPLOY_HOST }}:8000" > webapp/.env + run: echo "REACT_APP_API_ENDPOINT=http://${{ secrets.DEPLOY_HOST }}:8080" > webapp/.env - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@v5 env: - REACT_APP_API_ENDPOINT: http://${{ secrets.DEPLOY_HOST }}:8000 + REACT_APP_API_ENDPOINT: http://${{ secrets.DEPLOY_HOST }}:8080 teamname: wiq_en3a with: name: arquisoft/wiq_en3a/webapp diff --git a/webapp/src/services/auth-service.ts b/webapp/src/services/auth-service.ts index 142af5f..191ecf8 100644 --- a/webapp/src/services/auth-service.ts +++ b/webapp/src/services/auth-service.ts @@ -3,7 +3,8 @@ import { jwtDecode } from "jwt-decode"; import { useUserStore } from '../stores/user-store'; import { useStats } from '../stores/playing-store'; -const API_URL = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000'; +// const API_URL = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000'; +const API_URL = process.env.REACT_APP_API_ENDPOINT; export type JwtPayload = { username: string; @@ -22,7 +23,7 @@ export const loginWithToken = () => { export const login = async (username: string, password: string)=> { try { - const response = await axios.post(`${API_URL}/login`, { username, password }); + const response = await axios.post(API_URL + "/login", { username, password }); //const response = await axios.post("http://localhost:8002/auth/login", { username, password }); const token = response.data.token; console.log('token:', token); From 50db00e451f2f56ba3f8eeeaf12998e23e666de6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Tru=C3=A9bano?= Date: Wed, 20 Mar 2024 18:48:18 +0100 Subject: [PATCH 33/59] Checking front end API url --- webapp/src/stores/playing-store.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/webapp/src/stores/playing-store.ts b/webapp/src/stores/playing-store.ts index 4a9abb7..a628d18 100644 --- a/webapp/src/stores/playing-store.ts +++ b/webapp/src/stores/playing-store.ts @@ -59,6 +59,7 @@ interface GameQuestions{ const API_URL = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000'; const retrieveQuestions = () => { + console.log(`${API_URL}`); return fetch(`${API_URL}/WikiData/GetCapitalsQuestions`) .then((response) => response.json()) .catch((error) => { From 950f6d6dd949aac1538bd8088b9eecc4a3fb390b Mon Sep 17 00:00:00 2001 From: sergiollende Date: Wed, 20 Mar 2024 22:34:11 +0100 Subject: [PATCH 34/59] More changes to try --- webapp/src/services/auth-service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webapp/src/services/auth-service.ts b/webapp/src/services/auth-service.ts index 191ecf8..0e32cc4 100644 --- a/webapp/src/services/auth-service.ts +++ b/webapp/src/services/auth-service.ts @@ -5,6 +5,8 @@ import { useStats } from '../stores/playing-store'; // const API_URL = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000'; const API_URL = process.env.REACT_APP_API_ENDPOINT; +const userServiceUrl = process.env.USER_SERVICE_URL; + export type JwtPayload = { username: string; @@ -38,7 +40,7 @@ export const login = async (username: string, password: string)=> { export const register = async (email:string, username: string, password: string) => { try { - const response = await axios.post(`${API_URL}/adduser`, { username, password, email }); + const response = await axios.post(userServiceUrl + "/adduser", { username, password, email }); console.log('response:', response); const name = response.data; return name; From 6a4ed8834e48d067d8a9a57460ff245151370dda Mon Sep 17 00:00:00 2001 From: sergiollende Date: Wed, 20 Mar 2024 22:34:25 +0100 Subject: [PATCH 35/59] More changes --- .github/workflows/release.yml | 16 ++++------------ docker-compose.yml | 1 - gatewayservice/Dockerfile | 2 ++ gatewayservice/gateway-service.js | 6 +++--- users/Dockerfile | 3 +++ users/userservice/Dockerfile | 1 + webapp/src/services/auth-service.ts | 4 +--- wikidata_service/Dockerfile | 4 +++- 8 files changed, 17 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3dfbdfb..2b1a901 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,12 +15,12 @@ jobs: - uses: actions/checkout@v4 - name: Create .env file - run: echo "REACT_APP_API_ENDPOINT=http://${{ secrets.DEPLOY_HOST }}:8080" > webapp/.env + run: echo "REACT_APP_API_ENDPOINT=http://${{ secrets.DEPLOY_HOST }}:8000" > webapp/.env - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@v5 env: - REACT_APP_API_ENDPOINT: http://${{ secrets.DEPLOY_HOST }}:8080 + REACT_APP_API_ENDPOINT: http://${{ secrets.DEPLOY_HOST }}:8000 teamname: wiq_en3a with: name: arquisoft/wiq_en3a/webapp @@ -33,9 +33,6 @@ jobs: docker-push-wikidata-service: name: Push wikidata Docker Image to GitHub Packages runs-on: ubuntu-latest - permissions: - contents: read - packages: write steps: - uses: actions/checkout@v4 - name: Publish to Registry @@ -49,9 +46,6 @@ jobs: docker-push-userservice: name: Push user service Docker Image to GitHub Packages runs-on: ubuntu-latest - permissions: - contents: read - packages: write steps: - uses: actions/checkout@v4 - name: Publish to Registry @@ -65,9 +59,6 @@ jobs: docker-push-gatewayservice: name: Push gateway service Docker Image to GitHub Packages runs-on: ubuntu-latest - permissions: - contents: read - packages: write steps: - uses: actions/checkout@v4 - name: Publish to Registry @@ -93,6 +84,7 @@ jobs: key: ${{ secrets.DEPLOY_KEY }} command: | wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/master/docker-compose.yml -O docker-compose.yml - wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/master/.env + wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/master/.envç + echo "API_URI=http://${{ secrets.DEPLOY_HOST }}:8000" >> .env docker compose --profile prod down docker compose --profile prod up -d --pull always diff --git a/docker-compose.yml b/docker-compose.yml index d09bc15..428cdbd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -52,7 +52,6 @@ services: USER_SERVICE_URL: http://userservice:8002 WIKIDATA_SERVICE_URL: http://wikidata_service:7259 - webapp: container_name: webapp-${teamname:-defaultASW} image: ghcr.io/arquisoft/wiq_en3a/webapp:latest diff --git a/gatewayservice/Dockerfile b/gatewayservice/Dockerfile index 6c34043..52d44b2 100644 --- a/gatewayservice/Dockerfile +++ b/gatewayservice/Dockerfile @@ -15,3 +15,5 @@ COPY . . # Define the command to run your app CMD ["node", "gateway-service.js"] + +EXPOSE 8000 diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 241eec9..c92eced 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -24,7 +24,7 @@ app.get('/health', (_req, res) => { app.post('/login', async (req, res) => { try { // Forward the login request to the authentication service - const authResponse = await axios.post(userServiceUrl + '/auth/login', req.body); + const authResponse = await axios.post('/auth/login', req.body); res.json(authResponse.data); } catch (error) { console.error(error); @@ -34,7 +34,7 @@ app.post('/login', async (req, res) => { app.post('/adduser', async (req, res) => { try { // Forward the add user request to the user service - const userResponse = await axios.post(userServiceUrl + '/user/adduser', req.body); + const userResponse = await axios.post('/user/adduser', req.body); res.json(userResponse.data); } catch (error) { console.error(error); @@ -44,7 +44,7 @@ app.post('/adduser', async (req, res) => { app.post('/edituser', async (req, res) => { try { // Forward the edit user request to the user service - const userResponse = await axios.post(userServiceUrl + '/user/edituser', req.body); + const userResponse = await axios.post('/user/edituser', req.body); res.json(userResponse.data); } catch (error) { console.error(error); diff --git a/users/Dockerfile b/users/Dockerfile index 3004db1..a85b2ba 100644 --- a/users/Dockerfile +++ b/users/Dockerfile @@ -18,3 +18,6 @@ EXPOSE 8002 # Define the command to run your app CMD ["node", "index.js"] + +EXPOSE 8002 + diff --git a/users/userservice/Dockerfile b/users/userservice/Dockerfile index f325e8b..57f1f46 100644 --- a/users/userservice/Dockerfile +++ b/users/userservice/Dockerfile @@ -18,3 +18,4 @@ EXPOSE 8001 # Define the command to run your app CMD ["node", "user-service.js"] + diff --git a/webapp/src/services/auth-service.ts b/webapp/src/services/auth-service.ts index 0e32cc4..5889c79 100644 --- a/webapp/src/services/auth-service.ts +++ b/webapp/src/services/auth-service.ts @@ -5,8 +5,6 @@ import { useStats } from '../stores/playing-store'; // const API_URL = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000'; const API_URL = process.env.REACT_APP_API_ENDPOINT; -const userServiceUrl = process.env.USER_SERVICE_URL; - export type JwtPayload = { username: string; @@ -40,7 +38,7 @@ export const login = async (username: string, password: string)=> { export const register = async (email:string, username: string, password: string) => { try { - const response = await axios.post(userServiceUrl + "/adduser", { username, password, email }); + const response = await axios.post(userServiceUrl + "/user/adduser", { username, password, email }); console.log('response:', response); const name = response.data; return name; diff --git a/wikidata_service/Dockerfile b/wikidata_service/Dockerfile index 3958188..c3de0e2 100644 --- a/wikidata_service/Dockerfile +++ b/wikidata_service/Dockerfile @@ -19,4 +19,6 @@ RUN dotnet publish "./WikiDataTest.csproj" -c %BUILD_CONFIGURATION% -o /app/publ FROM base AS final WORKDIR /app COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "WikiDataTest.dll"] \ No newline at end of file +ENTRYPOINT ["dotnet", "WikiDataTest.dll"] + +EXPOSE 7259 From 64c8ca9c60cc2a24b4b8bb526f08120839b1367e Mon Sep 17 00:00:00 2001 From: sergiollende Date: Wed, 20 Mar 2024 22:37:27 +0100 Subject: [PATCH 36/59] Fixed auth-service --- webapp/src/services/auth-service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/services/auth-service.ts b/webapp/src/services/auth-service.ts index 5889c79..a06f4e5 100644 --- a/webapp/src/services/auth-service.ts +++ b/webapp/src/services/auth-service.ts @@ -38,7 +38,7 @@ export const login = async (username: string, password: string)=> { export const register = async (email:string, username: string, password: string) => { try { - const response = await axios.post(userServiceUrl + "/user/adduser", { username, password, email }); + const response = await axios.post(API_URL + "/adduser", { username, password, email }); console.log('response:', response); const name = response.data; return name; From 58d577b058143ad61cff271af4bb471b9e16ee3a Mon Sep 17 00:00:00 2001 From: sergiollende Date: Wed, 20 Mar 2024 22:49:20 +0100 Subject: [PATCH 37/59] docker compose chanfe --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2b1a901..69f9b9a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -86,5 +86,5 @@ jobs: wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/master/docker-compose.yml -O docker-compose.yml wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/master/.envç echo "API_URI=http://${{ secrets.DEPLOY_HOST }}:8000" >> .env - docker compose --profile prod down + docker compose down docker compose --profile prod up -d --pull always From 8466b9c6b22ba8339a4f8e5f7d30098ac9fc6dfd Mon Sep 17 00:00:00 2001 From: sergiollende Date: Thu, 21 Mar 2024 10:08:39 +0100 Subject: [PATCH 38/59] URL Change --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 69f9b9a..eef9e72 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,12 +15,12 @@ jobs: - uses: actions/checkout@v4 - name: Create .env file - run: echo "REACT_APP_API_ENDPOINT=http://${{ secrets.DEPLOY_HOST }}:8000" > webapp/.env + run: echo "REACT_APP_API_ENDPOINT=http://${{ secrets.DEPLOY_HOST }}:8080" > webapp/.env - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@v5 env: - REACT_APP_API_ENDPOINT: http://${{ secrets.DEPLOY_HOST }}:8000 + REACT_APP_API_ENDPOINT: http://${{ secrets.DEPLOY_HOST }}:8080 teamname: wiq_en3a with: name: arquisoft/wiq_en3a/webapp From 76cba65771b4e04eacf9877be2251680f5258e54 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Thu, 21 Mar 2024 10:23:34 +0100 Subject: [PATCH 39/59] More changes --- .github/workflows/release.yml | 6 +++--- webapp/.env | 1 - webapp/Dockerfile | 3 --- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eef9e72..2b1a901 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,12 +15,12 @@ jobs: - uses: actions/checkout@v4 - name: Create .env file - run: echo "REACT_APP_API_ENDPOINT=http://${{ secrets.DEPLOY_HOST }}:8080" > webapp/.env + run: echo "REACT_APP_API_ENDPOINT=http://${{ secrets.DEPLOY_HOST }}:8000" > webapp/.env - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@v5 env: - REACT_APP_API_ENDPOINT: http://${{ secrets.DEPLOY_HOST }}:8080 + REACT_APP_API_ENDPOINT: http://${{ secrets.DEPLOY_HOST }}:8000 teamname: wiq_en3a with: name: arquisoft/wiq_en3a/webapp @@ -86,5 +86,5 @@ jobs: wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/master/docker-compose.yml -O docker-compose.yml wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/master/.envç echo "API_URI=http://${{ secrets.DEPLOY_HOST }}:8000" >> .env - docker compose down + docker compose --profile prod down docker compose --profile prod up -d --pull always diff --git a/webapp/.env b/webapp/.env index c810bde..e69de29 100644 --- a/webapp/.env +++ b/webapp/.env @@ -1 +0,0 @@ -REACT_APP_API_ENDPOINT=http://localhost:8000 \ No newline at end of file diff --git a/webapp/Dockerfile b/webapp/Dockerfile index 3cbad8b..cc71f38 100644 --- a/webapp/Dockerfile +++ b/webapp/Dockerfile @@ -6,9 +6,6 @@ WORKDIR /app #Install the dependencies RUN npm install -ARG API_URI="http://localhost:8000" -ENV REACT_APP_API_ENDPOINT=$API_URI - #Create an optimized version of the webapp RUN npm run build RUN npm install serve From f188f21f061c0a656ee7e639717f4b3e0d51c821 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Thu, 21 Mar 2024 10:44:59 +0100 Subject: [PATCH 40/59] Console.log to test --- gatewayservice/gateway-service.js | 1 + 1 file changed, 1 insertion(+) diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index c92eced..313f27b 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -54,6 +54,7 @@ app.post('/edituser', async (req, res) => { app.get('/WikiData/GetCapitalsQuestions', async (_req, res) => { try { // Forward the edit user request to the user service + console.log(process.env.WIKIDATA_SERVICE_URL); const wikiResponse = await axios.get(wikidataServiceUrl+'/WikiData/GetCapitalsQuestions'); res.json(wikiResponse.data); } catch (error) { From bdc0952eadbd6e5ec5fa2e8cda30f2ae1e885239 Mon Sep 17 00:00:00 2001 From: sergiollende <98907542+sergiollende@users.noreply.github.com> Date: Thu, 21 Mar 2024 13:31:52 +0100 Subject: [PATCH 41/59] Update Dockerfile --- webapp/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webapp/Dockerfile b/webapp/Dockerfile index cc71f38..65cdc23 100644 --- a/webapp/Dockerfile +++ b/webapp/Dockerfile @@ -6,10 +6,13 @@ WORKDIR /app #Install the dependencies RUN npm install +ARG API_URI = "http://localhost:8000" +ENV REACT_APP_API_ENDPOINT=$API_URI + #Create an optimized version of the webapp RUN npm run build RUN npm install serve #Execute npm run prod to run the server CMD [ "npm", "run", "prod" ] -#CMD ["npm", "start"] \ No newline at end of file +#CMD ["npm", "start"] From 414c92b978143bcfee2bddf854e3f11f96e18da4 Mon Sep 17 00:00:00 2001 From: sergiollende <98907542+sergiollende@users.noreply.github.com> Date: Thu, 21 Mar 2024 13:33:56 +0100 Subject: [PATCH 42/59] Update release.yml --- .github/workflows/release.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2b1a901..25c9997 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,15 +13,10 @@ jobs: packages: write steps: - uses: actions/checkout@v4 - - - name: Create .env file - run: echo "REACT_APP_API_ENDPOINT=http://${{ secrets.DEPLOY_HOST }}:8000" > webapp/.env - - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@v5 env: - REACT_APP_API_ENDPOINT: http://${{ secrets.DEPLOY_HOST }}:8000 - teamname: wiq_en3a + API_URI: http://${{ secrets.DEPLOY_HOST }}:8000 with: name: arquisoft/wiq_en3a/webapp username: ${{ github.actor }} @@ -29,7 +24,7 @@ jobs: registry: ghcr.io workdir: webapp buildargs: | - REACT_APP_API_ENDPOINT + API_URI docker-push-wikidata-service: name: Push wikidata Docker Image to GitHub Packages runs-on: ubuntu-latest From c6da63fccfc3d91668907bf0bb10d652aecfbf15 Mon Sep 17 00:00:00 2001 From: sergiollende <98907542+sergiollende@users.noreply.github.com> Date: Thu, 21 Mar 2024 13:35:28 +0100 Subject: [PATCH 43/59] Update release.yml --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 25c9997..43d73f7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,7 +79,6 @@ jobs: key: ${{ secrets.DEPLOY_KEY }} command: | wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/master/docker-compose.yml -O docker-compose.yml - wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/master/.envç - echo "API_URI=http://${{ secrets.DEPLOY_HOST }}:8000" >> .env + wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/master/.env docker compose --profile prod down docker compose --profile prod up -d --pull always From 65c3bd3578127109fb8138c20e2aea44295e76a7 Mon Sep 17 00:00:00 2001 From: sergiollende <98907542+sergiollende@users.noreply.github.com> Date: Thu, 21 Mar 2024 13:38:30 +0100 Subject: [PATCH 44/59] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43d73f7..4776f57 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,7 +78,7 @@ jobs: user: ${{ secrets.DEPLOY_USER }} key: ${{ secrets.DEPLOY_KEY }} command: | - wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/master/docker-compose.yml -O docker-compose.yml + wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/build_sergiollende/docker-compose.yml -O docker-compose.yml wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/master/.env docker compose --profile prod down docker compose --profile prod up -d --pull always From 9258bc4d108456f1540c9be7b3e41f7fa041da6f Mon Sep 17 00:00:00 2001 From: sergiollende <98907542+sergiollende@users.noreply.github.com> Date: Thu, 21 Mar 2024 13:41:12 +0100 Subject: [PATCH 45/59] Update Dockerfile --- webapp/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/Dockerfile b/webapp/Dockerfile index 65cdc23..4865006 100644 --- a/webapp/Dockerfile +++ b/webapp/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /app #Install the dependencies RUN npm install -ARG API_URI = "http://localhost:8000" +ARG API_URI="http://localhost:8000" ENV REACT_APP_API_ENDPOINT=$API_URI #Create an optimized version of the webapp From d93a9814fd32690566ba4fa2bfd435c7e5b97567 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Thu, 21 Mar 2024 13:59:57 +0100 Subject: [PATCH 46/59] OpenAPI first example --- gatewayservice/openapi.yaml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 gatewayservice/openapi.yaml diff --git a/gatewayservice/openapi.yaml b/gatewayservice/openapi.yaml new file mode 100644 index 0000000..79a2a46 --- /dev/null +++ b/gatewayservice/openapi.yaml @@ -0,0 +1,39 @@ +openapi: 3.0.0 +info: + title: Gateway Service API + version: 0.0.1 + description: Gateway Service + +servers: + - url: http://localhost:8080 + description: Local server + +paths: + /adduser: + post: + summary: Add a new user + operationId: addUser + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/User' + responses: + '200': + description: User added successfully + content: + application/json: + schema: + type: object + properties: + username: + type: string + example: User ID + password: + type: string + example: Password + '400': + description: Invalid input + '409': + description: User already exists \ No newline at end of file From 45fbba86d93b6b5e2e3d3320bce0f2507b836c8f Mon Sep 17 00:00:00 2001 From: sergiollende Date: Thu, 21 Mar 2024 14:00:09 +0100 Subject: [PATCH 47/59] GatewayService changes --- gatewayservice/gateway-service.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 313f27b..bb3a7c4 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -24,7 +24,7 @@ app.get('/health', (_req, res) => { app.post('/login', async (req, res) => { try { // Forward the login request to the authentication service - const authResponse = await axios.post('/auth/login', req.body); + const authResponse = await axios.post(userServiceUrl + '/auth/login', req.body); res.json(authResponse.data); } catch (error) { console.error(error); @@ -34,7 +34,7 @@ app.post('/login', async (req, res) => { app.post('/adduser', async (req, res) => { try { // Forward the add user request to the user service - const userResponse = await axios.post('/user/adduser', req.body); + const userResponse = await axios.post(userServiceUrl + '/user/adduser', req.body); res.json(userResponse.data); } catch (error) { console.error(error); @@ -44,7 +44,7 @@ app.post('/adduser', async (req, res) => { app.post('/edituser', async (req, res) => { try { // Forward the edit user request to the user service - const userResponse = await axios.post('/user/edituser', req.body); + const userResponse = await axios.post(userServiceUrl + '/user/edituser', req.body); res.json(userResponse.data); } catch (error) { console.error(error); @@ -55,7 +55,7 @@ app.get('/WikiData/GetCapitalsQuestions', async (_req, res) => { try { // Forward the edit user request to the user service console.log(process.env.WIKIDATA_SERVICE_URL); - const wikiResponse = await axios.get(wikidataServiceUrl+'/WikiData/GetCapitalsQuestions'); + const wikiResponse = await axios.get(wikidataServiceUrl + '/WikiData/GetCapitalsQuestions'); res.json(wikiResponse.data); } catch (error) { console.error(error); From b4c7353fbd0e16d4321e5adf635c35484bd92e8d Mon Sep 17 00:00:00 2001 From: sergiollende Date: Thu, 21 Mar 2024 17:10:43 +0100 Subject: [PATCH 48/59] Improvements in docker files for gateway --- gatewayservice/Dockerfile | 2 -- gatewayservice/gateway-service.js | 4 ++++ users/Dockerfile | 2 -- webapp/src/services/auth-service.ts | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gatewayservice/Dockerfile b/gatewayservice/Dockerfile index 52d44b2..6c34043 100644 --- a/gatewayservice/Dockerfile +++ b/gatewayservice/Dockerfile @@ -15,5 +15,3 @@ COPY . . # Define the command to run your app CMD ["node", "gateway-service.js"] - -EXPOSE 8000 diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index bb3a7c4..ef8f165 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -27,6 +27,7 @@ app.post('/login', async (req, res) => { const authResponse = await axios.post(userServiceUrl + '/auth/login', req.body); res.json(authResponse.data); } catch (error) { + res.status(error.response.status).json({ error: error.response.data.error }); console.error(error); } }); @@ -37,6 +38,7 @@ app.post('/adduser', async (req, res) => { const userResponse = await axios.post(userServiceUrl + '/user/adduser', req.body); res.json(userResponse.data); } catch (error) { + res.status(error.response.status).json({ error: error.response.data.error }); console.error(error); } }); @@ -47,6 +49,7 @@ app.post('/edituser', async (req, res) => { const userResponse = await axios.post(userServiceUrl + '/user/edituser', req.body); res.json(userResponse.data); } catch (error) { + res.status(error.response.status).json({ error: error.response.data.error }); console.error(error); } }); @@ -58,6 +61,7 @@ app.get('/WikiData/GetCapitalsQuestions', async (_req, res) => { const wikiResponse = await axios.get(wikidataServiceUrl + '/WikiData/GetCapitalsQuestions'); res.json(wikiResponse.data); } catch (error) { + res.status(error.response.status).json({ error: error.response.data.error }); console.error(error); } }); diff --git a/users/Dockerfile b/users/Dockerfile index a85b2ba..4667f11 100644 --- a/users/Dockerfile +++ b/users/Dockerfile @@ -19,5 +19,3 @@ EXPOSE 8002 # Define the command to run your app CMD ["node", "index.js"] -EXPOSE 8002 - diff --git a/webapp/src/services/auth-service.ts b/webapp/src/services/auth-service.ts index a06f4e5..db47d56 100644 --- a/webapp/src/services/auth-service.ts +++ b/webapp/src/services/auth-service.ts @@ -23,7 +23,7 @@ export const loginWithToken = () => { export const login = async (username: string, password: string)=> { try { - const response = await axios.post(API_URL + "/login", { username, password }); + const response = await axios.post(`${API_URL}/login`, { username, password }); //const response = await axios.post("http://localhost:8002/auth/login", { username, password }); const token = response.data.token; console.log('token:', token); @@ -38,7 +38,7 @@ export const login = async (username: string, password: string)=> { export const register = async (email:string, username: string, password: string) => { try { - const response = await axios.post(API_URL + "/adduser", { username, password, email }); + const response = await axios.post(`${API_URL}/adduser`, { username, password, email }); console.log('response:', response); const name = response.data; return name; From 8ffdf38adb1b2b1d51ca27400177d684323df641 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Thu, 21 Mar 2024 17:27:45 +0100 Subject: [PATCH 49/59] Changes wikidata call --- gatewayservice/gateway-service.js | 4 ---- webapp/src/stores/playing-store.ts | 18 ++++++++++-------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index ef8f165..bb3a7c4 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -27,7 +27,6 @@ app.post('/login', async (req, res) => { const authResponse = await axios.post(userServiceUrl + '/auth/login', req.body); res.json(authResponse.data); } catch (error) { - res.status(error.response.status).json({ error: error.response.data.error }); console.error(error); } }); @@ -38,7 +37,6 @@ app.post('/adduser', async (req, res) => { const userResponse = await axios.post(userServiceUrl + '/user/adduser', req.body); res.json(userResponse.data); } catch (error) { - res.status(error.response.status).json({ error: error.response.data.error }); console.error(error); } }); @@ -49,7 +47,6 @@ app.post('/edituser', async (req, res) => { const userResponse = await axios.post(userServiceUrl + '/user/edituser', req.body); res.json(userResponse.data); } catch (error) { - res.status(error.response.status).json({ error: error.response.data.error }); console.error(error); } }); @@ -61,7 +58,6 @@ app.get('/WikiData/GetCapitalsQuestions', async (_req, res) => { const wikiResponse = await axios.get(wikidataServiceUrl + '/WikiData/GetCapitalsQuestions'); res.json(wikiResponse.data); } catch (error) { - res.status(error.response.status).json({ error: error.response.data.error }); console.error(error); } }); diff --git a/webapp/src/stores/playing-store.ts b/webapp/src/stores/playing-store.ts index a628d18..92c8cf1 100644 --- a/webapp/src/stores/playing-store.ts +++ b/webapp/src/stores/playing-store.ts @@ -1,4 +1,5 @@ +import axios from 'axios'; import {create} from 'zustand'; import { getCorrectlyAnsweredQuestions, getQuestionsAnswered } from '../services/auth-service'; @@ -58,14 +59,15 @@ interface GameQuestions{ const API_URL = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000'; -const retrieveQuestions = () => { - console.log(`${API_URL}`); - return fetch(`${API_URL}/WikiData/GetCapitalsQuestions`) - .then((response) => response.json()) - .catch((error) => { - console.error('There was a problem with the questions:', error); - return []; // Return an empty array in case of an error - }); +export const retrieveQuestions = async () => { + try { + let response = await axios.get(`${API_URL}/WikiData/GetCapitalsQuestions`); + console.log('response:', response); + return response.data.json(); + } catch (error) { + console.error('There was a problem with the questions:', error); + return []; + } }; export const useGameQuestions = create((set) => ({ From 5ae236a71359fb9e8b832d2ab72e40cef999e619 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Thu, 21 Mar 2024 18:00:14 +0100 Subject: [PATCH 50/59] Try to connect with WikiData --- gatewayservice/gateway-service.js | 12 +++++++++--- webapp/src/stores/playing-store.ts | 14 ++++++++++++-- wikidata_service/Dockerfile | 2 -- .../WikiDataTest/Properties/launchSettings.json | 2 +- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index bb3a7c4..5ee4515 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -51,14 +51,20 @@ app.post('/edituser', async (req, res) => { } }); -app.get('/WikiData/GetCapitalsQuestions', async (_req, res) => { +app.get('/GetCapitalsQuestions', async (_req, res) => { try { // Forward the edit user request to the user service console.log(process.env.WIKIDATA_SERVICE_URL); - const wikiResponse = await axios.get(wikidataServiceUrl + '/WikiData/GetCapitalsQuestions'); - res.json(wikiResponse.data); + const wikiResponse = await axios.get(wikidataServiceUrl + '/WikiData/GetCapitalsQuestions', { timeout: 5000 }); + if (wikiResponse.status !== 200) { + console.error('Error with the wikidata service:', wikiResponse.status); + res.status(wikiResponse.status).json({ error: 'Error with the wikidata service' }); + } else { + res.json(wikiResponse.data); + } } catch (error) { console.error(error); + res.status(500).json({ error: 'Error with the gateway service' }); } }); diff --git a/webapp/src/stores/playing-store.ts b/webapp/src/stores/playing-store.ts index 92c8cf1..6f0133e 100644 --- a/webapp/src/stores/playing-store.ts +++ b/webapp/src/stores/playing-store.ts @@ -61,15 +61,25 @@ const API_URL = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000'; export const retrieveQuestions = async () => { try { - let response = await axios.get(`${API_URL}/WikiData/GetCapitalsQuestions`); + let response = await axios.get(`${API_URL}/GetCapitalsQuestions`); console.log('response:', response); - return response.data.json(); + return response.data; } catch (error) { console.error('There was a problem with the questions:', error); return []; } }; +// const retrieveQuestionss = () => { +// console.log(`${API_URL}`); +// return fetch(`${API_URL}/WikiData/GetCapitalsQuestions`) +// .then((response) => response.json()) +// .catch((error) => { +// console.error('There was a problem with the questions:', error); +// return []; // Return an empty array in case of an error +// }); +// }; + export const useGameQuestions = create((set) => ({ questions: [], setQuestions: (questions: any[]) => set({ questions: questions }), diff --git a/wikidata_service/Dockerfile b/wikidata_service/Dockerfile index c3de0e2..ec812db 100644 --- a/wikidata_service/Dockerfile +++ b/wikidata_service/Dockerfile @@ -1,7 +1,5 @@ FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base WORKDIR /app -EXPOSE 80 -EXPOSE 443 FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build ARG BUILD_CONFIGURATION=Release diff --git a/wikidata_service/WikiDataTest/Properties/launchSettings.json b/wikidata_service/WikiDataTest/Properties/launchSettings.json index 730a8b3..0a8ea3d 100644 --- a/wikidata_service/WikiDataTest/Properties/launchSettings.json +++ b/wikidata_service/WikiDataTest/Properties/launchSettings.json @@ -8,7 +8,7 @@ "ASPNETCORE_ENVIRONMENT": "Development" }, "dotnetRunMessages": true, - "applicationUrl": "http://localhost:7259;http://localhost:5276" + "applicationUrl": "http://localhost:7259" }, "IIS Express": { "commandName": "IISExpress", From 47522fea3ddf004e3a2fa12ab2196f540930beb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Tru=C3=A9bano?= Date: Thu, 21 Mar 2024 19:49:05 +0100 Subject: [PATCH 51/59] Migration to node --- .github/workflows/release.yml | 21 +-- {users => api}/.dockerignore | 0 {users => api}/Dockerfile | 0 {users => api}/authservice/Dockerfile | 40 +++--- {users => api}/authservice/auth-model.js | 0 {users => api}/authservice/auth-service.js | 0 .../authservice/auth-service.test.js | 0 {users => api}/authservice/package-lock.json | 0 {users => api}/authservice/package.json | 0 {users => api}/authservice/test-login.js | 0 {users => api}/index.js | 2 + {users => api}/package-lock.json | 0 {users => api}/package.json | 0 {users => api}/userservice/Dockerfile | 42 +++--- {users => api}/userservice/package-lock.json | 0 {users => api}/userservice/package.json | 0 {users => api}/userservice/test-addUser.js | 0 {users => api}/userservice/test-editUser.js | 0 {users => api}/userservice/user-model.js | 0 {users => api}/userservice/user-service.js | 0 .../userservice/user-service.test.js | 0 api/wikidataservice/models/wikidata-model.js | 0 api/wikidataservice/package-lock.json | 102 ++++++++++++++ api/wikidataservice/package.json | 5 + api/wikidataservice/wikidata-service.js | 127 ++++++++++++++++++ docker-compose.yml | 19 +-- gatewayservice/gateway-service.js | 13 +- webapp/src/services/auth-service.ts | 3 +- 28 files changed, 292 insertions(+), 82 deletions(-) rename {users => api}/.dockerignore (100%) rename {users => api}/Dockerfile (100%) rename {users => api}/authservice/Dockerfile (95%) rename {users => api}/authservice/auth-model.js (100%) rename {users => api}/authservice/auth-service.js (100%) rename {users => api}/authservice/auth-service.test.js (100%) rename {users => api}/authservice/package-lock.json (100%) rename {users => api}/authservice/package.json (100%) rename {users => api}/authservice/test-login.js (100%) rename {users => api}/index.js (90%) rename {users => api}/package-lock.json (100%) rename {users => api}/package.json (100%) rename {users => api}/userservice/Dockerfile (95%) rename {users => api}/userservice/package-lock.json (100%) rename {users => api}/userservice/package.json (100%) rename {users => api}/userservice/test-addUser.js (100%) rename {users => api}/userservice/test-editUser.js (100%) rename {users => api}/userservice/user-model.js (100%) rename {users => api}/userservice/user-service.js (100%) rename {users => api}/userservice/user-service.test.js (100%) create mode 100644 api/wikidataservice/models/wikidata-model.js create mode 100644 api/wikidataservice/package-lock.json create mode 100644 api/wikidataservice/package.json create mode 100644 api/wikidataservice/wikidata-service.js diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4776f57..2628950 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,32 +25,19 @@ jobs: workdir: webapp buildargs: | API_URI - docker-push-wikidata-service: - name: Push wikidata Docker Image to GitHub Packages + docker-push-api: + name: Push api Docker Image to GitHub Packages runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@v5 with: - name: arquisoft/wiq_en3a/wikidata_service + name: arquisoft/wiq_en3a/api username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io - workdir: wikidata_service - docker-push-userservice: - name: Push user service Docker Image to GitHub Packages - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@v5 - with: - name: arquisoft/wiq_en3a/userservice - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - registry: ghcr.io - workdir: users + workdir: api docker-push-gatewayservice: name: Push gateway service Docker Image to GitHub Packages runs-on: ubuntu-latest diff --git a/users/.dockerignore b/api/.dockerignore similarity index 100% rename from users/.dockerignore rename to api/.dockerignore diff --git a/users/Dockerfile b/api/Dockerfile similarity index 100% rename from users/Dockerfile rename to api/Dockerfile diff --git a/users/authservice/Dockerfile b/api/authservice/Dockerfile similarity index 95% rename from users/authservice/Dockerfile rename to api/authservice/Dockerfile index 7132990..70648d7 100644 --- a/users/authservice/Dockerfile +++ b/api/authservice/Dockerfile @@ -1,20 +1,20 @@ -# Use an official Node.js runtime as a parent image -FROM node:20 - -# Set the working directory in the container -WORKDIR /usr/src/authservice - -# Copy package.json and package-lock.json to the working directory -COPY package*.json ./ - -# Install app dependencies -RUN npm install - -# Copy the app source code to the working directory -COPY . . - -# Expose the port the app runs on -EXPOSE 8002 - -# Define the command to run your app -CMD ["node", "auth-service.js"] +# Use an official Node.js runtime as a parent image +FROM node:20 + +# Set the working directory in the container +WORKDIR /usr/src/authservice + +# Copy package.json and package-lock.json to the working directory +COPY package*.json ./ + +# Install app dependencies +RUN npm install + +# Copy the app source code to the working directory +COPY . . + +# Expose the port the app runs on +EXPOSE 8002 + +# Define the command to run your app +CMD ["node", "auth-service.js"] diff --git a/users/authservice/auth-model.js b/api/authservice/auth-model.js similarity index 100% rename from users/authservice/auth-model.js rename to api/authservice/auth-model.js diff --git a/users/authservice/auth-service.js b/api/authservice/auth-service.js similarity index 100% rename from users/authservice/auth-service.js rename to api/authservice/auth-service.js diff --git a/users/authservice/auth-service.test.js b/api/authservice/auth-service.test.js similarity index 100% rename from users/authservice/auth-service.test.js rename to api/authservice/auth-service.test.js diff --git a/users/authservice/package-lock.json b/api/authservice/package-lock.json similarity index 100% rename from users/authservice/package-lock.json rename to api/authservice/package-lock.json diff --git a/users/authservice/package.json b/api/authservice/package.json similarity index 100% rename from users/authservice/package.json rename to api/authservice/package.json diff --git a/users/authservice/test-login.js b/api/authservice/test-login.js similarity index 100% rename from users/authservice/test-login.js rename to api/authservice/test-login.js diff --git a/users/index.js b/api/index.js similarity index 90% rename from users/index.js rename to api/index.js index 32776f4..3066caa 100644 --- a/users/index.js +++ b/api/index.js @@ -22,6 +22,7 @@ mongoose.connect(mongoUri).then( // Routes const authRoutes = require('./authservice/auth-service.js'); const userRoutes = require('./userservice/user-service.js'); +const wikidataRoutes = require('./wikidataservice/wikidata-service.js'); // Middlewares added to the application @@ -30,6 +31,7 @@ app.use(bodyParser.json()); // Routes middlewares to be used app.use('/auth', authRoutes); app.use('/user', userRoutes); +app.use('/wikidata', wikidataRoutes); // Start the server diff --git a/users/package-lock.json b/api/package-lock.json similarity index 100% rename from users/package-lock.json rename to api/package-lock.json diff --git a/users/package.json b/api/package.json similarity index 100% rename from users/package.json rename to api/package.json diff --git a/users/userservice/Dockerfile b/api/userservice/Dockerfile similarity index 95% rename from users/userservice/Dockerfile rename to api/userservice/Dockerfile index 57f1f46..cea2bbe 100644 --- a/users/userservice/Dockerfile +++ b/api/userservice/Dockerfile @@ -1,21 +1,21 @@ -# Use an official Node.js runtime as a parent image -FROM node:20 - -# Set the working directory in the container -WORKDIR /usr/src/userservice - -# Copy package.json and package-lock.json to the working directory -COPY package*.json ./ - -# Install app dependencies -RUN npm install - -# Copy the app source code to the working directory -COPY . . - -# Expose the port the app runs on -EXPOSE 8001 - -# Define the command to run your app -CMD ["node", "user-service.js"] - +# Use an official Node.js runtime as a parent image +FROM node:20 + +# Set the working directory in the container +WORKDIR /usr/src/userservice + +# Copy package.json and package-lock.json to the working directory +COPY package*.json ./ + +# Install app dependencies +RUN npm install + +# Copy the app source code to the working directory +COPY . . + +# Expose the port the app runs on +EXPOSE 8001 + +# Define the command to run your app +CMD ["node", "user-service.js"] + diff --git a/users/userservice/package-lock.json b/api/userservice/package-lock.json similarity index 100% rename from users/userservice/package-lock.json rename to api/userservice/package-lock.json diff --git a/users/userservice/package.json b/api/userservice/package.json similarity index 100% rename from users/userservice/package.json rename to api/userservice/package.json diff --git a/users/userservice/test-addUser.js b/api/userservice/test-addUser.js similarity index 100% rename from users/userservice/test-addUser.js rename to api/userservice/test-addUser.js diff --git a/users/userservice/test-editUser.js b/api/userservice/test-editUser.js similarity index 100% rename from users/userservice/test-editUser.js rename to api/userservice/test-editUser.js diff --git a/users/userservice/user-model.js b/api/userservice/user-model.js similarity index 100% rename from users/userservice/user-model.js rename to api/userservice/user-model.js diff --git a/users/userservice/user-service.js b/api/userservice/user-service.js similarity index 100% rename from users/userservice/user-service.js rename to api/userservice/user-service.js diff --git a/users/userservice/user-service.test.js b/api/userservice/user-service.test.js similarity index 100% rename from users/userservice/user-service.test.js rename to api/userservice/user-service.test.js diff --git a/api/wikidataservice/models/wikidata-model.js b/api/wikidataservice/models/wikidata-model.js new file mode 100644 index 0000000..e69de29 diff --git a/api/wikidataservice/package-lock.json b/api/wikidataservice/package-lock.json new file mode 100644 index 0000000..c7857a7 --- /dev/null +++ b/api/wikidataservice/package-lock.json @@ -0,0 +1,102 @@ +{ + "name": "wikidataservice", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "axios": "^1.6.7" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/axios": { + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + } + } +} diff --git a/api/wikidataservice/package.json b/api/wikidataservice/package.json new file mode 100644 index 0000000..5af4d8b --- /dev/null +++ b/api/wikidataservice/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "axios": "^1.6.7" + } + } \ No newline at end of file diff --git a/api/wikidataservice/wikidata-service.js b/api/wikidataservice/wikidata-service.js new file mode 100644 index 0000000..1439170 --- /dev/null +++ b/api/wikidataservice/wikidata-service.js @@ -0,0 +1,127 @@ +const express = require('express'); +const router = express.Router(); +const axios = require('axios'); + +// Route for user login +router.get('/getCapitalsQuestions', async (req, res) => { + try { + // Obtiene las preguntas de la fuente de datos + const jsonQuestions = await getQuestions(getCapitalsQuery()); + + // Genera las preguntas sobre las capitales + const questions = generateQuestionsCapitalsOf(jsonQuestions.results.bindings); + + // Envía las preguntas como respuesta HTTP + res.status(200).json(questions); + } catch (error) { + // Maneja cualquier error y envía una respuesta de error HTTP + console.error('Error:', error); + res.status(500).send('Internal Server Error'); + } +}); + +async function getQuestions(sparqlQuery) { + try { + const endpointUrl = "https://query.wikidata.org/sparql?query="; + const fullUrl = endpointUrl + encodeURIComponent(sparqlQuery); + + // Realiza la solicitud HTTP utilizando axios + const response = await axios.get(fullUrl, { + headers: { + 'User-Agent': 'Sergiollende/1.0', + 'Accept': 'application/sparql-results+json' + } + }); + + // Extrae los datos JSON de la respuesta + const jsonResult = response.data; + + return jsonResult; + } catch (error) { + // Maneja cualquier error que pueda ocurrir durante la solicitud HTTP + console.error('Error:', error.message); + throw new Error('Failed to fetch data from Wikidata'); + } +} + +function generateQuestionsCapitalsOf(capitalCountries, numberQuestions = 10) { + const questions = []; + + const ids = new Set(); + + // Genera un conjunto de índices únicos aleatorios + while (ids.size < numberQuestions) { + ids.add(Math.floor(Math.random()*capitalCountries.length+1)); + } + + const idsList = Array.from(ids); + + // Genera las preguntas + for (let j = 0; j < idsList.length; j++) { + const countryName = capitalCountries[idsList[j]].countryLabel.value; + const questionText = `What is the capital of ${countryName}?`; + const answers = []; + + // Índice de la respuesta correcta + let correctAnswer = 0; + + // Agrega la capital correcta en el primer lugar + answers[correctAnswer] = capitalCountries[idsList[j]].capitalLabel.value; + + // Obtiene 3 respuestas incorrectas aleatorias de todas las capitales + const wrongIds = new Set(); + for (let w = 1; w < 4; w++) { + let wrongId = Math.floor(Math.random()*capitalCountries.length+1); + while (idsList[j] === wrongId || wrongIds.has(wrongId)) { + wrongId = Math.floor(Math.random()*capitalCountries.length+1); + } + // Agrega el id de la respuesta incorrecta al conjunto + wrongIds.add(wrongId); + answers[w] = capitalCountries[wrongId].capitalLabel.value; + } + + questions[j] = { + text:questionText, + answers, + correctAnswer + }; + } + + return questions; +} + +function getCapitalsQuery() { + return ` + SELECT ?capitalLabel ?countryLabel WHERE { + ?capital wdt:P1376 ?country. + ?capital wdt:P31 wd:Q5119. + ?country wdt:P31 wd:Q3624078. + SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } + } + LIMIT 400 + `; +} + +// Define la función para obtener la consulta del director de la película +function getMovieDirectorQuery() { + return generateSparqlQuery("Q11424", "P57"); +} + +// Define la función para obtener la consulta del símbolo del elemento +function getElementSymbolQuery() { + return generateSparqlQuery("Q11344", "P246"); +} + +// Define la función para generar la consulta SPARQL +function generateSparqlQuery(themeId, attributeId, limit = 10) { + return ` + SELECT ?themeLabel ?attributeLabel WHERE { + ?theme wdt:P31 wd:${themeId}; + wdt:${attributeId} ?attribute. + SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } + } + LIMIT ${limit} + `; +} + +module.exports = router diff --git a/docker-compose.yml b/docker-compose.yml index 428cdbd..21d0d04 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,19 +11,9 @@ services: networks: - mynetwork - wikidata_service: - container_name: wikidata_service-${teamname:-defaultASW} - image: ghcr.io/arquisoft/wiq_en3a/wikidata_service:latest - build: ./wikidata_service - profiles: ["dev", "prod"] - ports: - - "7259:7259" - networks: - - mynetwork - - userservice: - container_name: userservice-${teamname:-defaultASW} - image: ghcr.io/arquisoft/wiq_en3a/userservice:latest + apiservice: + container_name: apiservice-${teamname:-defaultASW} + image: ghcr.io/arquisoft/wiq_en3a/apiservice:latest profiles: ["dev", "prod"] build: ./users depends_on: @@ -49,8 +39,7 @@ services: networks: - mynetwork environment: - USER_SERVICE_URL: http://userservice:8002 - WIKIDATA_SERVICE_URL: http://wikidata_service:7259 + API_SERVICE_URL: http://apiservice:8002 webapp: container_name: webapp-${teamname:-defaultASW} diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 5ee4515..691d0ec 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -6,8 +6,7 @@ const promBundle = require('express-prom-bundle'); const app = express(); const port = 8000; -const userServiceUrl = process.env.USER_SERVICE_URL || 'http://localhost:8002'; -const wikidataServiceUrl = process.env.WIKIDATA_SERVICE_URL || 'http://localhost:7259'; +const apiServiceUrl = process.env.API_SERVICE_URL || 'http://localhost:8002'; app.use(cors()); app.use(express.json()); @@ -24,7 +23,7 @@ app.get('/health', (_req, res) => { app.post('/login', async (req, res) => { try { // Forward the login request to the authentication service - const authResponse = await axios.post(userServiceUrl + '/auth/login', req.body); + const authResponse = await axios.post(apiServiceUrl + '/auth/login', req.body); res.json(authResponse.data); } catch (error) { console.error(error); @@ -34,7 +33,7 @@ app.post('/login', async (req, res) => { app.post('/adduser', async (req, res) => { try { // Forward the add user request to the user service - const userResponse = await axios.post(userServiceUrl + '/user/adduser', req.body); + const userResponse = await axios.post(apiServiceUrl + '/user/adduser', req.body); res.json(userResponse.data); } catch (error) { console.error(error); @@ -44,7 +43,7 @@ app.post('/adduser', async (req, res) => { app.post('/edituser', async (req, res) => { try { // Forward the edit user request to the user service - const userResponse = await axios.post(userServiceUrl + '/user/edituser', req.body); + const userResponse = await axios.post(apiServiceUrl + '/user/edituser', req.body); res.json(userResponse.data); } catch (error) { console.error(error); @@ -54,8 +53,8 @@ app.post('/edituser', async (req, res) => { app.get('/GetCapitalsQuestions', async (_req, res) => { try { // Forward the edit user request to the user service - console.log(process.env.WIKIDATA_SERVICE_URL); - const wikiResponse = await axios.get(wikidataServiceUrl + '/WikiData/GetCapitalsQuestions', { timeout: 5000 }); + console.log(process.env.apiServiceUrl); + const wikiResponse = await axios.get(apiServiceUrl + '/wikidata/GetCapitalsQuestions', { timeout: 5000 }); if (wikiResponse.status !== 200) { console.error('Error with the wikidata service:', wikiResponse.status); res.status(wikiResponse.status).json({ error: 'Error with the wikidata service' }); diff --git a/webapp/src/services/auth-service.ts b/webapp/src/services/auth-service.ts index db47d56..142af5f 100644 --- a/webapp/src/services/auth-service.ts +++ b/webapp/src/services/auth-service.ts @@ -3,8 +3,7 @@ import { jwtDecode } from "jwt-decode"; import { useUserStore } from '../stores/user-store'; import { useStats } from '../stores/playing-store'; -// const API_URL = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000'; -const API_URL = process.env.REACT_APP_API_ENDPOINT; +const API_URL = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000'; export type JwtPayload = { username: string; From 03911de5988cb1a0f084ea02b6c6c0c262883c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Tru=C3=A9bano?= Date: Thu, 21 Mar 2024 19:55:31 +0100 Subject: [PATCH 52/59] Deployment changes --- .github/workflows/release.yml | 6 +++--- docker-compose.yml | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2628950..49eb617 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: workdir: webapp buildargs: | API_URI - docker-push-api: + docker-push-apiservice: name: Push api Docker Image to GitHub Packages runs-on: ubuntu-latest steps: @@ -33,7 +33,7 @@ jobs: - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@v5 with: - name: arquisoft/wiq_en3a/api + name: arquisoft/wiq_en3a/apiservice username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io @@ -54,7 +54,7 @@ jobs: deploy: name: Deploy over SSH runs-on: ubuntu-latest - needs: [docker-push-userservice,docker-push-gatewayservice,docker-push-webapp, docker-push-wikidata-service] + needs: [docker-push-gatewayservice,docker-push-webapp, docker-push-apiservice] steps: - name: Deploy over SSH uses: fifsky/ssh-action@master diff --git a/docker-compose.yml b/docker-compose.yml index 21d0d04..49bb940 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,7 @@ services: container_name: apiservice-${teamname:-defaultASW} image: ghcr.io/arquisoft/wiq_en3a/apiservice:latest profiles: ["dev", "prod"] - build: ./users + build: ./apiservice depends_on: - mongodb ports: @@ -32,8 +32,7 @@ services: build: ./gatewayservice depends_on: - mongodb - - userservice - - wikidata_service + - apiservice ports: - "8000:8000" networks: From 87553186a0cb73546a2f501f5dd59a0240f844ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Tru=C3=A9bano?= Date: Thu, 21 Mar 2024 20:06:52 +0100 Subject: [PATCH 53/59] Routing issue solved --- .github/workflows/release.yml | 2 +- gatewayservice/gateway-service.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 49eb617..7d89c64 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,7 +65,7 @@ jobs: user: ${{ secrets.DEPLOY_USER }} key: ${{ secrets.DEPLOY_KEY }} command: | - wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/build_sergiollende/docker-compose.yml -O docker-compose.yml + wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/api_migration_node/docker-compose.yml -O docker-compose.yml wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/master/.env docker compose --profile prod down docker compose --profile prod up -d --pull always diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 691d0ec..527fdd5 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -50,11 +50,11 @@ app.post('/edituser', async (req, res) => { } }); -app.get('/GetCapitalsQuestions', async (_req, res) => { +app.get('/getCapitalsQuestions', async (_req, res) => { try { // Forward the edit user request to the user service console.log(process.env.apiServiceUrl); - const wikiResponse = await axios.get(apiServiceUrl + '/wikidata/GetCapitalsQuestions', { timeout: 5000 }); + const wikiResponse = await axios.get(apiServiceUrl + '/wikidata/getCapitalsQuestions', { timeout: 5000 }); if (wikiResponse.status !== 200) { console.error('Error with the wikidata service:', wikiResponse.status); res.status(wikiResponse.status).json({ error: 'Error with the wikidata service' }); From d207fc2ca235b5f1247493f8b064ba5af3f8b9aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Tru=C3=A9bano?= Date: Thu, 21 Mar 2024 20:21:51 +0100 Subject: [PATCH 54/59] Depployment issues solved with api --- .github/workflows/release.yml | 6 +++--- docker-compose.yml | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7d89c64..091ddf6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: workdir: webapp buildargs: | API_URI - docker-push-apiservice: + docker-push-api: name: Push api Docker Image to GitHub Packages runs-on: ubuntu-latest steps: @@ -33,7 +33,7 @@ jobs: - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@v5 with: - name: arquisoft/wiq_en3a/apiservice + name: arquisoft/wiq_en3a/api username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io @@ -54,7 +54,7 @@ jobs: deploy: name: Deploy over SSH runs-on: ubuntu-latest - needs: [docker-push-gatewayservice,docker-push-webapp, docker-push-apiservice] + needs: [docker-push-gatewayservice,docker-push-webapp, docker-push-api] steps: - name: Deploy over SSH uses: fifsky/ssh-action@master diff --git a/docker-compose.yml b/docker-compose.yml index 49bb940..fa9e7b7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,11 +11,11 @@ services: networks: - mynetwork - apiservice: - container_name: apiservice-${teamname:-defaultASW} - image: ghcr.io/arquisoft/wiq_en3a/apiservice:latest + api: + container_name: api-${teamname:-defaultASW} + image: ghcr.io/arquisoft/wiq_en3a/api:latest profiles: ["dev", "prod"] - build: ./apiservice + build: ./api depends_on: - mongodb ports: @@ -32,13 +32,13 @@ services: build: ./gatewayservice depends_on: - mongodb - - apiservice + - api ports: - "8000:8000" networks: - mynetwork environment: - API_SERVICE_URL: http://apiservice:8002 + API_SERVICE_URL: http://api:8002 webapp: container_name: webapp-${teamname:-defaultASW} From d93654f762a61922ba136b900629d54c60352efc Mon Sep 17 00:00:00 2001 From: sergiollende Date: Thu, 21 Mar 2024 23:49:37 +0100 Subject: [PATCH 55/59] Minimal changes --- api/authservice/Dockerfile | 2 +- gatewayservice/gateway-service.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/authservice/Dockerfile b/api/authservice/Dockerfile index 70648d7..47c1edb 100644 --- a/api/authservice/Dockerfile +++ b/api/authservice/Dockerfile @@ -14,7 +14,7 @@ RUN npm install COPY . . # Expose the port the app runs on -EXPOSE 8002 +EXPOSE 8003 # Define the command to run your app CMD ["node", "auth-service.js"] diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 527fdd5..7d13f1e 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -50,7 +50,7 @@ app.post('/edituser', async (req, res) => { } }); -app.get('/getCapitalsQuestions', async (_req, res) => { +app.get('/GetCapitalsQuestions', async (_req, res) => { try { // Forward the edit user request to the user service console.log(process.env.apiServiceUrl); From 8e02a093cca614a01dcf06badb33d9a79a19bffb Mon Sep 17 00:00:00 2001 From: sergiollende Date: Fri, 22 Mar 2024 14:03:59 +0100 Subject: [PATCH 56/59] URL Changes in api --- api/Dockerfile | 2 +- api/authservice/Dockerfile | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index 4667f11..22334e4 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -2,7 +2,7 @@ FROM node:20 # Set the working directory in the container -WORKDIR /usr/src/users +WORKDIR /usr/src/api # Copy package.json and package-lock.json to the working directory COPY package*.json ./ diff --git a/api/authservice/Dockerfile b/api/authservice/Dockerfile index 47c1edb..ee88493 100644 --- a/api/authservice/Dockerfile +++ b/api/authservice/Dockerfile @@ -13,8 +13,5 @@ RUN npm install # Copy the app source code to the working directory COPY . . -# Expose the port the app runs on -EXPOSE 8003 - # Define the command to run your app CMD ["node", "auth-service.js"] From d635b6f9e0052d19344578db9fba2d7b767fe71d Mon Sep 17 00:00:00 2001 From: sergiollende Date: Fri, 22 Mar 2024 14:30:36 +0100 Subject: [PATCH 57/59] Package.json changes --- api/package-lock.json | 4 ++-- api/package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/package-lock.json b/api/package-lock.json index fb819e5..0b6c21c 100644 --- a/api/package-lock.json +++ b/api/package-lock.json @@ -1,11 +1,11 @@ { - "name": "users", + "name": "api", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "users", + "name": "api", "version": "1.0.0", "license": "ISC", "dependencies": { diff --git a/api/package.json b/api/package.json index bc6d132..a9ab1f0 100644 --- a/api/package.json +++ b/api/package.json @@ -1,7 +1,7 @@ { - "name": "users", + "name": "api", "version": "1.0.0", - "description": "User service, in charge of handling users in the application", + "description": "API service, in charge of handling the different clases of the API in the application", "main": "service.js", "scripts": { "start": "node index.js", From 392b3212b346c0d0be834eedcfa12608c6055015 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Fri, 22 Mar 2024 14:59:12 +0100 Subject: [PATCH 58/59] Adding axios --- api/Dockerfile | 2 +- api/package-lock.json | 29 ++++++++++++++++++--------- api/package.json | 1 + api/wikidataservice/package-lock.json | 2 +- api/wikidataservice/package.json | 4 ++-- 5 files changed, 25 insertions(+), 13 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index 22334e4..4898e96 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -8,7 +8,7 @@ WORKDIR /usr/src/api COPY package*.json ./ # Install app dependencies -RUN npm install +RUN npm install --no-cache # Copy the app source code to the working directory COPY . . diff --git a/api/package-lock.json b/api/package-lock.json index 0b6c21c..dc0aea1 100644 --- a/api/package-lock.json +++ b/api/package-lock.json @@ -9,6 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { + "axios": "^1.6.8", "bcrypt": "^5.1.1", "body-parser": "^1.20.2", "cors": "^2.8.5", @@ -1414,8 +1415,17 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/axios": { + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } }, "node_modules/b4a": { "version": "1.6.4", @@ -1846,7 +1856,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, "dependencies": { "delayed-stream": "~1.0.0" }, @@ -2018,7 +2027,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, "engines": { "node": ">=0.4.0" } @@ -2400,10 +2408,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", - "dev": true, + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", @@ -2423,7 +2430,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -4673,6 +4679,11 @@ "node": ">= 0.10" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", diff --git a/api/package.json b/api/package.json index a9ab1f0..056f451 100644 --- a/api/package.json +++ b/api/package.json @@ -18,6 +18,7 @@ }, "homepage": "https://github.com/arquisoft/wiq_en3a#readme", "dependencies": { + "axios": "^1.6.7", "bcrypt": "^5.1.1", "body-parser": "^1.20.2", "cors": "^2.8.5", diff --git a/api/wikidataservice/package-lock.json b/api/wikidataservice/package-lock.json index c7857a7..8644ca9 100644 --- a/api/wikidataservice/package-lock.json +++ b/api/wikidataservice/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "axios": "^1.6.7" + "axios": "^1.6.8" } }, "node_modules/asynckit": { diff --git a/api/wikidataservice/package.json b/api/wikidataservice/package.json index 5af4d8b..ccbfb54 100644 --- a/api/wikidataservice/package.json +++ b/api/wikidataservice/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "axios": "^1.6.7" + "axios": "^1.6.7" } - } \ No newline at end of file +} From 5422d3027a83637b561c94adb1725c81979f4f90 Mon Sep 17 00:00:00 2001 From: sergiollende Date: Fri, 22 Mar 2024 15:10:55 +0100 Subject: [PATCH 59/59] Release.yml to deploy on master --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 091ddf6..dcd39ef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,7 +65,7 @@ jobs: user: ${{ secrets.DEPLOY_USER }} key: ${{ secrets.DEPLOY_KEY }} command: | - wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/api_migration_node/docker-compose.yml -O docker-compose.yml + wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/master/docker-compose.yml -O docker-compose.yml wget https://raw.githubusercontent.com/arquisoft/wiq_en3a/master/.env docker compose --profile prod down docker compose --profile prod up -d --pull always