Skip to content

Commit ffa5208

Browse files
committed
Docker and AWS CloudFormation support
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
1 parent bb68b28 commit ffa5208

File tree

18 files changed

+737
-31
lines changed

18 files changed

+737
-31
lines changed

Dockerfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
FROM starefossen/ruby-node:2-8
2+
3+
RUN mkdir /matreon
4+
WORKDIR /matreon
5+
6+
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev --no-install-recommends && rm -rf /var/lib/apt/lists/*
7+
8+
ENV RAILS_ENV production
9+
ENV RAILS_SERVE_STATIC_FILES true
10+
ENV RAILS_LOG_TO_STDOUT true
11+
12+
COPY Gemfile /matreon/
13+
COPY Gemfile.lock /matreon/
14+
RUN bundle config --global frozen 1
15+
RUN bundle install --without development test
16+
17+
ENV NODE_ENV production
18+
19+
COPY package.json /matreon/package.json
20+
COPY yarn.lock /matreon/yarn.lock
21+
RUN yarn install
22+
23+
COPY Procfile Rakefile config.ru .babelrc .postcssrc.yml /matreon/
24+
COPY config /matreon/config
25+
COPY db /matreon/db
26+
COPY vendor /matreon/vendor
27+
COPY app /matreon/app
28+
COPY bin /matreon/bin
29+
COPY lib /matreon/lib
30+
31+
COPY public /matreon/public
32+
RUN rm -rf public/assets public/packs
33+
34+
ENV DEVISE_SECRET_KEY ${DEVISE_SECRET_KEY}
35+
RUN bundle exec rake assets:precompile
36+
37+
EXPOSE 3000
38+
CMD bundle exec puma -C config/puma.rb

Gemfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ gem 'react_on_rails', '10.1.3'
1515

1616
# Use Puma as the app server
1717
gem 'puma', '~> 3.11'
18-
# Use SCSS for stylesheets
18+
19+
# Proxy Lightning Charge:
20+
gem 'rack-proxy'
1921

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

Gemfile.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ DEPENDENCIES
372372
mini_racer
373373
pg
374374
puma (~> 3.11)
375+
rack-proxy
375376
rack-timeout
376377
rails (~> 5.1.6)
377378
rails-controller-testing

0 commit comments

Comments
 (0)