Dockerfile for React+Django hybrid app


I created and deployed a django app to
Next, I created a react app and configured django to use the build folder of the react app as static files.
Everything works fine locally but now I want to deploy it. There is only one Dockerfile inside Django.
My question is, should I have Dockerfile for both React app and Django app and a Docker compose file to organize both?
Or, should I build the react-app locally and let the Django app to upload the build folder?
My guess is, to make it fully Docker, the react-app should be also compiled in the server. But still wanted to ask.

Is it also possible to use one Dockerfile (default one in Django-app) so I don’t need to maintain a compose.yaml file and another Dockerfile in react-app?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.