Skip to content

Commit

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

# Take API_URI as a build argument
ARG API_URI
#tomar los valores de las variables de entorno del buildargs
ARG DEPLOY_HOST
ARG DEPLOY_PORT

# Set API_URI as an environment variable
ENV API_URI=$API_URI
ENV API_URI=http://${DEPLOY_HOST}:${DEPLOY_PORT}

#Create an optimized version of the webapp
RUN npm run build
Expand Down

0 comments on commit b6714a0

Please sign in to comment.