Skip to content

Commit

Permalink
Añade cambios extras para que funcione el despliegue
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardevelopingstuff committed Apr 4, 2022
1 parent f65bde2 commit 2af0ec1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/asw2122.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:
- run: npm --prefix webapp run test:e2e
docker-push-webapp:
name: Push webapp Docker Image to GitHub Packages
env:
API_URI: http://${{ secrets.DEPLOY_HOST }}:5000/api
runs-on: ubuntu-latest
needs: [e2e-tests]
steps:
Expand Down
3 changes: 2 additions & 1 deletion restapi/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ app.use(expressSession({
const metricsMiddleware:RequestHandler = promBundle({includeMethod: true});
app.use(metricsMiddleware);

app.use(cors(options));
//app.use(cors(options));
app.use(cors())
app.use(bp.json());

app.use("/api", api);
Expand Down
2 changes: 2 additions & 0 deletions webapp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ WORKDIR /app
RUN npm install

#Create an optimized version of the webapp
ARG API_URI="http://localhost:5000/api"
ENV REACT_APP_API_URI=$API_URI
RUN npm run build

#Ver como podemos llamar npm run prod aquí
Expand Down

0 comments on commit 2af0ec1

Please sign in to comment.