Containerize the app
In order to deploy by using gitlab CI the apps should be somehow containerized. It can be done in multiple ways, for instance:
- docker and docker compose
- One nxginx/application or all apps in the same nxginx
I put the code I did quickly for inspiration. Run:
docker compose build
docker compose run
It should starts two instances of nxginx at port 3000 and 4000.
However, I have the feeling that a single server with all the apps (it fixes the problem of port 3000) might have benefits. Procedure described here: https://medium.com/@mattklein123/monorepos-please-dont-e9a279be011b