Skip to content

Commit afada8a

Browse files
committed
Merge remote-tracking branch 'temp/master'
2 parents bb3e86f + 1913e89 commit afada8a

File tree

8 files changed

+443
-0
lines changed

8 files changed

+443
-0
lines changed

myadmin/.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
r
2+
b
3+
myadmin-fpm.conf
4+
config*
5+
.gitattributes
6+
.gitignore
7+
.git

myadmin/Dockerfile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
FROM phpmyadmin/phpmyadmin
2+
3+
# Install phpmyadmin 4.0
4+
ENV M40_VERSION 4.0.10.20
5+
ENV M40 phpMyAdmin-${M40_VERSION}-all-languages.tar.gz
6+
7+
COPY $M40 phpMyAdmin.tar.gz
8+
RUN set -ex; \
9+
tar -xf phpMyAdmin.tar.gz -C /var/www; \
10+
rm phpMyAdmin.tar.gz; \
11+
mv /var/www/phpMyAdmin-${M40_VERSION}-all-languages /var/www/myadmin40; \
12+
rm -rf /var/www/myadmin40/setup/ /var/www/myadmin40/examples/ /var/www/myadmin40/composer.json; \
13+
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin40/');@" /var/www/myadmin40/libraries/vendor_config.php; \
14+
sed -i "s@define('CONFIG_FILE'.*@define('CONFIG_FILE', CONFIG_DIR . 'config.user.inc.php');@" /var/www/myadmin40/libraries/vendor_config.php
15+
16+
# Enable SSL and /m40
17+
RUN set -ex; \
18+
a2enmod ssl; \
19+
a2ensite default-ssl; \
20+
sed -i "/<VirtualHost/Ia ServerName myadmin.uwc.ufanet.ru:443" /etc/apache2/sites-available/default-ssl.conf; \
21+
sed -i "s@ssl-cert-snakeoil@u@g" /etc/apache2/sites-available/default-ssl.conf; \
22+
{ echo ; \
23+
echo 'Alias /m40 /var/www/myadmin40'; \
24+
echo '<Directory /var/www/myadmin40>'; \
25+
echo 'Options None'; \
26+
echo 'AllowOverride None'; \
27+
echo 'DirectoryIndex index.php'; \
28+
echo 'Require all granted'; \
29+
echo '</Directory>'; \
30+
echo ''; \
31+
echo '<Directory /var/www/myadmin40/libraries>'; \
32+
echo 'Require all denied'; \
33+
echo '</Directory>'; } > _tmp_ttt; \
34+
sed -i "/DocumentRoot/Ir _tmp_ttt" /etc/apache2/sites-available/default-ssl.conf; \
35+
rm _tmp_ttt
36+
37+
EXPOSE 80 443
38+
39+
# same from phpmyadmin/phpmyadmin
40+
#ENTRYPOINT [ "/docker-entrypoint.sh" ]
41+
#CMD ["apache2-foreground"]

myadmin/b

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#/bin/bash
2+
3+
docker build -t uralm1/myadmin .

