dalsze prace, pgadmin container, początki openldap, pgadmin rozgrzebany
parent
bd3a7d80a2
commit
b640252c19
|
@ -22,7 +22,7 @@ RUN DEBIAN_FRONTEND=noninteractive \
|
|||
# finally, make sure that this sed script runs every few minutes on all /etc/cron.d files
|
||||
RUN rm -rf /etc/cron.*/* \
|
||||
&& sed -i -r -e 's/^(([/0-9*,-]+\s+){5}|@(reboot|yearly|annually|monthly|weekly|daily|midnight|hourly)\s+)root\s+(.*)/\1\tnobody\t\4/' /etc/crontab \
|
||||
&& echo "*/15 * * * * root sed -i -r -e 's/^(([/0-9*,-]+\s+){5}|@(reboot|yearly|annually|monthly|weekly|daily|midnight|hourly)\s+)root\s+(.*)/\1\tnobody\t\4/' /etc/cron.d/*" >> /etc/crontab
|
||||
&& echo "*/15 * * * * root sed -i -r -e 's/^(([/0-9*,-]+\s+){5}|@(reboot|yearly|annually|monthly|weekly|daily|midnight|hourly)\s+)root\s+(.*)/\\1\\tnobody\\t\\4/' /etc/cron.d/*" >> /etc/crontab
|
||||
|
||||
# cron volumes
|
||||
VOLUME ["/etc/cron.d", "/etc/cron.daily", "/etc/cron.hourly", "/etc/cron.monthly", "/etc/cron.weekly"]
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
FROM plug/php-fpm
|
||||
MAINTAINER Michał "rysiek" Woźniak <rysiek@hackerspace.pl>
|
||||
|
||||
ENV APP_NAME "pgadmin"
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends git \
|
||||
&& git clone -b REL_5-1 --single-branch https://github.com/phppgadmin/phppgadmin.git /opt/php/pgadmin \
|
||||
&& rm -rf /opt/php/pgadmin/.git \
|
||||
&& chown -R www-data:www-data /opt/php/pgadmin \
|
||||
&& apt-get purge -y git \
|
||||
&& apt-get autoremove -y
|
||||
|
||||
VOLUME ["/opt/php/pgadmin/conf"]
|
|
@ -1,8 +1,11 @@
|
|||
FROM debian:jessie
|
||||
MAINTAINER Michal "rysiek" Woźniak <rysiek@hackerspace.pl>
|
||||
|
||||
RUN LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get update && apt-get upgrade && apt-get install -y --no-install-recommends slapd ldap-utils openssl \
|
||||
slapd ldapscripts ldap-utils ca-certificates ssl-cert
|
||||
ENV LC_ALL C
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt-get update && apt-get upgrade \
|
||||
&& apt-get install -y --no-install-recommends slapd ldap-utils ldapscripts
|
||||
|
||||
EXPOSE 389 636
|
||||
|
||||
|
|
13
setup.sh
13
setup.sh
|
@ -94,7 +94,6 @@ if [[ "$mode" == "" || "$mode" == "--populate-static-data" ]]; then
|
|||
sudo mkdir "$static_data_dir/data/php-fpm"
|
||||
sudo mkdir "$static_data_dir/data/php-fpm/frontend"
|
||||
sudo mkdir "$static_data_dir/data/php-fpm/rest"
|
||||
sudo mkdir "$static_data_dir/data/php-fpm/pgadmin"
|
||||
sudo mkdir "$static_data_dir/data/php-fpm/ldapadmin"
|
||||
sudo mkdir "$static_data_dir/data/cron"
|
||||
sudo mkdir "$static_data_dir/data/cron/d"
|
||||
|
@ -122,6 +121,7 @@ fi
|
|||
img_postgres="$prefix/postgres"
|
||||
img_nginx="$prefix/nginx"
|
||||
img_phpfpm="$prefix/php-fpm"
|
||||
img_pgadmin="$prefix/pgadmin"
|
||||
img_cron="$prefix/cron"
|
||||
|
||||
#
|
||||
|
@ -136,8 +136,8 @@ cnt_nginx_internal="$prefix-nginx.internal"
|
|||
# php-fpm
|
||||
cnt_phpfpm_frontend="$prefix-php-fpm.frontend"
|
||||
cnt_phpfpm_rest="$prefix-php-fpm.rest"
|
||||
cnt_phpfpm_pgadmin="$prefix-php-fpm.pgadmin"
|
||||
cnt_phpfpm_ldapadmin="$prefix-php-fpm.ldapadmin"
|
||||
cnt_pgadmin="$prefix-pgadmin"
|
||||
#cnt_phpfpm_ldapadmin="$prefix-ldapadmin"
|
||||
# cron
|
||||
cnt_cron="$prefix-cron"
|
||||
|
||||
|
@ -209,13 +209,12 @@ if [[ "$mode" == "" || "$mode" == "--run" ]]; then
|
|||
|
||||
# - pgadmin
|
||||
docker run -d \
|
||||
-v "$static_data_dir/data/php-fpm/pgadmin/":/opt/php/pgadmin/ \
|
||||
-v "$static_data_dir/configs/pgadmin/":/opt/php/pgadmin/conf/:ro \
|
||||
-v "$static_data_dir/logs/php-fpm/":/var/log/php-fpm \
|
||||
-v "$static_data_dir/run/php-fpm/":/var/run/php-fpm \
|
||||
--link $cnt_postgres:$cnt_postgres \
|
||||
-e "APP_NAME=pgadmin" \
|
||||
--name $cnt_phpfpm_pgadmin \
|
||||
$img_phpfpm
|
||||
--name $cnt_pgadmin \
|
||||
$img_pgadmin
|
||||
|
||||
# - ldapadmin
|
||||
#docker run -d \
|
||||
|
|
|
@ -0,0 +1,123 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Central phpPgAdmin configuration. As a user you may modify the
|
||||
* settings here for your particular configuration.
|
||||
*
|
||||
* $Id: config.inc.php-dist,v 1.55 2008/02/18 21:10:31 xzilla Exp $
|
||||
*/
|
||||
|
||||
// An example server. Create as many of these as you wish,
|
||||
// indexed from zero upwards.
|
||||
|
||||
// Display name for the server on the login screen
|
||||
$conf['servers'][0]['desc'] = 'PLUG :: PostgreSQL';
|
||||
|
||||
// Hostname or IP address for server. Use '' for UNIX domain socket.
|
||||
// use 'localhost' for TCP/IP connection on this computer
|
||||
$conf['servers'][0]['host'] = 'plug-postgres';
|
||||
|
||||
// Database port on server (5432 is the PostgreSQL default)
|
||||
$conf['servers'][0]['port'] = 5432;
|
||||
|
||||
// Database SSL mode
|
||||
// Possible options: disable, allow, prefer, require
|
||||
// To require SSL on older servers use option: legacy
|
||||
// To ignore the SSL mode, use option: unspecified
|
||||
$conf['servers'][0]['sslmode'] = 'allow';
|
||||
|
||||
// Change the default database only if you cannot connect to template1.
|
||||
// For a PostgreSQL 8.1+ server, you can set this to 'postgres'.
|
||||
$conf['servers'][0]['defaultdb'] = 'template0';
|
||||
|
||||
// Specify the path to the database dump utilities for this server.
|
||||
// You can set these to '' if no dumper is available.
|
||||
$conf['servers'][0]['pg_dump_path'] = '/usr/bin/pg_dump';
|
||||
$conf['servers'][0]['pg_dumpall_path'] = '/usr/bin/pg_dumpall';
|
||||
|
||||
// Default language. E.g.: 'english', 'polish', etc. See lang/ directory
|
||||
// for all possibilities. If you specify 'auto' (the default) it will use
|
||||
// your browser preference.
|
||||
$conf['default_lang'] = 'auto';
|
||||
|
||||
// AutoComplete uses AJAX interaction to list foreign key values
|
||||
// on insert fields. It currently only works on single column
|
||||
// foreign keys. You can choose one of the following values:
|
||||
// 'default on' enables AutoComplete and turns it on by default.
|
||||
// 'default off' enables AutoComplete but turns it off by default.
|
||||
// 'disable' disables AutoComplete.
|
||||
$conf['autocomplete'] = 'default on';
|
||||
|
||||
// If extra login security is true, then logins via phpPgAdmin with no
|
||||
// password or certain usernames (pgsql, postgres, root, administrator)
|
||||
// will be denied. Only set this false once you have read the FAQ and
|
||||
// understand how to change PostgreSQL's pg_hba.conf to enable
|
||||
// passworded local connections.
|
||||
$conf['extra_login_security'] = true;
|
||||
|
||||
// Only show owned databases?
|
||||
// Note: This will simply hide other databases in the list - this does
|
||||
// not in any way prevent your users from seeing other database by
|
||||
// other means. (e.g. Run 'SELECT * FROM pg_database' in the SQL area.)
|
||||
$conf['owned_only'] = false;
|
||||
|
||||
// Display comments on objects? Comments are a good way of documenting
|
||||
// a database, but they do take up space in the interface.
|
||||
$conf['show_comments'] = true;
|
||||
|
||||
// Display "advanced" objects? Setting this to true will show
|
||||
// aggregates, types, operators, operator classes, conversions,
|
||||
// languages and casts in phpPgAdmin. These objects are rarely
|
||||
// administered and can clutter the interface.
|
||||
$conf['show_advanced'] = false;
|
||||
|
||||
// Display "system" objects?
|
||||
$conf['show_system'] = false;
|
||||
|
||||
// Minimum length users can set their password to.
|
||||
$conf['min_password_length'] = 1;
|
||||
|
||||
// Width of the left frame in pixels (object browser)
|
||||
$conf['left_width'] = 200;
|
||||
|
||||
// Which look & feel theme to use
|
||||
$conf['theme'] = 'default';
|
||||
|
||||
// Show OIDs when browsing tables?
|
||||
$conf['show_oids'] = false;
|
||||
|
||||
// Max rows to show on a page when browsing record sets
|
||||
$conf['max_rows'] = 30;
|
||||
|
||||
// Max chars of each field to display by default in browse mode
|
||||
$conf['max_chars'] = 50;
|
||||
|
||||
// Send XHTML strict headers?
|
||||
$conf['use_xhtml_strict'] = false;
|
||||
|
||||
// Base URL for PostgreSQL documentation.
|
||||
// '%s', if present, will be replaced with the PostgreSQL version
|
||||
// (e.g. 8.4 )
|
||||
$conf['help_base'] = 'http://www.postgresql.org/docs/%s/interactive/';
|
||||
|
||||
// Configuration for ajax scripts
|
||||
// Time in seconds. If set to 0, refreshing data using ajax will be disabled (locks and activity pages)
|
||||
$conf['ajax_refresh'] = 3;
|
||||
|
||||
/** Plugins management
|
||||
* Add plugin names to the following array to activate them
|
||||
* Example:
|
||||
* $conf['plugins'] = array(
|
||||
* 'Example',
|
||||
* 'Slony'
|
||||
* );
|
||||
*/
|
||||
$conf['plugins'] = array();
|
||||
|
||||
/*****************************************
|
||||
* Don't modify anything below this line *
|
||||
*****************************************/
|
||||
|
||||
$conf['version'] = 19;
|
||||
|
||||
?>
|
|
@ -1,4 +0,0 @@
|
|||
<h1>PHP-FPM: pgadmin</h1>
|
||||
<?php
|
||||
echo phpinfo();
|
||||
?>
|
Loading…
Reference in New Issue