Giter VIP home page Giter VIP logo

pghero_solo's Introduction

PgHero Solo

This repository is a containerized, standalone instance of the excellent PgHero engine. It allows you to pass a DATABASE_URL environment variable to run PgHero within Docker against your database without having to mount this inside your Rails application. It allows all the benefits of PgHero while allowing you to run a separate application instance safely behind your firewall without fear of accidently exposing it through your production Rails app.

This strategy is used at Yammer to run PgHero against each of our different shards.

This repository has an automated build on the public Docker hub. To demo this and run it on OS X with boot2docker installed, you can connect to a Homebrew-installed Postgres instance like this:

docker run -ti -e DATABASE_URL=postgres://[email protected]:5432/myapp_development -p 8080:8080 bmorton/pghero

pghero_solo's People

Contributors

ankane avatar bmorton avatar hrp avatar mfpinhal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pghero_solo's Issues

run solo behind service proxy in Docker doen not route assets

if i run pghero behind proxy with virtual-path theres is an exception on precompiles assets

how it looks, for example

run pgsolo in container

docker run -d -e MOUNTPOINT="/hodb" -e DATABASE_URL="myconnectionstring" \ 
-e VIRTUAL_HOST="*/pg-solo-one, */pg-solo-one/*" --expose 8080 --name pgsolo1 \
 bmorton/pghero

then run https://github.com/docker/dockercloud-haproxy

docker run -d --link pgsolo1:pgsolo1  -p 80:80 dockercloud/haproxy

if i get URL localhost/pg-solo-one

i can see 503 $-)

image

seem to be mount on RailsEngines does not rewrite route to assets
https://github.com/bmorton/pghero_solo/blob/master/config.ru#L9

Update pghero

Can you update pghero to the latest release, 1.6.2? I would do it myself but I've never used ruby or edited a gem file so I'm sure I'd do something wrong.

Unable to load application: Bundler::GemRequireError: There was an error while trying to load the gem 'pghero'.

$ docker run -ti -e DATABASE_URL=postgres://postgres@cloudesire_pg_1:5432/cloudesire-test -p 8080:8080 bmorton/pghero
Unable to find image 'bmorton/pghero:latest' locally
latest: Pulling from bmorton/pghero
fdd5d7827f33: Already exists 
a3ed95caeb02: Pull complete 
0f35d0fe50cc: Already exists 
627b6479c8f7: Pull complete 
67c44324f4e3: Pull complete 
1429c50af3b7: Pull complete 
8207a1b09d34: Pull complete 
f4fd1f72cd2a: Pull complete 
8c4074b3c552: Pull complete 
33a1a12cf968: Pull complete 
218d4bcdc54a: Pull complete 
12da0cc15b1c: Pull complete 
e21a9abeb878: Pull complete 
6f395257d58d: Pull complete 
Digest: sha256:eb18bea3b83c938dec5f0a3449b535c79bb939a47b39dd11db80996986f5b3f4
Status: Downloaded newer image for bmorton/pghero:latest
[6] Puma starting in cluster mode...
[6] * Version 3.0.2 (ruby 2.3.0-p0), codename: Plethora of Penguin Pinatas
[6] * Min threads: 8, max threads: 12
[6] * Environment: production
[6] * Process workers: 1
[6] * Preloading application
[6] ! Unable to load application: Bundler::GemRequireError: There was an error while trying to load the gem 'pghero'.
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'pghero'. (Bundler::GemRequireError)
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
        from config.ru:1:in `block in <main>'
        from /usr/local/bundle/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
        from /usr/local/bundle/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
        from config.ru:in `new'
        from config.ru:in `<main>'
        from /usr/local/bundle/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
        from /usr/local/bundle/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
        from /usr/local/bundle/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
        from /usr/local/bundle/gems/puma-3.0.2/lib/puma/configuration.rb:310:in `load_rackup'
        from /usr/local/bundle/gems/puma-3.0.2/lib/puma/configuration.rb:239:in `app'
        from /usr/local/bundle/gems/puma-3.0.2/lib/puma/runner.rb:119:in `load_and_bind'
        from /usr/local/bundle/gems/puma-3.0.2/lib/puma/cluster.rb:361:in `run'
        from /usr/local/bundle/gems/puma-3.0.2/lib/puma/launcher.rb:173:in `run'
        from /usr/local/bundle/gems/puma-3.0.2/lib/puma/cli.rb:74:in `run'
        from /usr/local/bundle/gems/puma-3.0.2/bin/puma:10:in `<top (required)>'
        from /usr/local/bundle/bin/puma:16:in `load'
        from /usr/local/bundle/bin/puma:16:in `<main>'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.