diff --git a/config/database.yml.sample b/config/database.yml.sample index 2c157869..71d3f94a 100644 --- a/config/database.yml.sample +++ b/config/database.yml.sample @@ -1,58 +1,26 @@ -# PostgreSQL. Versions 8.2 and up are supported. -# -# Install the pg driver: -# gem install pg -# On Mac OS X with macports: -# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config -# On Windows: -# gem install pg -# Choose the win32 build. -# Install PostgreSQL and put its /bin directory on your path. -# -# Configure Using Gemfile -# gem 'pg' -# -development: +default: &default adapter: postgresql encoding: unicode - database: nastachku_development - pool: 5 - - # 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 - #port: 5432 - - # Schema search path. The server defaults to $user,public - #schema_search_path: myapp,sharedapp,public + host: <%= ENV.fetch("DATABASE_HOST") {"127.0.0.1"} %> + port: <%= ENV.fetch("DATABASE_PORT") {5432} %> + pool: <%= ENV.fetch("DATABASE_POOL") {5} %> + username: <%= ENV.fetch("DATABASE_USERNAME") {"postgres"} %> + password: <%= ENV.fetch("DATABASE_PASSWORD") {""} %> - # Minimum log levels, in increasing order: - # debug5, debug4, debug3, debug2, debug1, - # log, notice, warning, error, fatal, and panic - # The server defaults to notice. - #min_messages: warning +development: + <<: *default + database: nastachku_development -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. test: - adapter: postgresql - encoding: unicode + <<: *default database: nastachku_test - pool: 5 production: - adapter: postgresql - encoding: unicode + <<: *default database: nastachku_production - pool: 5 username: nastachku staging: - adapter: postgresql - encoding: unicode + <<: *default database: nastachku_staging_2015 - pool: 5 username: nastachku_staging_2015 - diff --git a/config/initializers/sponsors.rb b/config/initializers/sponsors.rb index 84d19bbc..dd7218cf 100644 --- a/config/initializers/sponsors.rb +++ b/config/initializers/sponsors.rb @@ -13,11 +13,11 @@ config.strategy_title = 'Стратегические партнёры' config.strategy = [ {url: 'http://ulgov.ru/', logo: 'logos/ulgov.jpg'}, - {url: 'http://seo.ru/', logo: 'logos/seoru.png'}, - {url: 'http://e-ul.ru/', logo: 'logos/el_ul.jpg'}, - {url: 'http://ritg.ru/', logo: 'logos/russian-it-group.png'}, - {url: 'http://www.ulstu.ru/', logo: 'logos/ulstu.jpg'}, - {url: 'http://www.ulsu.ru/', logo: 'logos/ulsu.png'} + {url: 'http://seo.ru/', logo: 'logos/seoru.png'} + # {url: 'http://e-ul.ru/', logo: 'logos/el_ul.jpg'}, + # {url: 'http://ritg.ru/', logo: 'logos/russian-it-group.png'}, + # {url: 'http://www.ulstu.ru/', logo: 'logos/ulstu.jpg'}, + # {url: 'http://www.ulsu.ru/', logo: 'logos/ulsu.png'} ] config.syberfootball_title = 'Федерация киберфутбола России' diff --git a/docker-compose.yml b/docker-compose.yml index 360cd41c..ce88077b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,6 +16,11 @@ web: - ./:/myapp - ~/.ssh:/root/.ssh - ~/.bash_history:/root/.bash_history + environment: + DATABASE_HOST: db + DATABASE_PORT: 5432 + DATABASE_USERNAME: postgres + DATABASE_PASSWORD: ports: - "8083:8083" links: