Created
May 31, 2017 14:35
-
-
Save devigned/e084efdc9acabcd7552ca83c807d54ab to your computer and use it in GitHub Desktop.
Habitat run hook for Rails todo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
export GEM_HOME="{{pkg.svc_static_path}}/vendor/bundle/ruby/2.4.0" | |
export GEM_PATH="$(hab pkg path core/ruby)/lib/ruby/gems/2.4.0:$(hab pkg path core/bundler):$GEM_HOME" | |
export LD_LIBRARY_PATH="$(hab pkg path core/gcc-libs)/lib" | |
export RAILS_ENV="production" | |
export RAILS_SERVE_STATIC_FILES="true" | |
export SSL_CERT_FILE="$(hab pkg path core/cacerts)/ssl/certs/cacert.pem" | |
cd {{pkg.svc_static_path}} | |
exec 2>&1 | |
exec ./bin/rails server -b {{cfg.rails_binding_ip}} -p {{cfg.rails_port}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment