From 790835f362f54873a83c8af5718cd56ee1be9546 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 30 May 2016 09:12:01 +0200 Subject: [PATCH] Upgraded pkgr config. --- .pkgr.yml | 31 ++++++++++++++++++++++--------- Procfile | 6 +++--- config/database.yml.pkgr | 10 ++++++---- 3 files changed, 31 insertions(+), 16 deletions(-) diff --git a/.pkgr.yml b/.pkgr.yml index 7bedac775..b957bdb2b 100644 --- a/.pkgr.yml +++ b/.pkgr.yml @@ -2,20 +2,33 @@ targets: centos-6: dependencies: - httpd - - mysql-server - -user: "zammad" -group: "zammad" - -after_install: packaging/hooks/postinstall.sh + - postgresql + - postgresql-server + - postgresql-devel + centos-7: + dependencies: + - httpd + - postgresql + - postgresql-server + - postgresql-devel before: - - cp config/database.yml.pkgr config/database.yml - uname -a + - ruby -v + - env + - cp config/database.yml.pkgr config/database.yml + - echo "gem 'pg'" >> Gemfile.local + - echo "gem 'mysql2', '~> 0.3.20'" >> Gemfile.local + - sed -i "s/specs:/specs:\\n pg (0.18.4)/g" Gemfile.lock + - sed -i "s/DEPENDENCIES/DEPENDENCIES\\n pg/g" Gemfile.lock + - "#cat Gemfile.lock" env: - RAILS_ENV=production - - RAILS_GROUPS=assets + - PORT=3000 + - RAILS_SERVE_STATIC_FILES=true + +services: + - postgres notifications: false - diff --git a/Procfile b/Procfile index 14b3f5f12..248abb76d 100644 --- a/Procfile +++ b/Procfile @@ -1,3 +1,3 @@ -web: puma -p 3000 -worker: script/scheduler.rb -websocket: script/websocket-server.rb \ No newline at end of file +web: bundle exec rails s -p 3000 +worker: bundle exec script/scheduler.rb start -t +websocket: bundle exec script/websocket-server.rb start \ No newline at end of file diff --git a/config/database.yml.pkgr b/config/database.yml.pkgr index cd358e88b..a4ce131f5 100644 --- a/config/database.yml.pkgr +++ b/config/database.yml.pkgr @@ -1,6 +1,8 @@ production: - adapter: sqlite3 - database: db/test.sqlite3 - timeout: 12000 + adapter: postgresql + database: zammad_production pool: 50 - + timeout: 5000 + encoding: utf8 + username: zammad + password: