All Projects → zodern → meteor-docker

zodern / meteor-docker

Licence: MIT license
Docker image for Meteor.

Programming Languages

shell
77523 projects
javascript
184084 projects - #8 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to meteor-docker

Meteor-Mailer
📮 Bulletproof email queue on top of NodeMailer with support of multiple clusters and servers setup
Stars: ✭ 21 (-48.78%)
Mutual labels:  meteor
Meteor-Tutorials
Meteor官方教程(中文翻译)
Stars: ✭ 44 (+7.32%)
Mutual labels:  meteor
meteor-video-chat
Simple id based video calling in meteor
Stars: ✭ 33 (-19.51%)
Mutual labels:  meteor
Block-Farm
A farming game built upon Ethereum platform.
Stars: ✭ 60 (+46.34%)
Mutual labels:  meteor
grapher-vue
Integrates Vue with Grapher in an easy-to-use way
Stars: ✭ 19 (-53.66%)
Mutual labels:  meteor
Meteor-logger-mongo
🍃 Meteor Logging: Store application log messages in MongoDB
Stars: ✭ 20 (-51.22%)
Mutual labels:  meteor
meteor-blaze-bs4
Generic Bootstrap 4 components library for Meteor Blaze.
Stars: ✭ 20 (-51.22%)
Mutual labels:  meteor
crater
Meteor/Webpack/React SSR app skeleton that runs your app code outside of Meteor Isobuild
Stars: ✭ 82 (+100%)
Mutual labels:  meteor
graphqlizer
Make your meteor mongo collections accessible over a graphql endpoint
Stars: ✭ 37 (-9.76%)
Mutual labels:  meteor
meteor-devtools-evolved
The Meteor framework development tool belt, evolved.
Stars: ✭ 146 (+256.1%)
Mutual labels:  meteor
node-on-fhir
Tech stack for building MACRA and 21st Century Cures compliant webapps.
Stars: ✭ 75 (+82.93%)
Mutual labels:  meteor
React-Hue
🎨 A Material color palette tool based on Meteor, React, Material UI.
Stars: ✭ 45 (+9.76%)
Mutual labels:  meteor
braintree-meteor-example
A simple Meteor and Braintree drop-in integration
Stars: ✭ 25 (-39.02%)
Mutual labels:  meteor
meteor-astrocoders-publish
Smartly re-use Meteor publications logic
Stars: ✭ 33 (-19.51%)
Mutual labels:  meteor
hypersubs
an upgraded version of Meteor subscribe, which helps optimize data and performance!
Stars: ✭ 13 (-68.29%)
Mutual labels:  meteor
meteor-search
🔍 SPIKE of full-text search in MongoDB using Meteor
Stars: ✭ 40 (-2.44%)
Mutual labels:  meteor
redoc
redoc - generate documentation from multiple project repos.
Stars: ✭ 21 (-48.78%)
Mutual labels:  meteor
meteor-application-template-react
Template for application development using Meteor, Bootstrap 5, and React
Stars: ✭ 2 (-95.12%)
Mutual labels:  meteor
auto-analytics
UNMAINTAINED! - Complete Google Analytics, Mixpanel, KISSmetrics (and more) integration for JavaScript applications.
Stars: ✭ 28 (-31.71%)
Mutual labels:  meteor
astroapp-rn-boilerplate
AstroApp, all backend React Native app boilerplate
Stars: ✭ 13 (-68.29%)
Mutual labels:  meteor

zodern/meteor Docker Image

GitHub Workflow Status Docker Pulls

Docker image to run Meteor apps.

Features

  • One image supports every Meteor version
  • Automatically uses correct node and npm version
  • Runs app as non-root user
  • Compatible with Meteor up

Tags

  • zodern/meteor The recommended version. Runs the app as a non-root user.
  • zodern/meteor:root Compatible with meteord. Runs the app as the root user and has phantomjs installed. Any notes below about permissions do not apply to this image.
  • zodern/meteor:slim Coming soon. Is a smaller image without node or npm pre-installed. During ONBUILD or when starting the app, it will install the correct version.

How To Use

Permissions

This image runs the app with the app user. The owner of any files or folders your app uses inside the Docker container should be changed to app.

Meteor Up

In your mup config, change app.docker.image to zodern/meteor.

If you want to use mup's buildInstructions option to run commands as root, you can do so by temporarily changing the user:

buildInstructions: [
  'USER root',
  'RUN apt-get update && apt-get install -y imagemagick graphicsmagick',
  'USER app'
]

Compressed bundle

You can create the bundle with the meteor build command. The bundle should be available in the container at /bundle/bundle.tar.gz.

Dockerfile

Create a file named Dockerfile and add the following:

FROM zodern/meteor
COPY --chown=app:app ../path/to/bundle.tar.gz /bundle/bundle.tar.gz

Then build and run the image with

docker build --build_arg EXACT_NODE_VERSION=<true || false> --build-arg NODE_VERSION=<node version> -t meteor-app .
docker run --env NODE_VERSION=<node version> --env EXACT_NODE_VERSION=<true || false> --name my-meteor-app meteor-app

And your app will be running on port 3000

The (--build-arg || --env) NODE_VERSION=<node version> is optional, and only needed if a command in your docker file will use a specific node or npm version.

If any Node versions in image/setup/versions.json match the same major version of Node your app needs, the version in versions.json is used instead since it will have additional security fixes missing in the version Meteor specifies. If there is no matching major version, it will use the exact version Meteor specifies. To always use the exact version, you can use set (--build-arg || --env) EXACT_NODE_VERSION=true

Volume

Run

  docker run --name my-meteor-app -v /path/to/folder/with/bundle:/bundle -p 3000:3000 -e "ROOT_URL=http://app.com" zodern/meteor

Built app

Built app refers to an uncompressed bundle that already has had it's npm dependencies installed.

When using a compressed bundle, the bundle is decompressed and the app's npm dependencies are installed every time the app is started, which can take a while. By using this method instead, both steps are done before the container is started, allowing it to start much faster. Meteor up's Prepare Bundle feature uses this.

Before following the instructions in either of the next two sections, build your app with meteor build --directory ../path/to/put/bundle.

The bundle should be available in the container at /built_app.

Docker Image

Create a file named Dockerfile and copy the following into it:

FROM zodern/meteor
COPY --chown=app:app ./path/to/bundle /built_app
RUN cd /built_app/programs/server && npm install

Then build and run your image with:

docker build -t meteor-app --build-arg NODE_VERSION="node version" .
docker run --name my-meteor-app -p 3000:3000 -e "ROOT_URL=http://app.com" meteor-app

Volume

If possible, you should create a docker image as described in the previous instructions since it is more reliable.

First, make sure you have the correct version of node installed for the Meteor version your app uses, and then run

cd /path/to/bundle
cd programs/server
npm install

Next, start the docker container with

docker run --name my-meteor-app -v /path/to/bundle:/built_app -p 3000:3000 -e "ROOT_URL=http://app.com" zodern/meteor

Options

NPM_INSTALL_OPTIONS

When using a compressed bundle, you can specify the arguments used when running npm install by setting the environment variable NPM_INSTALL_OPTIONS.

Contributing

Tests can be run with npm test. The tests can not be run on Windows, though WSL does work. Docker should be installed before running the tests.

Commit messages should start with one of these to allow the changelog and version to be updated correctly:

  • fix: fixes a bug
  • feat: adds a feature
  • perf:
  • docs:
  • chore:
  • ci:

If the change is a breaking change, add BREAKING CHANGE: to the commit description

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].