[download-web] Make database user and name configurable
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [download-web] Make database user and name configurable
- Date: Sun, 13 Oct 2019 09:10:22 +0000 (UTC)
commit bfc7778d3313687e0c14f34347bc319527b21913
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date: Sun Oct 13 11:07:14 2019 +0200
Make database user and name configurable
download.gnome.org.conf | 2 +-
entrypoint.sh | 11 +++++++++--
mirrorbrain.conf | 10 +++++-----
3 files changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/download.gnome.org.conf b/download.gnome.org.conf
index 127def5..87fe32b 100644
--- a/download.gnome.org.conf
+++ b/download.gnome.org.conf
@@ -9,7 +9,7 @@
</IfModule>
DBDriver pgsql
-DBDParams "host=DBHOST user=mirrorbrain password=DBPASS dbname=mirrorbrain connect_timeout=15"
+DBDParams "host=DB_HOST user=DB_USER password=DB_PASSWORD dbname=DB_NAME connect_timeout=15"
LoadModule form_module modules/mod_form.so
LoadModule mirrorbrain_module modules/mod_mirrorbrain.so
diff --git a/entrypoint.sh b/entrypoint.sh
index 9f56220..3247c13 100755
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -1,7 +1,14 @@
#!/bin/bash
-sed -i "s/DBHOST/$DBHOST/g;s/DBPASS/$DBPASS/g" /downloads/mirrorbrain.conf
-sed -i "s/DBHOST/$DBHOST/g;s/DBPASS/$DBPASS/g" /downloads/httpd.conf
+sed -i "s/DB_HOST/$DB_HOST/g" /download/mirrorbrain.conf
+sed -i "s/DB_NAME/$DB_NAME/g" /download/mirrorbrain.conf
+sed -i "s/DB_USER/$DB_USER/g" /download/mirrorbrain.conf
+sed -i "s/DB_PASSWORD/$DB_PASSWORD/g" /download/mirrorbrain.conf
+
+sed -i "s/DB_HOST/$DB_HOST/g" /download/httpd.conf
+sed -i "s/DB_NAME/$DB_NAME/g" /download/httpd.conf
+sed -i "s/DB_USER/$DB_USER/g" /download/httpd.conf
+sed -i "s/DB_PASSWORD/$DB_PASSWORD/g" /download/httpd.conf
exec httpd -DFOREGROUND $@
diff --git a/mirrorbrain.conf b/mirrorbrain.conf
index 18a8bd7..46e69f9 100644
--- a/mirrorbrain.conf
+++ b/mirrorbrain.conf
@@ -2,12 +2,12 @@
instances = main
[main]
-dbuser = mirrorbrain
-dbpass = DBPASS
+dbuser = DB_USER
+dbpass = DB_PASSWORD
dbdriver = postgresql
-dbhost = DBHOST
-dbname = mirrorbrain
+dbhost = DB_HOST
+dbname = DB_NAME
[mirrorprobe]
-logfile = /downloads/mirrorprobe.log
+logfile = /download/mirrorprobe.log
loglevel = INFO
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]