wellyshen / react-cool-starter

😎 🐣 A starter boilerplate for a universal web app with the best development experience and a focus on performance and best practices.
MIT License
1.31k stars 242 forks source link

[Discussion] Feature branch: docker-ise #67

Closed jmsherry closed 6 years ago

jmsherry commented 7 years ago

Hi there, Loving it so far! One thing missing, for me, is a Dockerfile. I'm trying to make one now, and I'll do a pull request when I get it working. (So far I'm hitting some issues, but once I resolve them I'll do the PR.)

Thanks :)

wellyshen commented 7 years ago

@jmsherry Thank you for give this project a try. For the Dockerfile, I'm wondering if it should be included into this starter because developer who loves this starter's simple and pure. I think fork is better for personal needs :)

jmsherry commented 7 years ago

@wellyshen It's your baby, so sure and no probs. ;) In an age where containerisation is going to become the norm, I'd suggest in the future thinking about maybe a branch of the project or a 'recipe' which allows it! :)

wellyshen commented 7 years ago

@jmsherry Nice man, I agree with the idea of "containerisation". But I'm not familiar with it now (Docker). If you like to help me maintain the new repo (I mean a repo for Docker). I'm willing to invite you as the member of this repo, how about it?

jmsherry commented 7 years ago

@wellyshen Sure! Sounds great! Count me in... 👍

wellyshen commented 7 years ago

@jmsherry Done :)

peteraba commented 7 years ago

@jmsherry do you have some progress on this?

jmsherry commented 7 years ago

@peteraba Sorry, I'm on a crazy project but it is dockerised and live on AWS here: https://cd-lb-2005177905.eu-west-2.elb.amazonaws.com

Pull Request: https://github.com/wellyshen/react-cool-starter/pull/71

peteraba commented 7 years ago

@jmsherry thanks a lot, looks promising. I'll give it a spin today.

peteraba commented 7 years ago

@jmsherry sorry it took a bit longer than expected. Anyway I tested your changes based on node:alpine and it seems to work just fine, thanks a lot!

jmsherry commented 7 years ago

Thanks @peteraba Good to know! 👍

wellyshen commented 7 years ago

@jmsherry Any process for this branch?

jmsherry commented 7 years ago

Hi @wellyshen , So, I've used your boilerplate to create a live site that will be launched in a few days!! (Don't ask why it's live already... smdh). URL: https://www.clothes-doctor.com

As regards the docker branch, it looks right to me, you'll have to do an integration check on your own (as my system may have globals installed that I'm unaware of).

The code looks right. If you check out the docker branch, then:

Run: docker build -t rcs:0.0.1 . then docker run -it --rm -p 80:80 rcs:0.0.1 then visit localhost in your browser... If it works then you're dockerised... :)

wellyshen commented 7 years ago

Hi @jmsherry, The duplicated server.js still there. I'd like to simplify the code files for our developers. Would you refine it base on the latest commit master branch?

jmsherry commented 7 years ago

Hi @wellyshen , that must have been a mistake when doing a pull req manually. I've removed it now and updated the docker file to use the latest version of node 7. I've pushed the changes to the docker branch. Sorry about the confusion...

jmsherry commented 7 years ago

BTW, I don't know if you know about this: https://hub.docker.com/r/library/node/tags/

Everything except the alpine build has a vulnerability at present. Just FYI.

jmsherry commented 7 years ago

@wellyshen Do you need anything from me for this??

wellyshen commented 7 years ago

@jmsherry Yea, just keep all the files and dependencies are synced with the master repo ;)

martin2786 commented 7 years ago

hi @jmsherry your site looks cool! just out curiosity, are you running it with docker? how are you hosting it?

jmsherry commented 7 years ago

@martin2786 Thanks man! Yes it's running with docker. :)

We originally hosted it on AWS, using EC2 and ECR service. We've now moved it to App Engine for cost reasons...

wellyshen commented 7 years ago

@martin2786, I'm keeping maintain the master branch. Do you have time to update the docker branch?

martin2786 commented 7 years ago

Hi @wellyshen I'll be glad to keep it up to date. I'll work on it on the next week. Thanks!

wellyshen commented 7 years ago

@martin2786 Sorry I should cue @jmsherry. But if you want to maintain the branch. Please do it man ;)

wellyshen commented 6 years ago

@jmsherry Any update for it?

jmsherry commented 6 years ago

Hi @wellyshen , sorry I've got a CRAZY job atm.

I've just pushed an update to move node version to 9.2.1

wellyshen commented 6 years ago

@jmsherry OK I see. I did lot improvements. Can you help to sync the docker repo with master when you are free.

jmsherry commented 6 years ago

@wellyshen I merged with the master branch, so it should be up to date(?!)

wellyshen commented 6 years ago

@jmsherry OK cool. Make sure it can pass through CI. Thank you for your help ;)

jmsherry commented 6 years ago

@wellyshen It passes linting, testing, flow, etc. locally - do I have to do anything after I've pushed to the docker branch?

wellyshen commented 6 years ago

@jmsherry Seems everything OK. Just push it.

jmsherry commented 6 years ago

@wellyshen I have pushed it to the docker branch of this repo. You do want it to stay in the docker branch, right?

wellyshen commented 6 years ago

@jmsherry Yea, I have added the instruction of docker branch on README for developers who need it.

FloMedja commented 6 years ago

@jmsherry thanks you for your docker implementation sharing. I am curious to know why you install node-gyp in your dockerfile. Is that package required ?

jmsherry commented 6 years ago

@FloMedja That library was missing at the time and one of this project's dependencies required it. (It may not be missing now - comment out that line and rebuild & run - see what you get... If no error then happy days! Let us know and I'll remove it.)

FloMedja commented 6 years ago

@jmsherry I remove node-gyp and everything work fine. The image build process download the node-gyp in node-modules anyway. On my implementation i run yarn build in dockerfile to make container starting faster. Thanks again for your help :)

wellyshen commented 6 years ago

@jmsherry I have done some improvements and a new feature (code-splitting). Could you please help me upgrade the repo of docker to the latest commit version.

taime commented 5 years ago

I think we should add docker files to repo! Is there any explanation why do we still do not have it in repo?

taime commented 5 years ago

@jmsherry could you please share your docker files with me?