ctrlplusb / react-universally

A starter kit for universal react applications.
MIT License
1.7k stars 244 forks source link

Is there any information on deploying React Universally as a Docker container #451

Closed mschipperheyn closed 7 years ago

mschipperheyn commented 7 years ago

I have my React Universally running on Heroku right now, but I love the idea of being more flexible (and cheaper) by using Docker to deploy it on more generic cloud environments. I have a hard time finding easily applicable info though on using Docker for Node, ReactJS and possible even React Universally containers. I was wondering if you guys have any tips on this topic?

sergiokopplin commented 7 years ago

I'm not a Docker specialist, but here are my docker files: https://gist.github.com/sergiokopplin/3eefa390b62b22d4d97c6cb68afb162f

Running with beanstalk + ec2 (Amazon)

mschipperheyn commented 7 years ago

I'm successfully deploying now with Dokku and happy with it. Pretty smooth experience. Only thing to be mindful of is memory related issues if you're using a small server, because it leads to strange errors that seem to be unrelated to memory.

eurobob commented 7 years ago

@sergiokopplin how do I use those files? Just place them in my root dir and then....?

I think i'm a bit confused with how it all works. I'm used to setting up continuous integration that watches my git repository. With docker do I update the image and then deploy that? Does the docker image include the application or does it also fetch from git?

Thanks in advance, A confused developer 😖

sergiokopplin commented 7 years ago

Hello @eurobob Yeap, root dir! We use Teamcity as a ci runner, so we configure there the build steps via entrypoint inside the ec2 on amazon.

Tell me more about your structure, so i can help you more.