dump.bitcheese.net source code
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
db
lib
log
public
vendor/assets/stylesheets
.editorconfig
.gitignore
.ruby-version
Capfile
Gemfile
Gemfile.lock
README.textile
Rakefile
config.ru

README.textile

dump.bitcheese

File dumping software.

Deployment

Requirements: knowing how to deploy typical rails app
postgresql 9.5

  1. Write config/database.yml
  2. Generate config/secrets.yml
  3. Write config/settings/<environment>.yml using config/settings/example.yml as guide
  4. Write your own deploy/environments/<environment>.rb
  5. cap production deploy

Deploy behind nginx with config like this:


upstream dump_site {
  server unix:/home/dump/dump/shared/tmp/sockets/puma.sock fail_timeout=0;
}

server {
	listen 80;
	listen [::]:80 ipv6only=on;
	listen 443 ssl;
	listen [::]:443 default ipv6only=on ssl;
	client_max_body_size 50M;
	server_name     dump.localhost;

	location /static
	{
		root /var/dump;
		autoindex off;
		internal;
		expires 1y;
	}

	location /
	{
		proxy_pass         http://dump_site;
		proxy_redirect     off;
		proxy_read_timeout 600;
		proxy_set_header   Host             $host;
		proxy_set_header   X-Real-IP        $remote_addr;
		proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
		proxy_set_header   X-Accel-Mapping /var/dump/static=/static;
	}
}

Allow loopback passphrase entry to stupid gpg:

echo allow-loopback-pinentry >> ~/.gnupg/gpg-agent.conf

Trust your key:

$ gpg2 --edit-key <keyid>  
> trust
> 5
> save