mirror of
https://gitlab.com/depesz/explain.depesz.com.git
synced 2025-02-17 14:11:15 +02:00
Consistently name db, dbuser, and password.
This commit is contained in:
parent
7278f98ef9
commit
504c1d77f4
@ -4,9 +4,9 @@
|
||||
"secret" : "|Erp--Wjgb)+eiB/|H=|V7!#+M|L{a8=J2|pd+N1=M|&pJWq|M&,f3q^XS",
|
||||
|
||||
"database" : {
|
||||
"dsn" : "dbi:Pg:database=explaind;host=127.0.0.1;port=5432",
|
||||
"username" : "explaind",
|
||||
"password" : "explaind",
|
||||
"dsn" : "dbi:Pg:database=explain;host=127.0.0.1;port=5432",
|
||||
"username" : "explain",
|
||||
"password" : "explain",
|
||||
"options" : {
|
||||
"auto_commit" : 1,
|
||||
"pg_server_prepare" : 0,
|
||||
|
12
explain.pp
12
explain.pp
@ -48,17 +48,17 @@ exec { 'install_cpanm_email_valid': command => 'cpanm --notest Email::Valid' }
|
||||
exec { 'install_cpanm_pg_explain': command => 'cpanm --notest Pg::Explain', timeout => 600 } # Takes about 450-500 secs.
|
||||
exec { 'install_cpanm_mojolicious': command => 'cpanm --notest Mojolicious' }
|
||||
|
||||
exec { 'createuser': command => 'sudo -u postgres psql -c "create role explaind with login password \'explaind\'"' }
|
||||
exec { 'createdb': command => 'sudo -u postgres createdb -E utf8 -O explaind explaind' }
|
||||
exec { 'createuser': command => 'sudo -u postgres psql -c "create role explain with login password \'explain\'"' }
|
||||
exec { 'createdb': command => 'sudo -u postgres createdb -E utf8 -O explain explain' }
|
||||
|
||||
exec { 'psql_create':
|
||||
command => sprintf("sudo -u postgres psql -d explaind < %s/sql/create.sql", $PROJECT_DIR)
|
||||
command => sprintf("sudo -u postgres psql -d explain < %s/sql/create.sql", $PROJECT_DIR)
|
||||
}
|
||||
exec { 'psql_apply_patches':
|
||||
command => sprintf("ls -1 %s/sql/patch-???.sql | sort | xargs -n1 sudo -u postgres psql -d explaind -q -f", $PROJECT_DIR)
|
||||
command => sprintf("ls -1 %s/sql/patch-???.sql | sort | xargs -n1 sudo -u postgres psql -d explain -q -f", $PROJECT_DIR)
|
||||
}
|
||||
exec { 'psql_grant':
|
||||
command => 'sudo -u postgres psql -d explaind -c "grant all on plans, users to explaind;"'
|
||||
command => 'sudo -u postgres psql -d explain -c "grant all on plans, users to explain;"'
|
||||
}
|
||||
|
||||
exec { 'run_daemon': command => sprintf("hypnotoad %s/explain.pl > /dev/null 2> /dev/null &", $PROJECT_DIR) }
|
||||
@ -85,7 +85,7 @@ package { 'nginx':
|
||||
}
|
||||
|
||||
|
||||
file { '/etc/nginx/conf.d/explaind.conf':
|
||||
file { '/etc/nginx/conf.d/explain.conf':
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
content => '
|
||||
|
Loading…
x
Reference in New Issue
Block a user