DEV Community

Discussion on: Dockerizing a React.js app

Collapse
 
bazen profile image
Bazen

Nice article, just minor thing to point out its common practice to have environment variables for an app and pass their value from your compose file. it would be nice if you could mention somethings how to deal with that when it comes to SPA(react in your case).

Collapse
 
abdennour profile image
abdennour

Seems like a 12factor guy! here you go : github.com/abdennour/go-to-do-app/...
Then, use it as initContainer in k8s: github.com/abdennour/go-to-do-app/...

Good luck with OS agnostic configuration!

Collapse
 
rsbh profile image
Rishabh Mishra

yes, i missed that as i was not using any env variables in the example app.

Collapse
 
abdennour profile image
abdennour

BTW, I had a full course about cloud native transformation with docker and docker-compose : udemy.com/course/cloud-native-dock...

Happy learning!