some rework on database config, packager.io & cleanup scripts
This commit is contained in:
parent
54a72907a7
commit
45854246da
7 changed files with 30 additions and 15 deletions
|
@ -41,11 +41,7 @@ targets:
|
||||||
- nginx
|
- nginx
|
||||||
- postgresql-server
|
- postgresql-server
|
||||||
before:
|
before:
|
||||||
- uname -a
|
- contrib/packager.io/before.sh
|
||||||
- ruby -v
|
|
||||||
- env
|
|
||||||
- "cat Gemfile.lock"
|
|
||||||
- contrib/cleanup.sh
|
|
||||||
after:
|
after:
|
||||||
- contrib/packager.io/after.sh
|
- contrib/packager.io/after.sh
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -1,22 +1,28 @@
|
||||||
|
# this is a database config sample for zammad ready to use with a postgresql db
|
||||||
|
# copy or symlink this file to zammads config/database.yml directory to use it
|
||||||
|
|
||||||
default: &default
|
default: &default
|
||||||
# For details on connection pooling, see Rails configuration guide
|
# For details on connection pooling, see Rails configuration guide
|
||||||
# http://guides.rubyonrails.org/configuring.html#database-pooling
|
# http://guides.rubyonrails.org/configuring.html#database-pooling
|
||||||
pool: 50
|
pool: 50
|
||||||
timeout: 5000
|
timeout: 5000
|
||||||
encoding: utf8
|
encoding: utf8
|
||||||
# postgresql -----------------------------------------------------------------
|
|
||||||
|
##### postgresql config #####
|
||||||
|
|
||||||
adapter: postgresql
|
adapter: postgresql
|
||||||
# username: <username>
|
username: zammad
|
||||||
# password: <password>
|
password:
|
||||||
# mysql ----------------------------------------------------------------------
|
|
||||||
|
#### mysql config #####
|
||||||
|
|
||||||
# adapter: mysql2
|
# adapter: mysql2
|
||||||
# host: localhost
|
# username: zammad
|
||||||
# username: <username>
|
# password: <Password>
|
||||||
# password: <password>
|
|
||||||
|
|
||||||
production:
|
production:
|
||||||
<<: *default
|
<<: *default
|
||||||
database: zammad_prod
|
database: zammad_production
|
||||||
|
|
||||||
development:
|
development:
|
||||||
<<: *default
|
<<: *default
|
13
contrib/packager.io/before.sh
Normal file
13
contrib/packager.io/before.sh
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# packager.io before script
|
||||||
|
#
|
||||||
|
|
||||||
|
# print environemnt
|
||||||
|
uname -a
|
||||||
|
ruby -v
|
||||||
|
env
|
||||||
|
cat Gemfile.lock
|
||||||
|
|
||||||
|
# cleanup
|
||||||
|
script/build/cleanup.sh
|
|
@ -180,7 +180,7 @@ function update_database_yml () {
|
||||||
sed -e "s/.*adapter:.*/ adapter: ${ADAPTER}/" \
|
sed -e "s/.*adapter:.*/ adapter: ${ADAPTER}/" \
|
||||||
-e "s/.*username:.*/ username: ${DB_USER}/" \
|
-e "s/.*username:.*/ username: ${DB_USER}/" \
|
||||||
-e "s/.*password:.*/ password: ${DB_PASS}/" \
|
-e "s/.*password:.*/ password: ${DB_PASS}/" \
|
||||||
-e "s/.*database:.*/ database: ${DB}/" < ${ZAMMAD_DIR}/contrib/database.yml.pkgr > ${ZAMMAD_DIR}/config/database.yml
|
-e "s/.*database:.*/ database: ${DB}/" < ${ZAMMAD_DIR}/contrib/packager.io/database.yml.pkgr > ${ZAMMAD_DIR}/config/database.yml
|
||||||
}
|
}
|
||||||
|
|
||||||
function initialise_database () {
|
function initialise_database () {
|
||||||
|
|
|
@ -8,7 +8,7 @@ if [ "$CI_BUILD_REF_NAME" != "$CI_BUILD_TAG" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
contrib/cleanup.sh
|
cleanup.sh
|
||||||
|
|
||||||
( find . -type d -name ".git" \
|
( find . -type d -name ".git" \
|
||||||
&& find . -name ".gitignore" \
|
&& find . -name ".gitignore" \
|
||||||
|
|
Loading…
Reference in a new issue