Created
January 3, 2016 11:58
-
-
Save AdrienFromToulouse/124a394f3e687dca5e88 to your computer and use it in GitHub Desktop.
This file contains 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
# 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 npm install pm2 | |
RUN mkdir -p /var/www/myprojectname | |
# Define working directory | |
WORKDIR /var/www/myprojectname | |
ADD . /var/www/myprojectname | |
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