myadmin/config.inc.php

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
<?php
2+
/* vim: set expandtab sw=4 ts=4 sts=4: */
3+
4+
/**
5+
* This is needed for cookie based authentication to encrypt password in
6+
* cookie. Needs to be 32 chars long.
7+
*/
8+
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
9+
10+
/**
11+
* Servers configuration
12+
*/
13+
$i = 0;
14+
15+
/*
16+
* SRV1
17+
*/
18+
$i++;
19+
/* Authentication type */
20+
$cfg['Servers'][$i]['auth_type'] = 'cookie';
21+
/* Server parameters */
22+
$cfg['Servers'][$i]['host'] = 'srv1';
23+
$cfg['Servers'][$i]['connect_type'] = 'tcp';
24+
$cfg['Servers'][$i]['compress'] = false;
25+
$cfg['Servers'][$i]['AllowNoPassword'] = false;
26+
27+
/*
28+
* phpMyAdmin configuration storage settings.
29+
*/
30+
31+
/* User used to manipulate with storage */
32+
$cfg['Servers'][$i]['controlhost'] = '';
33+
$cfg['Servers'][$i]['controlport'] = '';
34+
$cfg['Servers'][$i]['controluser'] = 'pma';
35+
$cfg['Servers'][$i]['controlpass'] = 'pmapass';
36+
37+
/* Storage database and tables */
38+
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
39+
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
40+
$cfg['Servers'][$i]['relation'] = 'pma__relation';
41+
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
42+
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
43+
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
44+
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
45+
$cfg['Servers'][$i]['history'] = 'pma__history';
46+
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
47+
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
48+
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
49+
$cfg['Servers'][$i]['recent'] = 'pma__recent';
50+
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
51+
$cfg['Servers'][$i]['users'] = 'pma__users';
52+
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
53+
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
54+
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
55+
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
56+
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
57+
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
58+
59+
60+
/**
61+
* End of servers configuration
62+
*/
63+
64+
/**
65+
* Directories for saving/loading files from server
66+
*/
67+
$cfg['UploadDir'] = '';
68+
$cfg['SaveDir'] = '';
69+
70+
/**
71+
* Whether to display icons or text or both icons and text in table row
72+
* action segment. Value can be either of 'icons', 'text' or 'both'.
73+
* default = 'both'
74+
*/
75+
//$cfg['RowActionType'] = 'icons';
76+
77+
/**
78+
* Defines whether a user should be displayed a "show all (records)"
79+
* button in browse mode or not.
80+
* default = false
81+
*/
82+
//$cfg['ShowAll'] = true;
83+
84+
/**
85+
* Number of rows displayed when browsing a result set. If the result
86+
* set contains more rows, "Previous" and "Next".
87+
* Possible values: 25, 50, 100, 250, 500
88+
* default = 25
89+
*/
90+
//$cfg['MaxRows'] = 50;
91+
92+
/**
93+
* Disallow editing of binary fields
94+
* valid values are:
95+
* false allow editing
96+
* 'blob' allow editing except for BLOB fields
97+
* 'noblob' disallow editing except for BLOB fields
98+
* 'all' disallow editing
99+
* default = 'blob'
100+
*/
101+
//$cfg['ProtectBinary'] = false;
102+
103+
/**
104+
* Default language to use, if not browser-defined or user-defined
105+
* (you find all languages in the locale folder)
106+
* uncomment the desired line:
107+
* default = 'en'
108+
*/
109+
//$cfg['DefaultLang'] = 'en';
110+
//$cfg['DefaultLang'] = 'de';
111+
112+
/**
113+
* How many columns should be used for table display of a database?
114+
* (a value larger than 1 results in some information being hidden)
115+
* default = 1
116+
*/
117+
//$cfg['PropertiesNumColumns'] = 2;
118+
119+
/**
120+
* Set to true if you want DB-based query history.If false, this utilizes
121+
* JS-routines to display query history (lost by window close)
122+
*
123+
* This requires configuration storage enabled, see above.
124+
* default = false
125+
*/
126+
//$cfg['QueryHistoryDB'] = true;
127+
128+
/**
129+
* When using DB-based query history, how many entries should be kept?
130+
*
131+
* default = 25
132+
*/
133+
//$cfg['QueryHistoryMax'] = 100;
134+
135+
/**
136+
* Whether or not to query the user before sending the error report to
137+
* the phpMyAdmin team when a JavaScript error occurs
138+
*
139+
* Available options
140+
* ('ask' | 'always' | 'never')
141+
* default = 'ask'
142+
*/
143+
//$cfg['SendErrorReports'] = 'always';
144+
145+
/**
146+
* You can find more configuration options in the documentation
147+
* in the doc/ folder or at <https://docs.phpmyadmin.net/>.
148+
*/

myadmin/config4.inc.php

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
<?php
2+
/* vim: set expandtab sw=4 ts=4 sts=4: */
3+
4+
/*
5+
* This is needed for cookie based authentication to encrypt password in
6+
* cookie
7+
*/
8+
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
9+
10+
/*
11+
* Servers configuration
12+
*/
13+
$i = 0;
14+
15+
/*
16+
* SRV1
17+
*/
18+
$i++;
19+
/* Authentication type */
20+
$cfg['Servers'][$i]['auth_type'] = 'cookie';
21+
/* Server parameters */
22+
$cfg['Servers'][$i]['host'] = 'srv1';
23+
$cfg['Servers'][$i]['port'] = '3305';
24+
$cfg['Servers'][$i]['connect_type'] = 'tcp';
25+
$cfg['Servers'][$i]['compress'] = false;
26+
/* Select mysql if your server does not have mysqli */
27+
$cfg['Servers'][$i]['extension'] = 'mysqli';
28+
$cfg['Servers'][$i]['AllowNoPassword'] = true;
29+
30+
/*
31+
* phpMyAdmin configuration storage settings.
32+
*/
33+
34+
/* User used to manipulate with storage */
35+
// $cfg['Servers'][$i]['controlhost'] = '';
36+
// $cfg['Servers'][$i]['controluser'] = 'pma';
37+
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';
38+
39+
/* Storage database and tables */
40+
// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
41+
// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
42+
// $cfg['Servers'][$i]['relation'] = 'pma__relation';
43+
// $cfg['Servers'][$i]['table_info'] = 'pma__table_info';
44+
// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
45+
// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
46+
// $cfg['Servers'][$i]['column_info'] = 'pma__column_info';
47+
// $cfg['Servers'][$i]['history'] = 'pma__history';
48+
// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
49+
// $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
50+
// $cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
51+
// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
52+
// $cfg['Servers'][$i]['recent'] = 'pma__recent';
53+
/* Contrib / Swekey authentication */
54+
// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';
55+
56+
57+
/*
58+
* End of servers configuration
59+
*/
60+
61+
/*
62+
* Directories for saving/loading files from server
63+
*/
64+
$cfg['UploadDir'] = '';
65+
$cfg['SaveDir'] = '';
66+
67+
/**
68+
* Defines whether a user should be displayed a "show all (records)"
69+
* button in browse mode or not.
70+
* default = false
71+
*/
72+
//$cfg['ShowAll'] = true;
73+
74+
/**
75+
* Number of rows displayed when browsing a result set. If the result
76+
* set contains more rows, "Previous" and "Next".
77+
* default = 30
78+
*/
79+
//$cfg['MaxRows'] = 50;
80+
81+
/**
82+
* disallow editing of binary fields
83+
* valid values are:
84+
* false allow editing
85+
* 'blob' allow editing except for BLOB fields
86+
* 'noblob' disallow editing except for BLOB fields
87+
* 'all' disallow editing
88+
* default = blob
89+
*/
90+
//$cfg['ProtectBinary'] = 'false';
91+
92+
/**
93+
* Default language to use, if not browser-defined or user-defined
94+
* (you find all languages in the locale folder)
95+
* uncomment the desired line:
96+
* default = 'en'
97+
*/
98+
//$cfg['DefaultLang'] = 'en';
99+
//$cfg['DefaultLang'] = 'de';
100+
101+
/**
102+
* default display direction (horizontal|vertical|horizontalflipped)
103+
*/
104+
//$cfg['DefaultDisplay'] = 'vertical';
105+
106+
107+
/**
108+
* How many columns should be used for table display of a database?
109+
* (a value larger than 1 results in some information being hidden)
110+
* default = 1
111+
*/
112+
//$cfg['PropertiesNumColumns'] = 2;
113+
114+
/**
115+
* Set to true if you want DB-based query history.If false, this utilizes
116+
* JS-routines to display query history (lost by window close)
117+
*
118+
* This requires configuration storage enabled, see above.
119+
* default = false
120+
*/
121+
//$cfg['QueryHistoryDB'] = true;
122+
123+
/**
124+
* When using DB-based query history, how many entries should be kept?
125+
*
126+
* default = 25
127+
*/
128+
//$cfg['QueryHistoryMax'] = 100;
129+
130+
/*
131+
* You can find more configuration options in the documentation
132+
* in the doc/ folder or at <http://docs.phpmyadmin.net/>.
133+
*/
134+
?>

0 commit comments

Comments
 (0)