Skip to content

Commit

Permalink
Docker and AWS CloudFormation support
Browse files Browse the repository at this point in the history
bitcoind config:
* prune=2000           minimum prune size * 4 to account for SegWit
* maxuploadtarget=300  keep upload cost below $1 / month, but maintain
                       reasonable karma if blocks avg < 2 MB month
                       (although in practice pruned nodes don't upload
                        much)
* peerbloomfilters=0   Ain't got time for BIP-37
  • Loading branch information
Sjors committed May 11, 2018
1 parent bb68b28 commit d8ec291
Show file tree
Hide file tree
Showing 18 changed files with 739 additions and 31 deletions.
38 changes: 38 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM starefossen/ruby-node:2-8

RUN mkdir /matreon
WORKDIR /matreon

RUN apt-get update -qq && apt-get install -y build-essential libpq-dev --no-install-recommends && rm -rf /var/lib/apt/lists/*

ENV RAILS_ENV production
ENV RAILS_SERVE_STATIC_FILES true
ENV RAILS_LOG_TO_STDOUT true

COPY Gemfile /matreon/
COPY Gemfile.lock /matreon/
RUN bundle config --global frozen 1
RUN bundle install --without development test

ENV NODE_ENV production

COPY package.json /matreon/package.json
COPY yarn.lock /matreon/yarn.lock
RUN yarn install

COPY Procfile Rakefile config.ru .babelrc .postcssrc.yml /matreon/
COPY config /matreon/config
COPY db /matreon/db
COPY vendor /matreon/vendor
COPY app /matreon/app
COPY bin /matreon/bin
COPY lib /matreon/lib

COPY public /matreon/public
RUN rm -rf public/assets public/packs

ENV DEVISE_SECRET_KEY ${DEVISE_SECRET_KEY}
RUN bundle exec rake assets:precompile

EXPOSE 3000
CMD bundle exec puma -C config/puma.rb
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ gem 'react_on_rails', '10.1.3'

# Use Puma as the app server
gem 'puma', '~> 3.11'
# Use SCSS for stylesheets

# Proxy Lightning Charge:
gem 'rack-proxy'

gem 'secure_headers', '~> 6.0.0.alpha02'

Expand Down
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ DEPENDENCIES
mini_racer
pg
puma (~> 3.11)
rack-proxy
rack-timeout
rails (~> 5.1.6)
rails-controller-testing
Expand Down
Loading

0 comments on commit d8ec291

Please sign in to comment.