Vaidas Jablonskis
9 years ago
2 changed files with 44 additions and 0 deletions
@ -0,0 +1,34 @@ |
|||||||
|
FROM ubuntu:15.04 |
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive |
||||||
|
RUN apt-get update && apt-get upgrade -y && apt-get clean |
||||||
|
RUN apt-get install -y \ |
||||||
|
ruby \ |
||||||
|
ruby-i18n \ |
||||||
|
rake \ |
||||||
|
nodejs \ |
||||||
|
libxml2-dev \ |
||||||
|
libxslt1-dev \ |
||||||
|
bundler \ |
||||||
|
git \ |
||||||
|
libmysqlclient-dev \ |
||||||
|
libsqlite3-dev \ |
||||||
|
mysql-server |
||||||
|
|
||||||
|
WORKDIR /entrydns |
||||||
|
COPY Gemfile.lock /entrydns/ |
||||||
|
COPY Gemfile /entrydns/ |
||||||
|
RUN bundle install --deployment --without development test |
||||||
|
COPY app /entrydns/app/ |
||||||
|
COPY config /entrydns/config/ |
||||||
|
COPY db /entrydns/db/ |
||||||
|
COPY lib /entrydns/lib/ |
||||||
|
COPY log /entrydns/log/ |
||||||
|
COPY public /entrydns/public/ |
||||||
|
COPY script /entrydns/script/ |
||||||
|
COPY spec /entrydns/spec/ |
||||||
|
COPY test /entrydns/test/ |
||||||
|
COPY vendor /entrydns/vendor/ |
||||||
|
COPY config.ru Rakefile /entrydns/ |
||||||
|
|
||||||
|
RUN script/compile_assets.sh |
@ -0,0 +1,10 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
cp config/database.mysql.sample.yml config/database.yml |
||||||
|
cp config/settings.sample.yml config/settings.yml |
||||||
|
install -m 755 -o mysql -g root -d /var/run/mysqld |
||||||
|
mysqld --skip-grant-tables & |
||||||
|
sleep 3 |
||||||
|
bundle exec rake RAILS_ENV=production db:create db:schema:load |
||||||
|
bundle exec rake RAILS_ENV=production assets:precompile |
||||||
|
killall -9 mysqld |
Loading…
Reference in new issue