Trying to use docker-compose for deployment

This commit is contained in:
Christoph Haas 2018-05-06 19:05:47 +02:00
parent 45e543ab87
commit 7c9bce03eb
3 changed files with 124 additions and 105 deletions

View file

@ -1,11 +1,12 @@
FROM debian:8
#FROM debian:9
FROM ruby:2.5-stretch
MAINTAINER email@christoph-haas.de
# Install apt based dependencies required to run Rails as
# well as RubyGems. As the Ruby image itself is based on a
# Debian image, we use apt-get to install those.
RUN apt-get update && apt-get install -y \
build-essential ruby
build-essential ruby ruby-dev libpq-dev libbz2-dev libbz2-1.0 zlib1g zlib1g-dev postgresql-client
RUN apt-get install -y git
RUN apt-get install -y rbenv
@ -21,7 +22,8 @@ WORKDIR /app
# will be cached unless changes to one of those two files
# are made.
COPY Gemfile Gemfile.lock ./
RUN gem install bundler && bundle install --jobs 20 --retry 5
#RUN gem install bundler && bundle install --jobs 20 --retry 5
RUN bundle install --jobs 20 --retry 5
# Copy the main application.
COPY . ./