public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
Use env vars for PHP app
774320d5
data/conf/nginx/site.conf | 3 +--
data/web/inc/vars.inc.php | 7 +++----
docker-compose.yml | 4 ++++
3 files changed, 8 insertions(+), 6 deletions(-)
Diff
diff --git a/data/conf/nginx/site.conf b/data/conf/nginx/site.conf
index 9433b608..0b086f28 100644
--- a/data/conf/nginx/site.conf
+++ b/data/conf/nginx/site.conf
@@ -34,7 +34,6 @@ server {
deny all;
}
-
location ^~ /Microsoft-Server-ActiveSync {
proxy_pass http://sogo/SOGo/Microsoft-Server-ActiveSync;
proxy_connect_timeout 1000;
@@ -85,7 +84,7 @@ server {
}
location /SOGo/WebServerResources/ {
- alias /usr/lib/GNUstep/SOGo/WebServerResources/;
+ alias /usr/lib/GNUstep/SOGo/WebServerResources/;
allow all;
}
diff --git a/data/web/inc/vars.inc.php b/data/web/inc/vars.inc.php
index 158729c9..db96fb67 100644
--- a/data/web/inc/vars.inc.php
+++ b/data/web/inc/vars.inc.php
@@ -9,9 +9,9 @@ This file will be reset on upgrades.
// SQL database connection variables
$database_type = "mysql";
$database_host = "mysql";
-$database_user = "mailcow";
-$database_pass = "mysafepasswd";
-$database_name = "mailcow";
+$database_user = getenv('DBUSER');
+$database_pass = getenv('DBPASS');
+$database_name = getenv('DBNAME');
// Where to go after adding and editing objects
// Can be "form" or "previous"
@@ -30,5 +30,4 @@ $DEFAULT_LANG = "en";
// simplex, slate, spacelab, superhero, united, yeti
// See https://bootswatch.com/
$DEFAULT_THEME = "lumen";
-
?>
diff --git a/docker-compose.yml b/docker-compose.yml
index 84350ccb..4622f6d2 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -70,6 +70,10 @@ services:
- ./data/web:/web:ro
- ./data/conf/rspamd/dynmaps:/dynmaps:ro
- ./data/dkim/:/shared/dkim/
+ environment:
+ - DBNAME=${DBNAME}
+ - DBUSER=${DBUSER}
+ - DBPASS=${DBPASS}
restart: always
networks:
mailcow-network: