Betarena / boilerplate

Betarena Template Repository
0 stars 0 forks source link

[Bug-AN]: Production Deployment #8

Open migbash opened 1 month ago

migbash commented 1 month ago

Is there an existing issue for this?

🐞 Describe the bug

The production deployment step for the Api-Narratives appears to be not working.

🤔 Expected Behavior

Should be working automatically.

(optional) 🖥️ Console Logs (or similar)

Only detected error, but it is set to be handled by the docker build and ignored.

https://github.com/Betarena/apidatanarratives/actions/runs/9298172552/job/25589586471

[..]
out: make[1]: Entering directory '/***/apidatanarratives'
err: /bin/sh: 2: npx: not found
err: make[1]: *** [Makefile:7: LOG_BOX] Error 127
out: make[1]: Leaving directory '/***/apidatanarratives'
out: #1 [api internal] load build definition from prod.Dockerfile
out: #1 transferring dockerfile: 534B done
out: #1 DONE 0.0s
[..]

(optional) 📌 Additional Information

📆 First detected on:

A while back, in some of the deployments that seem to have not been reflecting the latest changes of the origin/main.

📌 Potential initial theorized cause(s)/solution(s):

  1. Could be due to the npx issue (not present in the VM), but is set to be handled.
  2. Otherwise, needs to investigated.
  3. Or a simple solution is to update the deployment script to use the (below) workaround steps and its fixed.

🩹 Workarounds:

  1. Doing the following:
docker stop betarena-api-backend-api-1
docker rm betarena-api-backend-api-1
(inside `~/apidatanarratives`) :: make docker-compose-start

works and gets the correct cotnainer up and running with the correct latest changes.