mirror of https://github.com/fspc/BikeShed-1.git
Jason Denney
9 years ago
7 changed files with 122 additions and 64 deletions
@ -1 +1 @@ |
|||||
ruby-1.9.3-p374 |
ruby-2.1.1 |
||||
|
@ -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,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 |
|
||||
|
@ -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 |
@ -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…
Reference in new issue