Here's how I set up a tiny Nginx/Rails server that uses HTTPS via a Let's Encrypt issued certificate.
I use the smallest DigitalOcean droplet (512 MB) here, which is built from the "Ubuntu Ruby on Rails on 14.04" image provided by them.
Here's how I set up a tiny Nginx/Rails server that uses HTTPS via a Let's Encrypt issued certificate.
I use the smallest DigitalOcean droplet (512 MB) here, which is built from the "Ubuntu Ruby on Rails on 14.04" image provided by them.
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
-- Create a group | |
CREATE ROLE readaccess; | |
-- Grant access to existing tables | |
GRANT USAGE ON SCHEMA public TO readaccess; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
-- Grant access to future tables | |
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; |
#!/usr/bin/env ruby | |
# | |
# Passenger management script | |
# By James Smith http://loopj.com | |
# Based heavily on a similar script by Jon Bettcher | |
# | |
# Check memory usage of all paseenger child process and kill if grows | |
# too large. | |
# |