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