Deploying nested repo

Currently my src folder has to be deployed which contains its own package.json, and I would like to npm install and build the frontend as well, which has it’s own package.json
fly deploy is deploying src currectly, but for frontend it is taking as is from local and deploying without npm install & building it on the server

|─ src
| |─ package.json
| |─ frontend
| | |─ package.json

There are many ways this can be done.

You’d probably want two fly apps, one for your outer folder and one for your frontend folder. Both would have a fly.toml and maybe a Dockefile of their own.

Another alternative would be crafting a Dockerfile that knows how to build both projects and how to host them together on the same instance which depends a lot on which technologies you use.

1 Like