{"id":13661526,"url":"https://github.com/jshimko/meteor-launchpad","last_synced_at":"2025-04-05T09:10:27.798Z","repository":{"id":45426481,"uuid":"63033975","full_name":"jshimko/meteor-launchpad","owner":"jshimko","description":"A base Docker image for Meteor applications.","archived":false,"fork":false,"pushed_at":"2024-03-01T17:44:43.000Z","size":101,"stargazers_count":276,"open_issues_count":44,"forks_count":153,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-29T08:11:15.146Z","etag":null,"topics":["docker","meteor","meteor-launchpad","mongo"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/jshimko/meteor-launchpad/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jshimko.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-11T03:33:18.000Z","updated_at":"2024-09-13T02:30:24.000Z","dependencies_parsed_at":"2024-08-02T05:10:58.322Z","dependency_job_id":null,"html_url":"https://github.com/jshimko/meteor-launchpad","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jshimko%2Fmeteor-launchpad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jshimko%2Fmeteor-launchpad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jshimko%2Fmeteor-launchpad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jshimko%2Fmeteor-launchpad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jshimko","download_url":"https://codeload.github.com/jshimko/meteor-launchpad/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312085,"owners_count":20918344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","meteor","meteor-launchpad","mongo"],"created_at":"2024-08-02T05:01:36.451Z","updated_at":"2025-04-05T09:10:27.754Z","avatar_url":"https://github.com/jshimko.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"[![Circle CI](https://circleci.com/gh/jshimko/meteor-launchpad/tree/master.svg?style=svg)](https://circleci.com/gh/jshimko/meteor-launchpad/tree/master)\n# Meteor Launchpad - Base Docker Image for Meteor Apps\n\n### Build\n\nAdd the following to a `Dockerfile` in the root of your app:\n\n```Dockerfile\nFROM jshimko/meteor-launchpad:latest\n```\n\nThen you can build the image with:\n\n```sh\ndocker build -t yourname/app .\n```\n\n**Setting up a .dockerignore file**\n\nThere are several parts of a Meteor development environment that you don't need to pass into a Docker build because a complete production build happens inside the container.  For example, you don't need to pass in your `node_modules` or the local build files and development database that live in `.meteor/local`.  To avoid copying all of these into the container, here's a recommended starting point for a `.dockerignore` file to be put into the root of your app.  Read more: https://docs.docker.com/engine/reference/builder/#dockerignore-file\n\n```\n.git\n.meteor/local\nnode_modules\n```\n\n### Run\n\nNow you can run your container with the following command...\n(note that the app listens on port 3000 because it is run by a non-root user for [security reasons](https://github.com/nodejs/docker-node/issues/1) and [non-root users can't run processes on port 80](http://stackoverflow.com/questions/16573668/best-practices-when-running-node-js-with-port-80-ubuntu-linode))\n\n```sh\ndocker run -d \\\n  -e ROOT_URL=http://example.com \\\n  -e MONGO_URL=mongodb://url \\\n  -e MONGO_OPLOG_URL=mongodb://oplog_url \\\n  -e MAIL_URL=smtp://mail_url.com \\\n  -p 80:3000 \\\n  yourname/app\n```\n\n#### Delay startup\n\nIf you need to force a delay in the startup of the Node process (for example, to wait for a database to be ready), you can set the `STARTUP_DELAY` environment variable to any number of seconds.  For example, to delay starting the app by 10 seconds, you would do this:\n\n```sh\ndocker run -d \\\n  -e ROOT_URL=http://example.com \\\n  -e MONGO_URL=mongodb://url \\\n  -e STARTUP_DELAY=10 \\\n  -p 80:3000 \\\n  yourname/app\n```\n\n### Build Options\n\nMeteor Launchpad supports setting custom build options in one of two ways.  You can either create a launchpad.conf config file in the root of your app or you can use [Docker build args](https://docs.docker.com/engine/reference/builder/#arg).  The currently supported options are to install PhantomJS, GraphicsMagick, MongoDB, or any list of `apt-get` dependencies (Meteor Launchpad is built on `debian:jesse`).  \n\nIf you choose to install Mongo, you can use it by _not_ supplying a `MONGO_URL` when you run your app container.  The startup script will then start Mongo inside the container and tell your app to use it.  If you _do_ supply a `MONGO_URL`, Mongo will not be started inside the container and the external database will be used instead.\n\nNote that having Mongo in the same container as your app is just for convenience while testing/developing.  In production, you should use a separate Mongo deployment or at least a separate Mongo container.\n\nHere are examples of both methods of setting custom options for your build:\n\n**Option #1 - launchpad.conf**\n\nTo use any of them, create a `launchpad.conf` in the root of your app and add any of the following values.\n\n```sh\n# launchpad.conf\n\n# Use apt-get to install any additional dependencies\n# that you need before your building/running your app\n# (default: undefined)\nAPT_GET_INSTALL=\"curl git wget\"\n\n# Install a custom Node version (default: latest 8.x)\nNODE_VERSION=8.9.0\n\n# Installs the latest version of each (default: all false)\nINSTALL_MONGO=true\nINSTALL_PHANTOMJS=true\nINSTALL_GRAPHICSMAGICK=true\n```\n\n**Option #2 - Docker Build Args**\n\nIf you prefer not to have a config file in your project, your other option is to use the Docker `--build-arg` flag.  When you build your image, you can set any of the same values above as a build arg.\n\n```sh\ndocker build \\\n  --build-arg APT_GET_INSTALL=\"curl git wget\" \\\n  --build-arg INSTALL_MONGO=true \\\n  --build-arg NODE_VERSION=8.9.0 \\\n  -t myorg/myapp:latest .\n```\n\n## Installing Private NPM Packages\n\nYou can provide your [NPM auth token](http://blog.npmjs.org/post/118393368555/deploying-with-npm-private-modules) with the `NPM_TOKEN` build arg.\n\n```sh\ndocker build --build-arg NPM_TOKEN=\"\u003cyour token\u003e\" -t myorg/myapp:latest .\n```\n\n## Development Builds\n\nYou can optionally avoid downloading Meteor every time when building regularly in development.  Add the following to your Dockerfile instead...\n\n```Dockerfile\nFROM jshimko/meteor-launchpad:devbuild\n```\n\nThis isn't recommended for your final production build because it creates a much larger image, but it's a bit of a time saver when you're building often in development.  The first build you run will download/install Meteor and then every subsequent build will be able to skip that step and just build the app.\n\n## Meteor.settings\n\nIf you want to include custom settings (as you would via a [settings.json file](https://docs.meteor.com/api/core.html#Meteor-settings)), you need to set the METEOR_SETTINGS environment variable:\n\n```sh\ndocker run -d \\\n  -e ROOT_URL=http://example.com \\\n  -e MONGO_URL=mongodb://url \\\n  -e MONGO_OPLOG_URL=mongodb://oplog_url \\\n  -e MAIL_URL=smtp://mail_url.com \\\n  -e METEOR_SETTINGS=\"$(cat settings.json)\" \\\n  -p 80:3000 \\\n  yourname/app\n```\n\n## Docker Compose\n\nAdd a `docker-compose.yml` to the root of your project with the following content and edit the app image name to match your build name.  Everything else should work as-is.\n\n```yaml\n# docker-compose.yml\n\napp:\n  image: yourname/app\n  ports:\n    - \"80:3000\"\n  links:\n    - mongo\n  environment:\n    - ROOT_URL=http://example.com\n    - MONGO_URL=mongodb://mongo:27017/meteor\n\nmongo:\n  image: mongo:latest\n  command: mongod --storageEngine=wiredTiger\n```\n\nAnd then start the app and database containers with...\n\n```sh\ndocker-compose up -d\n```\n\n## Custom Builds of Meteor Launchpad\n\nIf you'd like to create a custom build for some reason, you can use the `build.sh` script in the root of the project to run all of the necessary commands.\n\nFirst, make any changes you want, then to create your custom build:\n\n```sh\n# builds as jshimko/meteor-launchpad:latest\n./build.sh\n```\n\n## License\n\nMIT License\n\nCopyright (c) 2017 Jeremy Shimko\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjshimko%2Fmeteor-launchpad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjshimko%2Fmeteor-launchpad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjshimko%2Fmeteor-launchpad/lists"}