mirror of
https://github.com/fspc/BikeShed-1.git
synced 2025-04-04 05:33:22 -04:00
Dockerize! Startup with docker-compose up
Make sure to docker-compose build first
This commit is contained in:
parent
fd5d4798b0
commit
4fe8865aca
@ -1 +1 @@
|
|||||||
ruby-1.9.3-p374
|
ruby-2.1.1
|
||||||
|
23
Dockerfile
Normal file
23
Dockerfile
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
FROM ruby:2.1
|
||||||
|
|
||||||
|
# throw errors if Gemfile has been modified since Gemfile.lock
|
||||||
|
RUN bundle config --global frozen 1
|
||||||
|
|
||||||
|
RUN mkdir -p /usr/src/app
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y nodejs --no-install-recommends && \
|
||||||
|
apt-get install -y mysql-client postgresql-client sqlite3 --no-install-recommends && \
|
||||||
|
apt-get install -y zip unzip --no-install-recommends && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
COPY Gemfile /usr/src/app/
|
||||||
|
COPY Gemfile.lock /usr/src/app/
|
||||||
|
|
||||||
|
RUN bundle install
|
||||||
|
|
||||||
|
COPY install_extjs.rb /usr/src/app/
|
||||||
|
RUN /usr/src/app/install_extjs.rb
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
CMD ["rails", "server", "-b", "0.0.0.0"]
|
1
Gemfile
1
Gemfile
@ -45,7 +45,6 @@ group :test do
|
|||||||
gem 'launchy', '~> 2.4.2'
|
gem 'launchy', '~> 2.4.2'
|
||||||
gem 'spork', '~> 0.9.2'
|
gem 'spork', '~> 0.9.2'
|
||||||
#guard dependency for Mac OS 10
|
#guard dependency for Mac OS 10
|
||||||
gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i
|
|
||||||
gem 'guard-spork', '~> 1.5.1'
|
gem 'guard-spork', '~> 1.5.1'
|
||||||
gem 'guard-rspec', '~> 4.2.6'
|
gem 'guard-rspec', '~> 4.2.6'
|
||||||
end
|
end
|
||||||
|
103
Gemfile.lock
103
Gemfile.lock
@ -36,9 +36,11 @@ GEM
|
|||||||
activesupport (3.2.13)
|
activesupport (3.2.13)
|
||||||
i18n (= 0.6.1)
|
i18n (= 0.6.1)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
addressable (2.3.5)
|
addressable (2.4.0)
|
||||||
arel (3.0.3)
|
arel (3.0.3)
|
||||||
bcrypt-ruby (3.1.2)
|
bcrypt (3.1.10)
|
||||||
|
bcrypt-ruby (3.1.5)
|
||||||
|
bcrypt (>= 3.1.3)
|
||||||
bootstrap-will_paginate (0.0.10)
|
bootstrap-will_paginate (0.0.10)
|
||||||
will_paginate
|
will_paginate
|
||||||
builder (3.0.4)
|
builder (3.0.4)
|
||||||
@ -49,19 +51,17 @@ GEM
|
|||||||
rack (>= 1.0.0)
|
rack (>= 1.0.0)
|
||||||
rack-test (>= 0.5.4)
|
rack-test (>= 0.5.4)
|
||||||
xpath (~> 2.0)
|
xpath (~> 2.0)
|
||||||
celluloid (0.15.2)
|
childprocess (0.5.9)
|
||||||
timers (~> 1.1.0)
|
|
||||||
childprocess (0.4.0)
|
|
||||||
ffi (~> 1.0, >= 1.0.11)
|
ffi (~> 1.0, >= 1.0.11)
|
||||||
cliver (0.3.2)
|
cliver (0.3.2)
|
||||||
coderay (1.1.0)
|
coderay (1.1.1)
|
||||||
coffee-rails (3.2.2)
|
coffee-rails (3.2.2)
|
||||||
coffee-script (>= 2.2.0)
|
coffee-script (>= 2.2.0)
|
||||||
railties (~> 3.2.0)
|
railties (~> 3.2.0)
|
||||||
coffee-script (2.2.0)
|
coffee-script (2.4.1)
|
||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.7.0)
|
coffee-script-source (1.10.0)
|
||||||
commonjs (0.2.7)
|
commonjs (0.2.7)
|
||||||
database_cleaner (1.2.0)
|
database_cleaner (1.2.0)
|
||||||
decent_exposure (1.0.2)
|
decent_exposure (1.0.2)
|
||||||
@ -72,7 +72,7 @@ GEM
|
|||||||
warden (~> 1.1.1)
|
warden (~> 1.1.1)
|
||||||
diff-lcs (1.2.5)
|
diff-lcs (1.2.5)
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
execjs (2.0.2)
|
execjs (2.6.0)
|
||||||
factory_girl (2.6.4)
|
factory_girl (2.6.4)
|
||||||
activesupport (>= 2.3.9)
|
activesupport (>= 2.3.9)
|
||||||
factory_girl_rails (1.7.0)
|
factory_girl_rails (1.7.0)
|
||||||
@ -80,15 +80,18 @@ GEM
|
|||||||
railties (>= 3.0.0)
|
railties (>= 3.0.0)
|
||||||
faker (1.2.0)
|
faker (1.2.0)
|
||||||
i18n (~> 0.5)
|
i18n (~> 0.5)
|
||||||
ffi (1.9.3)
|
ffi (1.9.10)
|
||||||
formatador (0.2.4)
|
formatador (0.2.5)
|
||||||
guard (2.4.0)
|
guard (2.13.0)
|
||||||
formatador (>= 0.2.4)
|
formatador (>= 0.2.4)
|
||||||
listen (~> 2.1)
|
listen (>= 2.7, <= 4.0)
|
||||||
lumberjack (~> 1.0)
|
lumberjack (~> 1.0)
|
||||||
|
nenv (~> 0.1)
|
||||||
|
notiffany (~> 0.0)
|
||||||
pry (>= 0.9.12)
|
pry (>= 0.9.12)
|
||||||
|
shellany (~> 0.0)
|
||||||
thor (>= 0.18.1)
|
thor (>= 0.18.1)
|
||||||
guard-rspec (4.2.6)
|
guard-rspec (4.2.10)
|
||||||
guard (~> 2.1)
|
guard (~> 2.1)
|
||||||
rspec (>= 2.14, < 4.0)
|
rspec (>= 2.14, < 4.0)
|
||||||
guard-spork (1.5.1)
|
guard-spork (1.5.1)
|
||||||
@ -103,15 +106,15 @@ GEM
|
|||||||
railties (>= 3.1, < 4.1)
|
railties (>= 3.1, < 4.1)
|
||||||
hike (1.2.3)
|
hike (1.2.3)
|
||||||
i18n (0.6.1)
|
i18n (0.6.1)
|
||||||
jbuilder (2.0.3)
|
jbuilder (2.0.8)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0, < 5)
|
||||||
multi_json (>= 1.2.0)
|
multi_json (~> 1.2)
|
||||||
journey (1.0.4)
|
journey (1.0.4)
|
||||||
jquery-rails (2.3.0)
|
jquery-rails (2.3.0)
|
||||||
railties (>= 3.0, < 5.0)
|
railties (>= 3.0, < 5.0)
|
||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
json (1.8.1)
|
json (1.8.3)
|
||||||
launchy (2.4.2)
|
launchy (2.4.3)
|
||||||
addressable (~> 2.3)
|
addressable (~> 2.3)
|
||||||
less (2.2.2)
|
less (2.2.2)
|
||||||
commonjs (~> 0.2.6)
|
commonjs (~> 0.2.6)
|
||||||
@ -119,18 +122,18 @@ GEM
|
|||||||
actionpack (>= 3.1)
|
actionpack (>= 3.1)
|
||||||
less (~> 2.2.0)
|
less (~> 2.2.0)
|
||||||
libv8 (3.3.10.4)
|
libv8 (3.3.10.4)
|
||||||
listen (2.4.1)
|
listen (3.0.6)
|
||||||
celluloid (>= 0.15.2)
|
|
||||||
rb-fsevent (>= 0.9.3)
|
rb-fsevent (>= 0.9.3)
|
||||||
rb-inotify (>= 0.9)
|
rb-inotify (>= 0.9.7)
|
||||||
lumberjack (1.0.4)
|
lumberjack (1.0.10)
|
||||||
mail (2.5.4)
|
mail (2.5.4)
|
||||||
mime-types (~> 1.16)
|
mime-types (~> 1.16)
|
||||||
treetop (~> 1.4.8)
|
treetop (~> 1.4.8)
|
||||||
method_source (0.8.2)
|
method_source (0.8.2)
|
||||||
mime-types (1.25.1)
|
mime-types (1.25.1)
|
||||||
mini_portile (0.5.2)
|
mini_portile2 (2.0.0)
|
||||||
multi_json (1.8.4)
|
multi_json (1.11.2)
|
||||||
|
nenv (0.3.0)
|
||||||
netzke-basepack (0.8.4)
|
netzke-basepack (0.8.4)
|
||||||
netzke-core (~> 0.8.2)
|
netzke-core (~> 0.8.2)
|
||||||
netzke-cancan (0.8.2)
|
netzke-cancan (0.8.2)
|
||||||
@ -139,26 +142,29 @@ GEM
|
|||||||
netzke-core (0.8.4)
|
netzke-core (0.8.4)
|
||||||
execjs
|
execjs
|
||||||
uglifier
|
uglifier
|
||||||
nokogiri (1.6.1)
|
nokogiri (1.6.7.2)
|
||||||
mini_portile (~> 0.5.0)
|
mini_portile2 (~> 2.0.0.rc2)
|
||||||
|
notiffany (0.0.8)
|
||||||
|
nenv (~> 0.1)
|
||||||
|
shellany (~> 0.0)
|
||||||
orm_adapter (0.0.7)
|
orm_adapter (0.0.7)
|
||||||
pg (0.17.1)
|
pg (0.17.1)
|
||||||
poltergeist (1.5.0)
|
poltergeist (1.5.1)
|
||||||
capybara (~> 2.1)
|
capybara (~> 2.1)
|
||||||
cliver (~> 0.3.1)
|
cliver (~> 0.3.1)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
websocket-driver (>= 0.2.0)
|
websocket-driver (>= 0.2.0)
|
||||||
polyglot (0.3.3)
|
polyglot (0.3.5)
|
||||||
pry (0.9.12.6)
|
pry (0.9.12.6)
|
||||||
coderay (~> 1.0)
|
coderay (~> 1.0)
|
||||||
method_source (~> 0.8)
|
method_source (~> 0.8)
|
||||||
slop (~> 3.4)
|
slop (~> 3.4)
|
||||||
rack (1.4.5)
|
rack (1.4.7)
|
||||||
rack-cache (1.2)
|
rack-cache (1.6.1)
|
||||||
rack (>= 0.4)
|
rack (>= 0.4)
|
||||||
rack-ssl (1.3.3)
|
rack-ssl (1.3.4)
|
||||||
rack
|
rack
|
||||||
rack-test (0.6.2)
|
rack-test (0.6.3)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
rails (3.2.13)
|
rails (3.2.13)
|
||||||
actionmailer (= 3.2.13)
|
actionmailer (= 3.2.13)
|
||||||
@ -175,9 +181,9 @@ GEM
|
|||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
rdoc (~> 3.4)
|
rdoc (~> 3.4)
|
||||||
thor (>= 0.14.6, < 2.0)
|
thor (>= 0.14.6, < 2.0)
|
||||||
rake (10.1.1)
|
rake (10.5.0)
|
||||||
rb-fsevent (0.9.4)
|
rb-fsevent (0.9.7)
|
||||||
rb-inotify (0.9.3)
|
rb-inotify (0.9.7)
|
||||||
ffi (>= 0.5.0)
|
ffi (>= 0.5.0)
|
||||||
rdoc (3.12.2)
|
rdoc (3.12.2)
|
||||||
json (~> 1.4)
|
json (~> 1.4)
|
||||||
@ -185,11 +191,11 @@ GEM
|
|||||||
rspec-core (~> 2.14.0)
|
rspec-core (~> 2.14.0)
|
||||||
rspec-expectations (~> 2.14.0)
|
rspec-expectations (~> 2.14.0)
|
||||||
rspec-mocks (~> 2.14.0)
|
rspec-mocks (~> 2.14.0)
|
||||||
rspec-core (2.14.7)
|
rspec-core (2.14.8)
|
||||||
rspec-expectations (2.14.5)
|
rspec-expectations (2.14.5)
|
||||||
diff-lcs (>= 1.1.3, < 2.0)
|
diff-lcs (>= 1.1.3, < 2.0)
|
||||||
rspec-mocks (2.14.5)
|
rspec-mocks (2.14.6)
|
||||||
rspec-rails (2.14.1)
|
rspec-rails (2.14.2)
|
||||||
actionpack (>= 3.0)
|
actionpack (>= 3.0)
|
||||||
activemodel (>= 3.0)
|
activemodel (>= 3.0)
|
||||||
activesupport (>= 3.0)
|
activesupport (>= 3.0)
|
||||||
@ -197,19 +203,19 @@ GEM
|
|||||||
rspec-core (~> 2.14.0)
|
rspec-core (~> 2.14.0)
|
||||||
rspec-expectations (~> 2.14.0)
|
rspec-expectations (~> 2.14.0)
|
||||||
rspec-mocks (~> 2.14.0)
|
rspec-mocks (~> 2.14.0)
|
||||||
|
shellany (0.0.1)
|
||||||
shoulda-matchers (1.0.0)
|
shoulda-matchers (1.0.0)
|
||||||
slop (3.4.7)
|
slop (3.6.0)
|
||||||
spork (0.9.2)
|
spork (0.9.2)
|
||||||
sprockets (2.2.2)
|
sprockets (2.2.3)
|
||||||
hike (~> 1.2)
|
hike (~> 1.2)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
rack (~> 1.0)
|
rack (~> 1.0)
|
||||||
tilt (~> 1.1, != 1.3.0)
|
tilt (~> 1.1, != 1.3.0)
|
||||||
therubyracer (0.10.2)
|
therubyracer (0.10.2)
|
||||||
libv8 (~> 3.3.10)
|
libv8 (~> 3.3.10)
|
||||||
thor (0.18.1)
|
thor (0.19.1)
|
||||||
tilt (1.4.1)
|
tilt (1.4.1)
|
||||||
timers (1.1.0)
|
|
||||||
treetop (1.4.15)
|
treetop (1.4.15)
|
||||||
polyglot
|
polyglot
|
||||||
polyglot (>= 0.3.1)
|
polyglot (>= 0.3.1)
|
||||||
@ -218,14 +224,16 @@ GEM
|
|||||||
less-rails (~> 2.2.2)
|
less-rails (~> 2.2.2)
|
||||||
railties (>= 3.1)
|
railties (>= 3.1)
|
||||||
therubyracer (~> 0.10.1)
|
therubyracer (~> 0.10.1)
|
||||||
tzinfo (0.3.38)
|
tzinfo (0.3.46)
|
||||||
uglifier (2.4.0)
|
uglifier (2.7.2)
|
||||||
execjs (>= 0.3.0)
|
execjs (>= 0.3.0)
|
||||||
json (>= 1.8.0)
|
json (>= 1.8.0)
|
||||||
warden (1.1.1)
|
warden (1.1.1)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
websocket-driver (0.3.2)
|
websocket-driver (0.6.3)
|
||||||
will_paginate (3.0.5)
|
websocket-extensions (>= 0.1.0)
|
||||||
|
websocket-extensions (0.1.2)
|
||||||
|
will_paginate (3.0.7)
|
||||||
xpath (2.0.0)
|
xpath (2.0.0)
|
||||||
nokogiri (~> 1.3)
|
nokogiri (~> 1.3)
|
||||||
|
|
||||||
@ -256,7 +264,6 @@ DEPENDENCIES
|
|||||||
poltergeist (~> 1.5.0)
|
poltergeist (~> 1.5.0)
|
||||||
pry (~> 0.9.8)
|
pry (~> 0.9.8)
|
||||||
rails (= 3.2.13)
|
rails (= 3.2.13)
|
||||||
rb-fsevent
|
|
||||||
rspec-rails (~> 2.14.0)
|
rspec-rails (~> 2.14.0)
|
||||||
shoulda-matchers (~> 1.0.0)
|
shoulda-matchers (~> 1.0.0)
|
||||||
spork (~> 0.9.2)
|
spork (~> 0.9.2)
|
||||||
|
@ -1,23 +1,19 @@
|
|||||||
development:
|
development: &default
|
||||||
adapter: postgresql
|
adapter: postgresql
|
||||||
database: velocipede
|
encoding: unicode
|
||||||
username: velocipede
|
pool: 5
|
||||||
password:
|
database: <%= ENV['RDS_DB_NAME'] || 'postgres' %>
|
||||||
host: 127.0.0.1
|
username: <%= ENV['RDS_USERNAME'] || 'postgres' %>
|
||||||
|
password: <%= ENV['RDS_PASSWORD'] %>
|
||||||
|
host: <%= ENV['RDS_HOSTNAME'] || 'db' %>
|
||||||
|
|
||||||
# Warning: The database defined as "test" will be erased and
|
# Warning: The database defined as "test" will be erased and
|
||||||
# re-generated from your development database when you run "rake".
|
# re-generated from your development database when you run "rake".
|
||||||
# Do not set this db to the same as development or production.
|
# Do not set this db to the same as development or production.
|
||||||
test:
|
test:
|
||||||
adapter: postgresql
|
<<: *default
|
||||||
database: velocipede_test
|
database: velocipede_test
|
||||||
username: velocipede
|
|
||||||
password:
|
|
||||||
host: 127.0.0.1
|
|
||||||
|
|
||||||
production:
|
production:
|
||||||
adapter: postgresql
|
<<: *default
|
||||||
database: velocipede
|
database: velocipede_production
|
||||||
username: velocipede
|
|
||||||
password:
|
|
||||||
host: 127.0.0.1
|
|
||||||
|
13
docker-compose.yml
Normal file
13
docker-compose.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
db:
|
||||||
|
image: postgres
|
||||||
|
ports:
|
||||||
|
- "5432"
|
||||||
|
web:
|
||||||
|
volumes:
|
||||||
|
- .:/usr/src/app
|
||||||
|
build: .
|
||||||
|
#command: bundle exec rake db:migrate
|
||||||
|
ports:
|
||||||
|
- "8080:3000"
|
||||||
|
links:
|
||||||
|
- db
|
20
install_extjs.rb
Executable file
20
install_extjs.rb
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
|
require 'fileutils'
|
||||||
|
|
||||||
|
extjs_url = "http://my.jasondenney.com/extjs-4.1.1.zip"
|
||||||
|
download_dir = '/tmp'
|
||||||
|
dest_dir ='/usr/lib'
|
||||||
|
extjs_download_path = File.join(download_dir,'extjs-4.1.1.zip')
|
||||||
|
|
||||||
|
files = Dir.glob(File.join(dest_dir, 'extjs', '*'))
|
||||||
|
if files.empty? and Dir.glob(extjs_download_path).empty?
|
||||||
|
`wget -P #{download_dir} #{extjs_url}`
|
||||||
|
raise "Failed downloading #{extjs_url}" if Dir.glob(extjs_download_path).empty?
|
||||||
|
end
|
||||||
|
|
||||||
|
if files.empty?
|
||||||
|
puts `unzip #{extjs_download_path} -d #{dest_dir}/`
|
||||||
|
FileUtils.mv(File.join(dest_dir, 'ext-4.1.1a'), File.join(dest_dir, 'extjs'))
|
||||||
|
end
|
||||||
|
raise "Failed unzipping #{extjs_download_path}" if Dir.glob(File.join(dest_dir,'extjs', '*')).empty?
|
Loading…
x
Reference in New Issue
Block a user