Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
AbelMH1 authored May 2, 2024
2 parents 2b489b2 + a4788c8 commit fffbb23
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,17 @@ jobs:
- uses: actions/checkout@v4
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
env:
API_URI: http://${{ secrets.DEPLOY_HOST }}:8000
with:
name: arquisoft/wiq_es6c/webapp
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: webapp
buildargs: API_URI
buildargs: API_URI1, API_URI2
platforms: linux/arm64
env:
API_URI1: http://${{ secrets.DEPLOY_HOST }}:8000
API_URI2: http://${{ secrets.DEPLOY_HOST }}:8100
docker-push-authservice:
name: Push auth service Docker Image to GitHub Packages
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ services:
build: ./webapp
depends_on:
- gatewayservice
- apisgatewayservice
ports:
- "3000:3000"
restart: always
Expand Down
2 changes: 1 addition & 1 deletion webapp/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
REACT_APP_API_ENDPOINT=http://localhost:8000
REACT_APIS_ENDPOINT=http://localhost:8100
REACT_APP_APIS_ENDPOINT=http://localhost:8100
7 changes: 5 additions & 2 deletions webapp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ WORKDIR /app
#Install the dependencies
RUN npm install

ARG API_URI="http://localhost:8000"
ENV REACT_APP_API_ENDPOINT=$API_URI
ARG API_URI1="http://localhost:8000"
ENV REACT_APP_API_ENDPOINT=$API_URI1

ARG API_URI2="http://localhost:8100"
ENV REACT_APP_APIS_ENDPOINT=$API_URI2

#Create an optimized version of the webapp
RUN npm run build
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/storeQuestion/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function App() {
const [currentPage, setCurrentPage] = useState(1);
const itemsPerPage = 10; // Número de preguntas por página

const apiEndpoint = process.env.REACT_APIS_ENDPOINT || 'http://localhost:8100';
const apiEndpoint = process.env.REACT_APP_APIS_ENDPOINT || 'http://localhost:8100';

useEffect(() => {
const obtenerPreguntas = async () => {
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/usersRanking/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ function App() {
const [currentPage, setCurrentPage] = useState(1);
const itemsPerPage = 10; // Número de usuarios por página

const apiEndpoint = process.env.REACT_APIS_ENDPOINT || 'http://localhost:8100';
const apiEndpoint = process.env.REACT_APP_APIS_ENDPOINT || 'http://localhost:8100';
console.log(process.env.REACT_APP_APIS_ENDPOINT)

useEffect(() => {
const obtenerUsuarios = async () => {
Expand Down

0 comments on commit fffbb23

Please sign in to comment.