I am not able to wrap my brain around the deployment on different servers. I want to have a public interface, the management of the data has to happen in a private network.
Am I right that
- I need two distinct
config/server.js
at build time, one for the API (backend) and one for the adminpanel- I can use environment varaibles here
- for the backend the
url
parameter is the fully qualified user-visible URL - for the adminpanel the
url
parameter is the fully qualified user-visible backend URL
- the
config/database.js
andconfig/admin.js
can be configured at runtime- the
url
parameter in bothconfig/admin.js
can be the fully qualified frontend URL
- the
- I have to build twice with the different
config/server.js
files-
yarn install --frozen-lockfile --production
for the backend -
yarn install --frozen-lockfile
+yarn build
for the admin panel instance
-
- the instances share the same database
Or did I get something completely wrong?