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 MAINTAINER email@christoph-haas.de
# Install apt based dependencies required to run Rails as # Install apt based dependencies required to run Rails as
# well as RubyGems. As the Ruby image itself is based on a # well as RubyGems. As the Ruby image itself is based on a
# Debian image, we use apt-get to install those. # Debian image, we use apt-get to install those.
RUN apt-get update && apt-get install -y \ 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 git
RUN apt-get install -y rbenv RUN apt-get install -y rbenv
@ -21,7 +22,8 @@ WORKDIR /app
# will be cached unless changes to one of those two files # will be cached unless changes to one of those two files
# are made. # are made.
COPY Gemfile Gemfile.lock ./ 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 the main application.
COPY . ./ COPY . ./

View file

@ -7,41 +7,41 @@ GIT
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
actioncable (5.0.5) actioncable (5.0.7)
actionpack (= 5.0.5) actionpack (= 5.0.7)
nio4r (>= 1.2, < 3.0) nio4r (>= 1.2, < 3.0)
websocket-driver (~> 0.6.1) websocket-driver (~> 0.6.1)
actionmailer (5.0.5) actionmailer (5.0.7)
actionpack (= 5.0.5) actionpack (= 5.0.7)
actionview (= 5.0.5) actionview (= 5.0.7)
activejob (= 5.0.5) activejob (= 5.0.7)
mail (~> 2.5, >= 2.5.4) mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
actionpack (5.0.5) actionpack (5.0.7)
actionview (= 5.0.5) actionview (= 5.0.7)
activesupport (= 5.0.5) activesupport (= 5.0.7)
rack (~> 2.0) rack (~> 2.0)
rack-test (~> 0.6.3) rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2) rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.0.5) actionview (5.0.7)
activesupport (= 5.0.5) activesupport (= 5.0.7)
builder (~> 3.1) builder (~> 3.1)
erubis (~> 2.7.0) erubis (~> 2.7.0)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3) rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.0.5) activejob (5.0.7)
activesupport (= 5.0.5) activesupport (= 5.0.7)
globalid (>= 0.3.6) globalid (>= 0.3.6)
activemodel (5.0.5) activemodel (5.0.7)
activesupport (= 5.0.5) activesupport (= 5.0.7)
activerecord (5.0.5) activerecord (5.0.7)
activemodel (= 5.0.5) activemodel (= 5.0.7)
activesupport (= 5.0.5) activesupport (= 5.0.7)
arel (~> 7.0) arel (~> 7.0)
activesupport (5.0.5) activesupport (5.0.7)
concurrent-ruby (~> 1.0, >= 1.0.2) concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7) i18n (>= 0.7, < 2)
minitest (~> 5.1) minitest (~> 5.1)
tzinfo (~> 1.1) tzinfo (~> 1.1)
ansi (1.5.0) ansi (1.5.0)
@ -51,21 +51,19 @@ GEM
babel-source (>= 4.0, < 6) babel-source (>= 4.0, < 6)
execjs (~> 2.0) execjs (~> 2.0)
bcrypt (3.1.11) bcrypt (3.1.11)
better_errors (2.3.0) better_errors (2.4.0)
coderay (>= 1.0.0) coderay (>= 1.0.0)
erubi (>= 1.0.0) erubi (>= 1.0.0)
rack (>= 0.9.0) rack (>= 0.9.0)
bindex (0.5.0) bindex (0.5.0)
binding_of_caller (0.7.2) binding_of_caller (0.8.0)
debug_inspector (>= 0.0.1) debug_inspector (>= 0.0.1)
builder (3.2.3) builder (3.2.3)
byebug (9.0.6) byebug (10.0.2)
callsite (0.0.11) callsite (0.0.11)
choice (0.2.0) choice (0.2.0)
climate_control (0.2.0) climate_control (0.2.0)
cocaine (0.5.8) coderay (1.1.2)
climate_control (>= 0.0.3, < 1.0)
coderay (1.1.1)
coffee-rails (4.2.2) coffee-rails (4.2.2)
coffee-script (>= 2.2.0) coffee-script (>= 2.2.0)
railties (>= 4.0.0) railties (>= 4.0.0)
@ -74,36 +72,37 @@ GEM
execjs execjs
coffee-script-source (1.12.2) coffee-script-source (1.12.2)
concurrent-ruby (1.0.5) concurrent-ruby (1.0.5)
cookies_eu (1.6.2) cookies_eu (1.6.3)
js_cookie_rails js_cookie_rails
crass (1.0.4)
debug_inspector (0.0.3) debug_inspector (0.0.3)
devise (4.3.0) devise (4.4.3)
bcrypt (~> 3.0) bcrypt (~> 3.0)
orm_adapter (~> 0.1) orm_adapter (~> 0.1)
railties (>= 4.1.0, < 5.2) railties (>= 4.1.0, < 6.0)
responders responders
warden (~> 1.2.3) warden (~> 1.2.3)
erubi (1.6.1) erubi (1.7.1)
erubis (2.7.0) erubis (2.7.0)
execjs (2.7.0) execjs (2.7.0)
fancybox2-rails (0.2.7) fancybox2-rails (0.2.7)
railties (>= 3.1.0) railties (>= 3.1.0)
faraday (0.12.2) faraday (0.12.2)
multipart-post (>= 1.2, < 3) multipart-post (>= 1.2, < 3)
ffi (1.9.18) ffi (1.9.23)
font-awesome-rails (4.7.0.2) font-awesome-rails (4.7.0.4)
railties (>= 3.2, < 5.2) railties (>= 3.2, < 6.0)
formatador (0.2.5) formatador (0.2.5)
foundation-rails (6.4.1.2) foundation-rails (6.4.3.0)
railties (>= 3.1.0) railties (>= 3.1.0)
sass (>= 3.3.0, < 3.5) sass (>= 3.3.0, < 3.5)
sprockets-es6 (>= 0.9.0) sprockets-es6 (>= 0.9.0)
globalid (0.4.0) globalid (0.4.1)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
guard (2.14.1) guard (2.14.2)
formatador (>= 0.2.4) formatador (>= 0.2.4)
listen (>= 2.7, < 4.0) listen (>= 2.7, < 4.0)
lumberjack (~> 1.0) lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1) nenv (~> 0.1)
notiffany (~> 0.0) notiffany (~> 0.0)
pry (>= 0.9.12) pry (>= 0.9.12)
@ -113,11 +112,12 @@ GEM
guard-minitest (2.4.6) guard-minitest (2.4.6)
guard-compat (~> 1.2) guard-compat (~> 1.2)
minitest (>= 3.0) minitest (>= 3.0)
guard-rails (0.8.0) guard-rails (0.8.1)
guard (~> 2.11) guard (~> 2.11)
guard-compat (~> 1.0) guard-compat (~> 1.0)
hashie (3.5.6) hashie (3.5.7)
i18n (0.8.6) i18n (1.0.0)
concurrent-ruby (~> 1.0)
jbuilder (2.7.0) jbuilder (2.7.0)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
multi_json (>= 1.2) multi_json (>= 1.2)
@ -133,37 +133,39 @@ GEM
listen (3.0.8) listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4) rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7) rb-inotify (~> 0.9, >= 0.9.7)
loofah (2.0.3) loofah (2.2.2)
crass (~> 1.0.2)
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
lumberjack (1.0.12) lumberjack (1.0.13)
mail (2.6.6) mail (2.7.0)
mime-types (>= 1.16, < 4) mini_mime (>= 0.1.1)
meta_request (0.4.3) meta_request (0.6.0)
callsite (~> 0.0, >= 0.0.11) callsite (~> 0.0, >= 0.0.11)
rack-contrib (>= 1.1, < 3) rack-contrib (>= 1.1, < 3)
railties (>= 3.0.0, < 5.2.0) railties (>= 3.0.0, < 6)
method_source (0.8.2) method_source (0.9.0)
mime-types (3.1) mime-types (3.1)
mime-types-data (~> 3.2015) mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521) mime-types-data (3.2016.0521)
mimemagic (0.3.2) mimemagic (0.3.2)
mini_portile2 (2.2.0) mini_mime (1.0.0)
minitest (5.10.3) mini_portile2 (2.3.0)
minitest (5.11.3)
minitest-rails (3.0.0) minitest-rails (3.0.0)
minitest (~> 5.8) minitest (~> 5.8)
railties (~> 5.0) railties (~> 5.0)
minitest-reporters (1.1.14) minitest-reporters (1.2.0)
ansi ansi
builder builder
minitest (>= 5.0) minitest (>= 5.0)
ruby-progressbar ruby-progressbar
multi_json (1.12.1) multi_json (1.13.1)
multi_xml (0.6.0) multi_xml (0.6.0)
multipart-post (2.0.0) multipart-post (2.0.0)
nenv (0.3.0) nenv (0.3.0)
nio4r (2.1.0) nio4r (2.3.0)
nokogiri (1.8.0) nokogiri (1.8.2)
mini_portile2 (~> 2.2.0) mini_portile2 (~> 2.3.0)
notiffany (0.1.1) notiffany (0.1.1)
nenv (~> 0.1) nenv (~> 0.1)
shellany (~> 0.0) shellany (~> 0.0)
@ -173,7 +175,7 @@ GEM
multi_json (~> 1.3) multi_json (~> 1.3)
multi_xml (~> 0.5) multi_xml (~> 0.5)
rack (>= 1.2, < 3) rack (>= 1.2, < 3)
omniauth (1.6.1) omniauth (1.8.1)
hashie (>= 3.4.6, < 3.6.0) hashie (>= 3.4.6, < 3.6.0)
rack (>= 1.6.2, < 3) rack (>= 1.6.2, < 3)
omniauth-amazon (1.0.1) omniauth-amazon (1.0.1)
@ -182,53 +184,51 @@ GEM
omniauth-github (1.3.0) omniauth-github (1.3.0)
omniauth (~> 1.5) omniauth (~> 1.5)
omniauth-oauth2 (>= 1.4.0, < 2.0) omniauth-oauth2 (>= 1.4.0, < 2.0)
omniauth-google-oauth2 (0.5.2) omniauth-google-oauth2 (0.5.3)
jwt (~> 1.5) jwt (>= 1.5)
multi_json (~> 1.3)
omniauth (>= 1.1.1) omniauth (>= 1.1.1)
omniauth-oauth2 (>= 1.3.1) omniauth-oauth2 (>= 1.5)
omniauth-oauth2 (1.4.0) omniauth-oauth2 (1.5.0)
oauth2 (~> 1.0) oauth2 (~> 1.1)
omniauth (~> 1.2) omniauth (~> 1.2)
omniauth-openid (1.0.1) omniauth-openid (1.0.1)
omniauth (~> 1.0) omniauth (~> 1.0)
rack-openid (~> 1.3.1) rack-openid (~> 1.3.1)
orm_adapter (0.5.0) orm_adapter (0.5.0)
paperclip (5.1.0) paperclip (6.0.0)
activemodel (>= 4.2.0) activemodel (>= 4.2.0)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
cocaine (~> 0.5.5)
mime-types mime-types
mimemagic (~> 0.3.0) mimemagic (~> 0.3.0)
pg (0.21.0) terrapin (~> 0.6.0)
pg_search (2.1.0) pg (1.0.0)
pg_search (2.1.2)
activerecord (>= 4.2) activerecord (>= 4.2)
activesupport (>= 4.2) activesupport (>= 4.2)
arel (>= 6) arel (>= 6)
pry (0.10.4) pry (0.11.3)
coderay (~> 1.1.0) coderay (~> 1.1.0)
method_source (~> 0.8.1) method_source (~> 0.9.0)
slop (~> 3.4) puma (3.11.3)
puma (3.9.1) rack (2.0.4)
rack (2.0.3) rack-contrib (2.0.1)
rack-contrib (1.2.0) rack (~> 2.0)
rack (>= 0.9.1)
rack-openid (1.3.1) rack-openid (1.3.1)
rack (>= 1.1.0) rack (>= 1.1.0)
ruby-openid (>= 2.1.8) ruby-openid (>= 2.1.8)
rack-test (0.6.3) rack-test (0.6.3)
rack (>= 1.0) rack (>= 1.0)
rails (5.0.5) rails (5.0.7)
actioncable (= 5.0.5) actioncable (= 5.0.7)
actionmailer (= 5.0.5) actionmailer (= 5.0.7)
actionpack (= 5.0.5) actionpack (= 5.0.7)
actionview (= 5.0.5) actionview (= 5.0.7)
activejob (= 5.0.5) activejob (= 5.0.7)
activemodel (= 5.0.5) activemodel (= 5.0.7)
activerecord (= 5.0.5) activerecord (= 5.0.7)
activesupport (= 5.0.5) activesupport (= 5.0.7)
bundler (>= 1.3.0) bundler (>= 1.3.0)
railties (= 5.0.5) railties (= 5.0.7)
sprockets-rails (>= 2.0.0) sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3) rails-dom-testing (2.0.3)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
@ -238,16 +238,16 @@ GEM
activesupport (>= 3.2) activesupport (>= 3.2)
choice (~> 0.2.0) choice (~> 0.2.0)
ruby-graphviz (~> 1.2) ruby-graphviz (~> 1.2)
rails-html-sanitizer (1.0.3) rails-html-sanitizer (1.0.4)
loofah (~> 2.0) loofah (~> 2.2, >= 2.2.2)
railties (5.0.5) railties (5.0.7)
actionpack (= 5.0.5) actionpack (= 5.0.7)
activesupport (= 5.0.5) activesupport (= 5.0.7)
method_source method_source
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
rake (12.0.0) rake (12.3.1)
rb-fsevent (0.10.2) rb-fsevent (0.10.3)
rb-inotify (0.9.10) rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2) ffi (>= 0.5.0, < 2)
rdoc (4.3.0) rdoc (4.3.0)
@ -257,9 +257,9 @@ GEM
railties (>= 4.2.0, < 5.3) railties (>= 4.2.0, < 5.3)
ruby-graphviz (1.2.3) ruby-graphviz (1.2.3)
ruby-openid (2.7.0) ruby-openid (2.7.0)
ruby-progressbar (1.8.1) ruby-progressbar (1.9.0)
sass (3.4.25) sass (3.4.25)
sass-rails (5.0.6) sass-rails (5.0.7)
railties (>= 4.0.0, < 6) railties (>= 4.0.0, < 6)
sass (~> 3.1) sass (~> 3.1)
sprockets (>= 2.8, < 4.0) sprockets (>= 2.8, < 4.0)
@ -269,14 +269,13 @@ GEM
json (~> 1.7, >= 1.7.7) json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0) rdoc (~> 4.0)
shellany (0.0.1) shellany (0.0.1)
slim (3.0.8) slim (3.0.9)
temple (>= 0.7.6, < 0.9) temple (>= 0.7.6, < 0.9)
tilt (>= 1.3.3, < 2.1) tilt (>= 1.3.3, < 2.1)
slim-rails (3.1.2) slim-rails (3.1.3)
actionpack (>= 3.1) actionpack (>= 3.1)
railties (>= 3.1) railties (>= 3.1)
slim (~> 3.0) slim (~> 3.0)
slop (3.6.0)
spring (2.0.2) spring (2.0.2)
activesupport (>= 4.2) activesupport (>= 4.2)
spring-watcher-listen (2.0.1) spring-watcher-listen (2.0.1)
@ -289,23 +288,25 @@ GEM
babel-source (>= 5.8.11) babel-source (>= 5.8.11)
babel-transpiler babel-transpiler
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
sprockets-rails (3.2.0) sprockets-rails (3.2.1)
actionpack (>= 4.0) actionpack (>= 4.0)
activesupport (>= 4.0) activesupport (>= 4.0)
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
temple (0.8.0) temple (0.8.0)
terrapin (0.6.0)
climate_control (>= 0.0.3, < 1.0)
therubyracer (0.12.3) therubyracer (0.12.3)
libv8 (~> 3.16.14.15) libv8 (~> 3.16.14.15)
ref ref
thor (0.19.4) thor (0.20.0)
thread_safe (0.3.6) thread_safe (0.3.6)
tilt (2.0.8) tilt (2.0.8)
turbolinks (5.0.1) turbolinks (5.1.0)
turbolinks-source (~> 5) turbolinks-source (~> 5.1)
turbolinks-source (5.0.3) turbolinks-source (5.1.0)
tzinfo (1.2.3) tzinfo (1.2.5)
thread_safe (~> 0.1) thread_safe (~> 0.1)
uglifier (3.2.0) uglifier (4.1.8)
execjs (>= 0.3.0, < 3) execjs (>= 0.3.0, < 3)
warden (1.2.7) warden (1.2.7)
rack (>= 1.0) rack (>= 1.0)
@ -316,7 +317,7 @@ GEM
railties (>= 5.0) railties (>= 5.0)
websocket-driver (0.6.5) websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0) websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2) websocket-extensions (0.1.3)
will_paginate (3.1.6) will_paginate (3.1.6)
PLATFORMS PLATFORMS

16
docker-compose.yml Normal file
View file

@ -0,0 +1,16 @@
version: '3'
services:
# db:
# image: postgres
# volumes:
# - ./tmp/db:/var/lib/postgresql/data
debshots:
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0'
volumes:
- .:/myapp
ports:
- "3000:3000"
# depends_on:
# - db