prepared stuff for easier deployment

This commit is contained in:
Edin Dazdarevic
2015-02-16 21:36:14 +01:00
parent d82274d1e1
commit 40f7f8512a
9 changed files with 61 additions and 12 deletions

View File

@@ -1,4 +1,8 @@
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
run Rails.application
if Rails.env.production?
run Rack::URLMap.new("/backoffice" => Rails::application)
else
run Rails.application
end

View File

@@ -37,7 +37,7 @@ development:
# Connect on a TCP socket. Omitted by default since the client uses a
# domain socket that doesn't need configuration. Windows does not have
# domain sockets, so uncomment these lines.
#host: localhost
host: localhost
# The TCP port the server listens on. Defaults to 5432.
# If your server runs on a different port number, change accordingly.
@@ -80,6 +80,7 @@ test:
#
production:
<<: *default
database: ribicabackoffice_production
username: ribicabackoffice
password: <%= ENV['RIBICABACKOFFICE_DATABASE_PASSWORD'] %>
database: ribica
username: postgres
password: testni_hamo2
host: localhost

View File

@@ -76,4 +76,6 @@ Rails.application.configure do
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
config.relative_url_root = "/backoffice"
end

View File

@@ -19,4 +19,4 @@ test:
# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
secret_key_base: 747e8584786929d2b34d2b9fccb257dcc9f718fec7619baef4ec00aac60140b34e6396836222e3c18ba7b9bb08638c78fed39974c96ce147fc439c85f94302f6