Skip to content

Instantly share code, notes, and snippets.

@b-studios
Created October 6, 2015 12:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save b-studios/87985b7afd5225c2c4bf to your computer and use it in GitHub Desktop.
Save b-studios/87985b7afd5225c2c4bf to your computer and use it in GitHub Desktop.
# Build this docker container with
# sudo docker build -t webapp .
#
# then run it with
# sudo docker run -d -p 3000:3000 webapp
# In the host-host then localhost:3030 yields the meteor app (for debugging purposes)
FROM ubuntu:15.04
MAINTAINER Jonathan Brachthäuser
RUN apt-get update
RUN apt-get install curl -y
RUN curl https://install.meteor.com/ | sh
# Fix some bug with meteor and mongodb
RUN locale-gen en_US.UTF-8
RUN mkdir /var/www
WORKDIR /var/www
RUN meteor create --example todos
COPY entry_point.sh /opt/bin/entry_point.sh
RUN chmod +x /opt/bin/entry_point.sh
CMD ["/opt/bin/entry_point.sh"]
#!/bin/bash
function shutdown {
kill -s SIGTERM $NODE_PID
wait $NODE_PID
}
pushd /var/www/todos
meteor & NODE_PID=$!
popd
trap shutdown SIGTERM SIGINT
wait $NODE_PID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment