summaryrefslogtreecommitdiffstats
path: root/Applications
diff options
context:
space:
mode:
Diffstat (limited to 'Applications')
-rw-r--r--Applications/phpmyadmin/config.inc.php32
-rw-r--r--Applications/phpmyadmin/config.php13
-rw-r--r--Applications/phpmyadmin/docker-compose-demo.yml2
-rw-r--r--Applications/phpmyadmin/docker-compose.yml20
4 files changed, 22 insertions, 45 deletions
diff --git a/Applications/phpmyadmin/config.inc.php b/Applications/phpmyadmin/config.inc.php
index 5c73c2e..6d46fcc 100644
--- a/Applications/phpmyadmin/config.inc.php
+++ b/Applications/phpmyadmin/config.inc.php
@@ -1,4 +1,5 @@
<?php
+
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* phpMyAdmin sample configuration, you can use it as base for
@@ -9,12 +10,12 @@
*
* @package PhpMyAdmin
*/
-
/**
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
-$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$cfg['blowfish_secret'] = 'SECRET'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
+$cfg['PmaNoRelation_DisableWarning'] = true;
/**
* Servers configuration
@@ -24,19 +25,25 @@ $i = 0;
/**
* First server
*/
-$i++;
-/* Authentication type */
-$cfg['Servers'][$i]['auth_type'] = 'cookie';
-/* Server parameters */
-$cfg['Servers'][$i]['host'] = 'localhost';
-$cfg['Servers'][$i]['connect_type'] = 'tcp';
-$cfg['Servers'][$i]['compress'] = false;
-$cfg['Servers'][$i]['AllowNoPassword'] = false;
-
+if(getenv('DB_ENV_MYSQL_USER') != '') {
+ $i++;
+ $cfg['Servers'][$i]['extension'] = 'mysqli';
+ $cfg['Servers'][$i]['host'] = 'db';
+ $cfg['Servers'][$i]['controlhost'] = '';
+ $cfg['Servers'][$i]['controluser'] = getenv('DB_ENV_MYSQL_USER');
+ $cfg['Servers'][$i]['controlpass'] = getenv('DB_ENV_MYSQL_PASSWORD');
+}
+if(getenv('DB2_ENV_MYSQL_USER') != '') {
+ $i++;
+ $cfg['Servers'][$i]['extension'] = 'mysqli';
+ $cfg['Servers'][$i]['host'] = 'db2';
+ $cfg['Servers'][$i]['controlhost'] = '';
+ $cfg['Servers'][$i]['controluser'] = getenv('DB2_ENV_MYSQL_USER');
+ $cfg['Servers'][$i]['controlpass'] = getenv('DB2_ENV_MYSQL_PASSWORD');
+}
/**
* phpMyAdmin configuration storage settings.
*/
-
/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controlport'] = '';
@@ -70,7 +77,6 @@ $cfg['Servers'][$i]['AllowNoPassword'] = false;
/**
* End of servers configuration
*/
-
/**
* Directories for saving/loading files from server
*/
diff --git a/Applications/phpmyadmin/config.php b/Applications/phpmyadmin/config.php
deleted file mode 100644
index 20e4276..0000000
--- a/Applications/phpmyadmin/config.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-// fichier qui provient du container startx/app-pma
-$cfg['blowfish_secret'] = 'SECRET';
-$cfg['PmaNoRelation_DisableWarning'] = true;
-$i = 0;
-$i++;
-$cfg['Servers'][$i]['extension'] = 'mysqli';
-$cfg['Servers'][$i]['host'] = 'mariadb';
-$cfg['Servers'][$i]['controlhost'] = '';
-$cfg['Servers'][$i]['controluser'] = 'root';
-$cfg['Servers'][$i]['controlpass'] = 'secretdemerde';
-
-?>
diff --git a/Applications/phpmyadmin/docker-compose-demo.yml b/Applications/phpmyadmin/docker-compose-demo.yml
index c4b9401..8ba0c2c 100644
--- a/Applications/phpmyadmin/docker-compose-demo.yml
+++ b/Applications/phpmyadmin/docker-compose-demo.yml
@@ -4,7 +4,7 @@ demo_pma:
ports:
- "81:80"
links:
- - demo_db:db
+ - demo_pma_db:db
environment:
CONTAINER_TYPE: "application"
CONTAINER_SERVICE: "phpmyadmin"
diff --git a/Applications/phpmyadmin/docker-compose.yml b/Applications/phpmyadmin/docker-compose.yml
index 7f2f747..550cd2c 100644
--- a/Applications/phpmyadmin/docker-compose.yml
+++ b/Applications/phpmyadmin/docker-compose.yml
@@ -8,27 +8,11 @@ server:
ports:
- "9215:80"
- "9216:443"
- links:
- - demo_db:db
environment:
CONTAINER_TYPE: "application"
CONTAINER_SERVICE: "phpmyadmin"
CONTAINER_INSTANCE: "application-phpmyadmin"
SERVER_NAME: "localhost"
volumes:
- - "/tmp/container/logs/phpmyadmin:/data/logs/apache_php"
- - "/tmp/container/phpmyadmin:/data/apache_php"
-
-demo_db:
- image: startx/sv-mariadb
- container_name: "service-mariadb"
- expose:
- - "3306"
- environment:
- CONTAINER_TYPE: "service"
- CONTAINER_SERVICE: "mariadb"
- CONTAINER_INSTANCE: "service-mariadb"
- MYSQL_ROOT_PASSWORD: "secretdemerde"
- MYSQL_USER: "user-test"
- MYSQL_PASSWORD: "pwd-test"
- MYSQL_DATABASE: "db_test" \ No newline at end of file
+ - "/tmp/container/logs/phpmyadmin:/data/logs/apache"
+ - "/tmp/container/phpmyadmin:/data/apache" \ No newline at end of file