Skip to content

Instantly share code, notes, and snippets.

@rjocoleman
Last active May 19, 2017 05:07
Show Gist options
  • Save rjocoleman/7681115897a30a834236af8813a70383 to your computer and use it in GitHub Desktop.
Save rjocoleman/7681115897a30a834236af8813a70383 to your computer and use it in GitHub Desktop.
web:
build: .
command: bin/puma -C config/puma.rb
ports:
- 80:5000
- 443:5000
volumes:
- .:/app
worker:
build: .
command: bin/sidekiq
volumes:
- .:/app
FROM ruby:2.3-alpine
RUN apk add --update \
build-base \
git \
libxml2-dev \
libxslt-dev \
tzdata \
rm -rf /var/cache/apk/*; \
gem update --system;
RUN bundle config build.nokogiri --use-system-libraries
WORKDIR /app
COPY Gemfile /app/Gemfile
COPY Gemfile.lock /app/Gemfile.lock
RUN bundle install --without development test
COPY . /app
CMD ["bin/puma", "-C", "config/puma.rb"]
FROM ruby:2.3
ENV PRINCEXML_VESION 10r7-1
RUN apt-get update; \
apt-get install -y --no-install-recommends \
postgresql-client \
nodejs \
libc6 \
libcurl3 \
libfontconfig1 \
libfreetype6 \
libgif4 \
libjpeg62-turbo \
libpng12-0 \
libssl1.0.0 \
libtiff5 \
libxml2 \
zlib1g; \
\
curl -O http://www.princexml.com/download/prince_${PRINCEXML_VESION}_debian8.0_amd64.deb;\
dpkg -i prince_${PRINCEXML_VESION}_debian8.0_amd64.deb; \
rm -rf prince_${PRINCEXML_VESION}_debian8.0_amd64.deb; \
\
rm -rf /var/lib/apt/lists/*;
RUN bundle config build.nokogiri --use-system-libraries
WORKDIR /app
COPY Gemfile /app/Gemfile
COPY Gemfile.lock /app/Gemfile.lock
RUN bundle install --without development test
COPY . /app
RUN rake assets:precompile
CMD ["bin/puma", "-C", "config/puma.rb"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment