Created
October 6, 2015 12:10
-
-
Save b-studios/87985b7afd5225c2c4bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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