Skip to content

Commit

Permalink
Intento de arreglar el despliegue
Browse files Browse the repository at this point in the history
  • Loading branch information
uo282189 committed Mar 11, 2024
1 parent d77db5e commit ddb97a6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ jobs:
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
env:
API_URI: http://${{ secrets.DEPLOY_HOST }}:8000
REACT_APP_API_URI: http://${{ secrets.DEPLOY_HOST }}:8000
with:
name: arquisoft/wiq_es05c/webapp
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: webapp
buildargs: API_URI
buildargs: REACT_APP_API_URI
docker-push-authservice:
name: Push auth service Docker Image to GitHub Packages
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions webapp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ WORKDIR /app
#Install the dependencies
RUN npm install

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

#Create an optimized version of the webapp
RUN npm run build
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/AddUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { useState } from 'react';
import axios from 'axios';
import { Container, Typography, TextField, Button, Snackbar } from '@mui/material';

const apiEndpoint = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000';
const apiEndpoint = process.env.REACT_APP_API_URI || 'http://localhost:8000';

const AddUser = () => {
const [username, setUsername] = useState('');
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Login = () => {
const [createdAt, setCreatedAt] = useState('');
const [openSnackbar, setOpenSnackbar] = useState(false);

const apiEndpoint = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000';
const apiEndpoint = process.env.REACT_APP_API_URI || 'http://localhost:8000';

const loginUser = async () => {
try {
Expand Down

0 comments on commit ddb97a6

Please sign in to comment.