Dockerfile Templates
Last active
December 25, 2017 02:50
-
-
Save yordis/3194a9fcbe75a1ffedc4 to your computer and use it in GitHub Desktop.
List of Dockerfile used
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
FROM elixir:1.4 | |
ENV MIX_ENV prod | |
ENV HOST 8080 | |
ENV APP_NAME app_name | |
ENV APP_ROOT /app_name | |
COPY . $APP_ROOT/ | |
WORKDIR $APP_ROOT | |
RUN mix local.hex --force && mix local.rebar --force | |
RUN mix deps.get --only-prod | |
RUN mix compile | |
RUN mix release --verbose | |
EXPOSE $HOST | |
CMD _build/$MIX_ENV/rel/$APP_NAME/bin/$APP_NAME foreground |
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
FROM nginx | |
COPY nginx.conf /etc/nginx/nginx.conf |
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
FROM node:6.3.1 | |
MAINTAINER Yordis Prieto <yordis.prieto@gmail.com> | |
ARG KEYMETRICS_SECRET | |
ARG KEYMETRICS_PUBLIC | |
ARG KEYMETRICS_SERVER_NAME | |
ENV APP_ROOT /var/server | |
ENV NODE_ENV production | |
ENV PORT 8080 | |
VOLUME ["$APP_ROOT/logs"] | |
RUN npm i -g pm2 | |
RUN pm2 link KEYMETRICS_SECRET KEYMETRICS_PUBLIC $KEYMETRICS_SERVER_NAME | |
RUN mkdir -p $APP_ROOT | |
WORKDIR $APP_ROOT | |
COPY package*.json $APP_ROOT | |
RUN npm install | |
COPY . $APP_ROOT | |
EXPOSE $PORT | |
CMD npm start | |
# package.json | |
# "start": "pm2 start bin/www --name api -i 0 --no-daemon", | |
# "dev": "nodemon -L ./bin/www" |
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
FROM elixir:1.2.4 | |
MAINTAINER Yordis Prieto <yordis.prieto@gmail.com> | |
ENV APP_PATH /brook | |
ENV MIX_ENV prod | |
ENV PORT 8080 | |
RUN mkdir $APP_PATH | |
WORKDIR $APP_PATH | |
ADD . $APP_PATH | |
RUN mix local.hex --force | |
RUN mix deps.get --only-prod | |
RUN mix compile | |
EXPOSE $PORT | |
CMD mix phoenix.server |
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
FROM ruby:2.3.0 | |
ENV APP_ROOT /app | |
ENV PORT 80 | |
ENV RAILS_ENV production | |
ENV NOKOGIRI_USE_SYSTEM_LIBRARIES true | |
RUN mkdir -p $APP_ROOT | |
WORKDIR $APP_ROOT | |
ADD Gemfile* $APP_ROOT/ | |
RUN bundle install | |
ADD . $APP_ROOT | |
EXPOSE $PORT | |
CMD rm -f $APP_ROOT/tmp/pids/server.pid && rails server --port $PORT -b 0.0.0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment