angular-fullstack / generator-angular-fullstack

Yeoman generator for an Angular app with an Express server
https://awk34.gitbook.io/generator-angular-fullstack
6.12k stars 1.24k forks source link

Interest in Docker builds? #516

Open kingcody opened 10 years ago

kingcody commented 10 years ago

Label: Question, Feature

Recent deployment questions/issues related to generator-angular-fullstack have got me wondering what people are using to deploy their fullstack projects. I know Heroku and OpenShift are fairly popular options and are supported by the generator; however in our setups we typically package the applications in a VM or Linux container such as Docker.

We've really come to love using Docker here recently and the support/community is awesome. If you develop and or deploy with Linux, I'd highly recommend you check it out.

All that being said, I have fairly decent experience creating Dockerfiles and would not mind adding/supporting a generator-angular-fullstack Dockerfile for this project. Would that be something that users here would like to see? If there is enough interest I'll gladly put together a PR and the documentation on the various ways one might build/deploy a 'fullstack' docker image.

thomporter commented 10 years ago

Currently I'm deploying a project created by this generator to a host that's using Phusion Passenger on top of Apache. It works quite well, and for anyone interested there's a decent tutorial on setting it up on Apache or Nginx or just standalone, here.

But I've also had some experience with Docker, and I'd agree, it's freakin' awesome! I'd have to say :+1: to Docker support!

kingcody commented 10 years ago

@thomporter thats really cool. I've used nginx + passenger before, good stuff. On our VM cluster we use Puppet + garethr/docker to deploy application dockers from our private registry.

However, recently I've been playing around with a small CoreOS cluster which uses etcd and fleet to deploy, monitor, and manage our docker applications; and I've gotta say, the setup shows some pretty powerful potential.

kingcody commented 10 years ago

On the topic of Docker deployment I'd like to share another project that I've been keeping my eye on: kubernetes.

Kubernetes is an open source implementation of container cluster management.

It can be used to manage and deploy your applications (in Docker containers) on GCE. Users of Microsoft's Azure cloud have support for the project as well.

JaKXz commented 10 years ago

:+1: this would be awesome, I've heard great things about Docker.

mousetree commented 10 years ago

:+1:

kingcody commented 10 years ago

I've put together an automated nodejs, bower, and grunt runtime image to use with 'yeoman styled' projects, generator-angular-fullstack in particular. I based the image off of dockerfile/nodejs-bower-grunt which is also an automated build, which I've setup to trigger rebuilds of the runtime image on updates. The github repo for the runtime can be found here.

I'm planning on using this image as a base for the Dockerfile that would be included with newly generated projects. If anyone would like to contribute to the project please feel free to open an issue or submit a pull request and we'll be happy to take a look.

/cc @JaKXz @DaftMonk

DaftMonk commented 10 years ago

:+1: Sounds like an awesome idea.

programming-kid commented 9 years ago

i am facing problem installing yo on docker as docker containers runs as root and yo cannot be installed as root any help with this will be really appreciated

thanks

kingcody commented 9 years ago

@programming-kid, why install yo in the container? Wouldn't it be easier to add your generated project code to a docker image?

Have you by chance tried using the example Dockerfile in a generated project:

FROM digitallyseamless/nodejs-bower-grunt-runtime

You should just be able to run docker build -t myApp . and have a docker image of your project built and tagged as myApp.

programming-kid commented 9 years ago

oops my bad i started with docker yesterday i was using docker as vagrant perhaps i am missing something here i usually create different vagrant box for different project i was trying to do same with docker,

perhaps you could guide me what is best way to use docker for different projects using fullstack-generator i wanted yo in docker as i wanted to deploy to heroku from docker container as using multiple heroku accounts on same machine (My dev Machine) is real big problem

kingcody commented 9 years ago

@programming-kid not a problem. I think that its really cool you're trying to learn some docker :smile:

Have you by chance checked out the usage section of our(Digitally Seamless) nodejs-bower-grunt-runtime image? Its pretty easy to create a docker image with a fullstack project and that runtime as your base, you just need the one-line Dockerfile and docker build (see usage for full details).

Let me know if you need any help or additional usage info.

programming-kid commented 9 years ago

thanks @kingcody i will try it and let you know my experience

jankareddi commented 9 years ago

In my case, I had compass included. which called for a ruby dependency. I ended up having to include and compile ruby in the docker build process (my base is nodejs-bower-grunt). I have it working but is there a better option?

kingcody commented 9 years ago

@jankareddi adding ruby to the base image as a layer would be optimal. For the runtime we use, we have several feature branches that we use when we need additional dependencies. I'd be glad to add a ruby branch to repo so you can try that out.

Of course you can make your own or use an existing one from the docker registry. Either way, I'll let you know when I get a ruby layer posted to our runtime.

jankareddi commented 9 years ago

thanks @kingcody.

kingcody commented 9 years ago

@jankareddi nodejs-bower-grunt-runtime:compass-support

Let me know how that works out for you. If you have any problems please feel free to post them in the repo's issues section and I'll be sure to address them. Thanks :smile:

ralyodio commented 9 years ago

+1 for docker support

molerat619 commented 9 years ago

+1

rustygreen commented 9 years ago

+1

shoremark commented 9 years ago

+1

munjalpatel commented 9 years ago

+1 -- This would be great

chinnichaitanya commented 9 years ago

:+1:

ralyodio commented 9 years ago

+1

nguyenDalex commented 9 years ago

+1