{"action":"created","issue":{"url":"https://api.github.com/repos/punkave/apostrophe-boilerplate/issues/4","repository_url":"https://api.github.com/repos/punkave/apostrophe-boilerplate","labels_url":"https://api.github.com/repos/punkave/apostrophe-boilerplate/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/punkave/apostrophe-boilerplate/issues/4/comments","events_url":"https://api.github.com/repos/punkave/apostrophe-boilerplate/issues/4/events","html_url":"https://github.com/punkave/apostrophe-boilerplate/pull/4","id":181289969,"number":4,"title":"Add Dockerfile","user":{"login":"alexgleason","id":3639540,"avatar_url":"https://avatars.githubusercontent.com/u/3639540?v=3","gravatar_id":"","url":"https://api.github.com/users/alexgleason","html_url":"https://github.com/alexgleason","followers_url":"https://api.github.com/users/alexgleason/followers","following_url":"https://api.github.com/users/alexgleason/following{/other_user}","gists_url":"https://api.github.com/users/alexgleason/gists{/gist_id}","starred_url":"https://api.github.com/users/alexgleason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexgleason/subscriptions","organizations_url":"https://api.github.com/users/alexgleason/orgs","repos_url":"https://api.github.com/users/alexgleason/repos","events_url":"https://api.github.com/users/alexgleason/events{/privacy}","received_events_url":"https://api.github.com/users/alexgleason/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-10-05T23:22:11Z","updated_at":"2016-10-17T00:44:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/punkave/apostrophe-boilerplate/pulls/4","html_url":"https://github.com/punkave/apostrophe-boilerplate/pull/4","diff_url":"https://github.com/punkave/apostrophe-boilerplate/pull/4.diff","patch_url":"https://github.com/punkave/apostrophe-boilerplate/pull/4.patch"},"body":"See my [issue comment](https://github.com/punkave/apostrophe/issues/619#issuecomment-245484175) on #619 for more information.\r\n\r\nIf you're interested in making this easy for people using Docker, this is something I've used with Apostrophe and it works fine. It's dead simple: all it does is copies the project folder into the [node 6.5.0](https://hub.docker.com/_/node/) Docker image, then runs `npm run start` when the container starts. Since Apostrophe doesn't have any other requirements, this is all we need.\r\n\r\nI've taken an unopinionated ([and best practices](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#/run-only-one-process-per-container)) approach by not including MongoDB in this image. Docker users should know how to make their own separate Mongo container (using [the provided Mongo Docker image](https://hub.docker.com/_/mongo/)) and link it with this one.\r\n\r\nThis works with [a demo Candlewaster site](https://notabug.org/candlewaster/candlewaster-apostrophe) I've built."},"comment":{"url":"https://api.github.com/repos/punkave/apostrophe-boilerplate/issues/comments/254089190","html_url":"https://github.com/punkave/apostrophe-boilerplate/pull/4#issuecomment-254089190","issue_url":"https://api.github.com/repos/punkave/apostrophe-boilerplate/issues/4","id":254089190,"user":{"login":"rwatts3","id":5336137,"avatar_url":"https://avatars.githubusercontent.com/u/5336137?v=3","gravatar_id":"","url":"https://api.github.com/users/rwatts3","html_url":"https://github.com/rwatts3","followers_url":"https://api.github.com/users/rwatts3/followers","following_url":"https://api.github.com/users/rwatts3/following{/other_user}","gists_url":"https://api.github.com/users/rwatts3/gists{/gist_id}","starred_url":"https://api.github.com/users/rwatts3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwatts3/subscriptions","organizations_url":"https://api.github.com/users/rwatts3/orgs","repos_url":"https://api.github.com/users/rwatts3/repos","events_url":"https://api.github.com/users/rwatts3/events{/privacy}","received_events_url":"https://api.github.com/users/rwatts3/received_events","type":"User","site_admin":false},"created_at":"2016-10-17T00:44:34Z","updated_at":"2016-10-17T00:44:34Z","body":"Alex this is great work.  True champion here.  If you'd like id be willing\nto provide docker compose files for production and development\nenvironments.  Also a small read me explaining the awesomeness of docker\nand going from dev to production / staging.  Let me know your thoughts.\n\nOn Sun, Oct 16, 2016, 5:41 PM Alex Gleason <notifications@github.com> wrote:\n\n> I've updated the Dockerfile to mount /data as a persistent volume.\n>\n> @rwatts3 <https://github.com/rwatts3> Thank you! You are right that this\n> just copies in the source files of the project and runs it.\n>\n> Development environment , with forever script running inside Docker\n> container\n>\n> I think you can use the Dockerfile I shared for local development. If you\n> want this configuration you could npm install --save forever and alter\n> the start script inside of package.json to say ./node_modules/forever/bin/forever\n> app.js before you build the image. Then when you run the container, mount\n> your project folder to /app so you can edit the files locally.\n>\n> I've also considered running a file watcher to rebuild and restart the\n> container any time files are changed. I don't know how well it would work\n> but it seems to be more \"correct.\" Local development with Docker still\n> isn't fantastic.\n>\n> Production A : Dockerfile that simply adds the app and packages it for a\n> deployment\n>\n> Yep, that's pretty much what this is!\n>\n> Production B : Dockerfile that creates volumes for persistent data such as\n> images, config settings things that will be saved from Apostrophe to the\n> disk. If we had everything inside of a container. The next build or update\n> of the application would blow out the existing data if it's not stored\n> persistently within a volume ?\n>\n> It looks like only /data needs persistent storage. I've updated my PR to\n> reflect that. Config settings should usually be checked into the git repo\n> and will copy straight into the image without issue.\n>\n> I think this Dockerfile covers all the situations you've mentioned. Let me\n> know if I missed anything.\n>\n> Of course docker compose can also be used to orchestrate your mongodb\n> instance, as well as your development/production containers.\n>\n> Yep! I use Dokku for that personally, but you can do it any way you'd\n> like. I also made a Docker HOWTO PR (punkave/apostrophe-documentation#31\n> <https://github.com/punkave/apostrophe-documentation/pull/31>) to\n> hopefully make this more clear.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/punkave/apostrophe-boilerplate/pull/4#issuecomment-254089001>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AFFsSZ0UrWSXL1dSxmtKoqT0QeCs_18qks5q0sRWgaJpZM4KPZEy>\n> .\n>\n"}}
{"actor":{"display_login":"rwatts3"}}