Updated a config files for integration with docker

This commit is contained in:
Vokhmin Alexey V 2015-11-05 02:41:08 +03:00
parent 761d1064a7
commit 7d3fb19594
4 changed files with 41 additions and 54 deletions

View File

@ -3,34 +3,34 @@ common: &common
repo_project_name: ABF repo_project_name: ABF
anonymous_access: true anonymous_access: true
preregistration: false preregistration: false
file_store_url: 'http://file-store.rosalinux.ru' file_store_url: <%= ENV["FILE_STORE_URL"] %>
distr_types: ['mdv', 'rhel', 'nau5'] distr_types: ['mdv', 'rhel', 'nau5']
allowed_addresses: allowed_addresses:
- 127.0.0.100 - 127.0.0.1
abf_worker: abf_worker:
publish_workers_count: 2 publish_workers_count: <%= ENV["ABF_WORKER_PUBLISH_WORKERS_COUNT"] %>
log_server: log_server:
host: 127.0.0.1 host: <%= ENV["ABF_WORKER_LOG_SERVER_HOST"] %>
port: 6379 port: <%= ENV["ABF_WORKER_LOG_SERVER_PORT"] %>
keys: keys:
key_pair_secret_key: 'key_pair_secret_key' key_pair_secret_key: <%= ENV["KEY_PAIR_SECRET_KEY"] %>
node_instruction_secret_key: 'node_instruction_secret_key' node_instruction_secret_key: <%= ENV["NODE_INSTRUCTION_SECRET_KEY"] %>
airbrake_api_key: 'airbrake_api_key' airbrake_api_key: <%= ENV["AIRBRAKE_API_KEY"] %>
secret_token: 'secret_token' secret_token: <%= ENV["SECRET_TOKEN"] %>
secret_key_base: 'secret_key_base' secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
devise: devise:
pepper: 'devise_pepper' pepper: <%= ENV["DEVISE_PEPPER"] %>
secret: 'devise_secret' secret: <%= ENV["DEVISE_SECRET"] %>
github: github:
id: 'APP_ID' id: <%= ENV["GITHUB_APP_ID"] %>
secret: 'APP_SECRET' secret: <%= ENV["GITHUB_APP_SECRET"] %>
google: google:
id: 'APP_ID' id: <%= ENV["GOOGLE_APP_ID"] %>
secret: 'APP_SECRET' secret: <%= ENV["GOOGLE_APP_SECRET"] %>
facebook: facebook:
id: 'APP_ID' id: <%= ENV["FACEBOOK_APP_ID"] %>
secret: 'APP_SECRET' secret: <%= ENV["FACEBOOK_APP_SECRET"] %>
downloads_url: 'http://abf-downloads.rosalinux.ru' downloads_url: <%= ENV["DOWNLOADS_URL"] %>
wiki_formats: wiki_formats:
markdown: "Markdown" markdown: "Markdown"
textile: "Textile" textile: "Textile"
@ -40,20 +40,12 @@ common: &common
# mediawiki: "MediaWiki" # mediawiki: "MediaWiki"
feedback: feedback:
email: email:
- 'test@example.com' - <%= ENV["FEEDBACK_EMAIL"] %>
- 'test1@example.com'
# or
# email: 'test@example.com'
# optional parameters
cc: cc:
- 'test2@example.com' # or like email - <%= ENV["FEEDBACK_CC"] %>
bcc: subject_prefixes:
- 'test3@example.com' # or like email - 'abf-users'
subject_prefixes: # or one line - 'feeback_form'
- 'from_feedback'
subject_postfixes: # or one line
- 'sample_postfix'
shell_user: 'git' shell_user: 'git'
development: development:
@ -68,14 +60,14 @@ development:
production: production:
<<: *common <<: *common
root_path: /share root_path: <%= ENV["ROOT_PATH"] %>
git_path: /mnt/gitstore git_path: <%= ENV["GIT_PATH"] %>
tmpfs_path: /dev/shm tmpfs_path: <%= ENV["TMPFS_PATH"] %>
do-not-reply-email: do-not-reply@abf.rosalinux.ru do-not-reply-email: <%= ENV["DO_NOT_REPLY_EMAIL"] %>
mailer_https_url: false mailer_https_url: <%= ENV["MAILER_HTTPS_URL"] %>
github_services: github_services:
ip: 127.0.0.1 ip: <%= ENV["GITHUB_SERVICES_ID"] %>
port: 1234 port: <%= ENV["GITHUB_SERVICES_PORT"] %>
test: test:
<<: *common <<: *common

View File

@ -1,12 +1,13 @@
production: production:
adapter: postgresql adapter: postgresql
encoding: unicode encoding: unicode
database: rosa_build database: <%= ENV["DATABASE_NAME"] %>
template: template0 template: template0
pool: 5 host: <%= ENV["DATABASE_HOST"] %>
username: rosa username: <%= ENV["DATABASE_USERNAME"] %>
password: rosa password: <%= ENV["DATABASE_PASSWORD"] %>
host: localhost pool: <%= ENV["DATABASE_POOL"] %>
timeout: <%= ENV["DATABASE_TIMEOUT"] %>
test: test:
adapter: postgresql adapter: postgresql

View File

@ -1,6 +1,7 @@
class Redis class Redis
def self.connect! def self.connect!
opts = { url: "redis://localhost:6379/#{::Rails.env.test? ? 1 : 0}" } url = ENV["REDIS_URL"].presence || "redis://localhost:6379/#{::Rails.env.test? ? 1 : 0}"
opts = { url: url }
opts[:logger] = ::Rails.logger if ::Rails.application.config.log_redis opts[:logger] = ::Rails.logger if ::Rails.application.config.log_redis

View File

@ -1,8 +1,3 @@
base_path = "/srv/rosa_build"
pidfile File.join(base_path, 'shared', 'pids', 'unicorn.pid')
state_path File.join(base_path, 'shared', 'pids', 'puma.state')
bind 'unix:///tmp/rosa_build_unicorn.sock'
environment ENV['RAILS_ENV'] || 'production' environment ENV['RAILS_ENV'] || 'production'
threads *(ENV['PUMA_THREADS'] || '16,16').split(',') threads *(ENV['PUMA_THREADS'] || '16,16').split(',')
workers ENV['PUMA_WORKERS'] || 7 workers ENV['PUMA_WORKERS'] || 7
@ -30,5 +25,3 @@ on_worker_boot do
Redis.connect! Redis.connect!
Rails.logger.info('Connected to Redis') Rails.logger.info('Connected to Redis')
end end
activate_control_app 'unix:///tmp/rosa_build_pumactl.sock'