Skip to content

Instantly share code, notes, and snippets.

@AdrienFromToulouse
Last active January 3, 2016 13:18
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 AdrienFromToulouse/58ca2393a581656450e8 to your computer and use it in GitHub Desktop.
Save AdrienFromToulouse/58ca2393a581656450e8 to your computer and use it in GitHub Desktop.
# Set the base image to Ubuntu
FROM ubuntu:14.04
MAINTAINER Adrien Desbiaux
# Install Node.js and other dependencies
RUN apt-get update && \
apt-get -y install curl && \
apt-get -y install git && \
apt-get -y install wget && \
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - && \
apt-get install --yes nodejs
# Install PM2
RUN npm install -g pm2
RUN mkdir -p /var/www/your-project-name-whatever
# Define working directory
WORKDIR /var/www/your-project-name-whatever
ADD . /var/www/your-project-name-whatever
RUN npm install
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
# Expose port
EXPOSE 5000
# Run app
CMD pm2 start --no-daemon processes.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment