├── config ├── pgsql │ └── .pg_pass ├── php │ ├── 7.3 │ │ ├── conf.d │ │ │ ├── 00_bz2.ini │ │ │ ├── 00_dba.ini │ │ │ ├── 00_dom.ini │ │ │ ├── 00_ftp.ini │ │ │ ├── 00_gd.ini │ │ │ ├── 00_gmp.ini │ │ │ ├── 00_pdo.ini │ │ │ ├── 00_xml.ini │ │ │ ├── 00_zip.ini │ │ │ ├── 01_xsl.ini │ │ │ ├── 50_LZF.ini │ │ │ ├── 50_zmq.ini │ │ │ ├── apcu.ini │ │ │ ├── ast.ini │ │ │ ├── 00_ctype.ini │ │ │ ├── 00_curl.ini │ │ │ ├── 00_iconv.ini │ │ │ ├── 00_intl.ini │ │ │ ├── 00_json.ini │ │ │ ├── 00_ldap.ini │ │ │ ├── 00_odbc.ini │ │ │ ├── 00_pcntl.ini │ │ │ ├── 00_pgsql.ini │ │ │ ├── 00_posix.ini │ │ │ ├── 00_shmop.ini │ │ │ ├── 00_snmp.ini │ │ │ ├── 00_soap.ini │ │ │ ├── 00_tidy.ini │ │ │ ├── 01_exif.ini │ │ │ ├── 01_imap.ini │ │ │ ├── 01_phar.ini │ │ │ ├── 01_wddx.ini │ │ │ ├── 20_redis.ini │ │ │ ├── 40_amqp.ini │ │ │ ├── 60_oauth.ini │ │ │ ├── 70_yaml.ini │ │ │ ├── event.ini │ │ │ ├── imagick.ini │ │ │ ├── mcrypt.ini │ │ │ ├── 00_bcmath.ini │ │ │ ├── 00_calendar.ini │ │ │ ├── 00_enchant.ini │ │ │ ├── 00_fileinfo.ini │ │ │ ├── 00_gettext.ini │ │ │ ├── 00_mbstring.ini │ │ │ ├── 00_openssl.ini │ │ │ ├── 00_pspell.ini │ │ │ ├── 00_recode.ini │ │ │ ├── 00_session.ini │ │ │ ├── 00_sockets.ini │ │ │ ├── 00_sodium.ini │ │ │ ├── 00_sqlite3.ini │ │ │ ├── 00_sysvmsg.ini │ │ │ ├── 00_sysvsem.ini │ │ │ ├── 00_sysvshm.ini │ │ │ ├── 01_mysqlnd.ini │ │ │ ├── 01_pdo_odbc.ini │ │ │ ├── 01_xmlrpc.ini │ │ │ ├── 02_mysqli.ini │ │ │ ├── 10_igbinary.ini │ │ │ ├── 00_opcache.ini │ │ │ ├── 00_simplexml.ini │ │ │ ├── 00_tokenizer.ini │ │ │ ├── 00_xmlwriter.ini │ │ │ ├── 01_pdo_dblib.ini │ │ │ ├── 01_pdo_pgsql.ini │ │ │ ├── 01_pdo_sqlite.ini │ │ │ ├── 01_xmlreader.ini │ │ │ ├── 02_pdo_mysql.ini │ │ │ ├── 20_memcached.ini │ │ │ ├── 40_timezonedb.ini │ │ │ ├── 60_mailparse.ini │ │ │ └── xdebug.ini │ │ ├── pear.conf │ │ ├── php-fpm.conf │ │ └── php-fpm.d │ │ │ └── www.conf │ └── 7.4 │ │ ├── conf.d │ │ ├── 00_bz2.ini │ │ ├── 00_dba.ini │ │ ├── 00_dom.ini │ │ ├── 00_ftp.ini │ │ ├── 00_gd.ini │ │ ├── 00_gmp.ini │ │ ├── 00_pdo.ini │ │ ├── 00_xml.ini │ │ ├── 00_zip.ini │ │ ├── 01_xsl.ini │ │ ├── 50_LZF.ini │ │ ├── 50_zmq.ini │ │ ├── apcu.ini │ │ ├── ast.ini │ │ ├── 00_ctype.ini │ │ ├── 00_curl.ini │ │ ├── 00_iconv.ini │ │ ├── 00_intl.ini │ │ ├── 00_json.ini │ │ ├── 00_ldap.ini │ │ ├── 00_odbc.ini │ │ ├── 00_pcntl.ini │ │ ├── 00_pgsql.ini │ │ ├── 00_posix.ini │ │ ├── 00_shmop.ini │ │ ├── 00_snmp.ini │ │ ├── 00_soap.ini │ │ ├── 00_tidy.ini │ │ ├── 01_exif.ini │ │ ├── 01_imap.ini │ │ ├── 01_phar.ini │ │ ├── 01_wddx.ini │ │ ├── 20_redis.ini │ │ ├── 40_amqp.ini │ │ ├── 60_oauth.ini │ │ ├── 70_yaml.ini │ │ ├── event.ini │ │ ├── imagick.ini │ │ ├── mcrypt.ini │ │ ├── 00_bcmath.ini │ │ ├── 00_calendar.ini │ │ ├── 00_enchant.ini │ │ ├── 00_fileinfo.ini │ │ ├── 00_gettext.ini │ │ ├── 00_mbstring.ini │ │ ├── 00_openssl.ini │ │ ├── 00_pspell.ini │ │ ├── 00_recode.ini │ │ ├── 00_session.ini │ │ ├── 00_sockets.ini │ │ ├── 00_sodium.ini │ │ ├── 00_sqlite3.ini │ │ ├── 00_sysvmsg.ini │ │ ├── 00_sysvsem.ini │ │ ├── 00_sysvshm.ini │ │ ├── 01_mysqlnd.ini │ │ ├── 01_pdo_odbc.ini │ │ ├── 01_xmlrpc.ini │ │ ├── 02_mysqli.ini │ │ ├── 10_igbinary.ini │ │ ├── 00_opcache.ini │ │ ├── 00_simplexml.ini │ │ ├── 00_tokenizer.ini │ │ ├── 00_xmlwriter.ini │ │ ├── 01_pdo_dblib.ini │ │ ├── 01_pdo_pgsql.ini │ │ ├── 01_pdo_sqlite.ini │ │ ├── 01_xmlreader.ini │ │ ├── 02_pdo_mysql.ini │ │ ├── 20_memcached.ini │ │ ├── 40_timezonedb.ini │ │ ├── 60_mailparse.ini │ │ └── xdebug.ini │ │ ├── pear.conf │ │ └── php-fpm.conf ├── apache │ ├── conf.d │ │ ├── ldap.conf │ │ ├── http2.conf │ │ ├── userdir.conf │ │ ├── proxy.conf │ │ ├── info.conf │ │ ├── multilang-errordoc.conf │ │ ├── default.conf │ │ ├── autoindex.conf │ │ ├── mpm.conf │ │ ├── languages.conf │ │ └── ssl.conf │ ├── ssl │ │ ├── server.csr │ │ ├── server.crt │ │ ├── server.key │ │ └── server.key.protected │ ├── vhost.conf │ └── httpd.conf ├── memcache │ └── Memcache.php ├── mysql │ └── my.cnf ├── redis │ └── config.inc.php ├── nginx │ └── default.conf └── drush │ └── drush.yml ├── tools ├── adminer.php └── phpinfo.php ├── database ├── mysql-init │ └── README.md ├── pgsql-init │ ├── README.md │ └── init.sh ├── dump │ └── README.md └── README.md ├── scripts ├── README.md ├── drush ├── drupal ├── composer ├── .env ├── get-tools.sh ├── pgsql ├── mysql └── helpers │ └── common.sh ├── .gitignore ├── Makefile ├── default.env ├── samples └── apache_mysql_php.yml ├── .gitlab-ci.yml ├── docker-compose.tpl.yml └── README.md /config/pgsql/.pg_pass: -------------------------------------------------------------------------------- 1 | *:*:*:drupal:drupal -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_bz2.ini: -------------------------------------------------------------------------------- 1 | extension=bz2.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_dba.ini: -------------------------------------------------------------------------------- 1 | extension=dba.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_dom.ini: -------------------------------------------------------------------------------- 1 | extension=dom.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_ftp.ini: -------------------------------------------------------------------------------- 1 | extension=ftp.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_gd.ini: -------------------------------------------------------------------------------- 1 | extension=gd.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_gmp.ini: -------------------------------------------------------------------------------- 1 | extension=gmp.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_pdo.ini: -------------------------------------------------------------------------------- 1 | extension=pdo.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_xml.ini: -------------------------------------------------------------------------------- 1 | extension=xml.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_zip.ini: -------------------------------------------------------------------------------- 1 | extension=zip.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/01_xsl.ini: -------------------------------------------------------------------------------- 1 | extension=xsl.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/50_LZF.ini: -------------------------------------------------------------------------------- 1 | extension=lzf.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/50_zmq.ini: -------------------------------------------------------------------------------- 1 | extension=zmq.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/apcu.ini: -------------------------------------------------------------------------------- 1 | extension=apcu.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/ast.ini: -------------------------------------------------------------------------------- 1 | extension=ast.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_bz2.ini: -------------------------------------------------------------------------------- 1 | extension=bz2.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_dba.ini: -------------------------------------------------------------------------------- 1 | extension=dba.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_dom.ini: -------------------------------------------------------------------------------- 1 | extension=dom.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_ftp.ini: -------------------------------------------------------------------------------- 1 | extension=ftp.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_gd.ini: -------------------------------------------------------------------------------- 1 | extension=gd.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_gmp.ini: -------------------------------------------------------------------------------- 1 | extension=gmp.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_pdo.ini: -------------------------------------------------------------------------------- 1 | extension=pdo.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_xml.ini: -------------------------------------------------------------------------------- 1 | extension=xml.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_zip.ini: -------------------------------------------------------------------------------- 1 | extension=zip.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/01_xsl.ini: -------------------------------------------------------------------------------- 1 | extension=xsl.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/50_LZF.ini: -------------------------------------------------------------------------------- 1 | extension=lzf.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/50_zmq.ini: -------------------------------------------------------------------------------- 1 | extension=zmq.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/apcu.ini: -------------------------------------------------------------------------------- 1 | extension=apcu.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/ast.ini: -------------------------------------------------------------------------------- 1 | extension=ast.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_ctype.ini: -------------------------------------------------------------------------------- 1 | extension=ctype.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_curl.ini: -------------------------------------------------------------------------------- 1 | extension=curl.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_iconv.ini: -------------------------------------------------------------------------------- 1 | extension=iconv.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_intl.ini: -------------------------------------------------------------------------------- 1 | extension=intl.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_json.ini: -------------------------------------------------------------------------------- 1 | extension=json.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_ldap.ini: -------------------------------------------------------------------------------- 1 | extension=ldap.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_odbc.ini: -------------------------------------------------------------------------------- 1 | extension=odbc.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_pcntl.ini: -------------------------------------------------------------------------------- 1 | extension=pcntl.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_pgsql.ini: -------------------------------------------------------------------------------- 1 | extension=pgsql.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_posix.ini: -------------------------------------------------------------------------------- 1 | extension=posix.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_shmop.ini: -------------------------------------------------------------------------------- 1 | extension=shmop.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_snmp.ini: -------------------------------------------------------------------------------- 1 | extension=snmp.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_soap.ini: -------------------------------------------------------------------------------- 1 | extension=soap.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_tidy.ini: -------------------------------------------------------------------------------- 1 | extension=tidy.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/01_exif.ini: -------------------------------------------------------------------------------- 1 | extension=exif.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/01_imap.ini: -------------------------------------------------------------------------------- 1 | extension=imap.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/01_phar.ini: -------------------------------------------------------------------------------- 1 | extension=phar.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/01_wddx.ini: -------------------------------------------------------------------------------- 1 | extension=wddx.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/20_redis.ini: -------------------------------------------------------------------------------- 1 | extension=redis.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/40_amqp.ini: -------------------------------------------------------------------------------- 1 | extension=amqp.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/60_oauth.ini: -------------------------------------------------------------------------------- 1 | extension=oauth.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/70_yaml.ini: -------------------------------------------------------------------------------- 1 | extension=yaml.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/event.ini: -------------------------------------------------------------------------------- 1 | extension=event.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/imagick.ini: -------------------------------------------------------------------------------- 1 | extension=imagick.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/mcrypt.ini: -------------------------------------------------------------------------------- 1 | extension=mcrypt.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_ctype.ini: -------------------------------------------------------------------------------- 1 | extension=ctype.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_curl.ini: -------------------------------------------------------------------------------- 1 | extension=curl.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_iconv.ini: -------------------------------------------------------------------------------- 1 | extension=iconv.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_intl.ini: -------------------------------------------------------------------------------- 1 | extension=intl.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_json.ini: -------------------------------------------------------------------------------- 1 | extension=json.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_ldap.ini: -------------------------------------------------------------------------------- 1 | extension=ldap.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_odbc.ini: -------------------------------------------------------------------------------- 1 | extension=odbc.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_pcntl.ini: -------------------------------------------------------------------------------- 1 | extension=pcntl.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_pgsql.ini: -------------------------------------------------------------------------------- 1 | extension=pgsql.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_posix.ini: -------------------------------------------------------------------------------- 1 | extension=posix.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_shmop.ini: -------------------------------------------------------------------------------- 1 | extension=shmop.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_snmp.ini: -------------------------------------------------------------------------------- 1 | extension=snmp.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_soap.ini: -------------------------------------------------------------------------------- 1 | extension=soap.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_tidy.ini: -------------------------------------------------------------------------------- 1 | extension=tidy.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/01_exif.ini: -------------------------------------------------------------------------------- 1 | extension=exif.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/01_imap.ini: -------------------------------------------------------------------------------- 1 | extension=imap.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/01_phar.ini: -------------------------------------------------------------------------------- 1 | extension=phar.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/01_wddx.ini: -------------------------------------------------------------------------------- 1 | extension=wddx.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/20_redis.ini: -------------------------------------------------------------------------------- 1 | extension=redis.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/40_amqp.ini: -------------------------------------------------------------------------------- 1 | extension=amqp.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/60_oauth.ini: -------------------------------------------------------------------------------- 1 | extension=oauth.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/70_yaml.ini: -------------------------------------------------------------------------------- 1 | extension=yaml.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/event.ini: -------------------------------------------------------------------------------- 1 | extension=event.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/imagick.ini: -------------------------------------------------------------------------------- 1 | extension=imagick.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/mcrypt.ini: -------------------------------------------------------------------------------- 1 | extension=mcrypt.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_bcmath.ini: -------------------------------------------------------------------------------- 1 | extension=bcmath.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_calendar.ini: -------------------------------------------------------------------------------- 1 | extension=calendar.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_enchant.ini: -------------------------------------------------------------------------------- 1 | extension=enchant.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_fileinfo.ini: -------------------------------------------------------------------------------- 1 | extension=fileinfo.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_gettext.ini: -------------------------------------------------------------------------------- 1 | extension=gettext.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_mbstring.ini: -------------------------------------------------------------------------------- 1 | extension=mbstring.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_openssl.ini: -------------------------------------------------------------------------------- 1 | extension=openssl.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_pspell.ini: -------------------------------------------------------------------------------- 1 | extension=pspell.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_recode.ini: -------------------------------------------------------------------------------- 1 | extension=recode.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_session.ini: -------------------------------------------------------------------------------- 1 | extension=session.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_sockets.ini: -------------------------------------------------------------------------------- 1 | extension=sockets.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_sodium.ini: -------------------------------------------------------------------------------- 1 | extension=sodium.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_sqlite3.ini: -------------------------------------------------------------------------------- 1 | extension=sqlite3.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_sysvmsg.ini: -------------------------------------------------------------------------------- 1 | extension=sysvmsg.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_sysvsem.ini: -------------------------------------------------------------------------------- 1 | extension=sysvsem.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_sysvshm.ini: -------------------------------------------------------------------------------- 1 | extension=sysvshm.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/01_mysqlnd.ini: -------------------------------------------------------------------------------- 1 | extension=mysqlnd.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/01_pdo_odbc.ini: -------------------------------------------------------------------------------- 1 | extension=pdo_odbc.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/01_xmlrpc.ini: -------------------------------------------------------------------------------- 1 | extension=xmlrpc.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/02_mysqli.ini: -------------------------------------------------------------------------------- 1 | extension=mysqli.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/10_igbinary.ini: -------------------------------------------------------------------------------- 1 | extension=igbinary.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_bcmath.ini: -------------------------------------------------------------------------------- 1 | extension=bcmath.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_calendar.ini: -------------------------------------------------------------------------------- 1 | extension=calendar.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_enchant.ini: -------------------------------------------------------------------------------- 1 | extension=enchant.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_fileinfo.ini: -------------------------------------------------------------------------------- 1 | extension=fileinfo.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_gettext.ini: -------------------------------------------------------------------------------- 1 | extension=gettext.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_mbstring.ini: -------------------------------------------------------------------------------- 1 | extension=mbstring.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_openssl.ini: -------------------------------------------------------------------------------- 1 | extension=openssl.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_pspell.ini: -------------------------------------------------------------------------------- 1 | extension=pspell.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_recode.ini: -------------------------------------------------------------------------------- 1 | extension=recode.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_session.ini: -------------------------------------------------------------------------------- 1 | extension=session.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_sockets.ini: -------------------------------------------------------------------------------- 1 | extension=sockets.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_sodium.ini: -------------------------------------------------------------------------------- 1 | extension=sodium.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_sqlite3.ini: -------------------------------------------------------------------------------- 1 | extension=sqlite3.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_sysvmsg.ini: -------------------------------------------------------------------------------- 1 | extension=sysvmsg.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_sysvsem.ini: -------------------------------------------------------------------------------- 1 | extension=sysvsem.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_sysvshm.ini: -------------------------------------------------------------------------------- 1 | extension=sysvshm.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/01_mysqlnd.ini: -------------------------------------------------------------------------------- 1 | extension=mysqlnd.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/01_pdo_odbc.ini: -------------------------------------------------------------------------------- 1 | extension=pdo_odbc.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/01_xmlrpc.ini: -------------------------------------------------------------------------------- 1 | extension=xmlrpc.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/02_mysqli.ini: -------------------------------------------------------------------------------- 1 | extension=mysqli.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/10_igbinary.ini: -------------------------------------------------------------------------------- 1 | extension=igbinary.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_opcache.ini: -------------------------------------------------------------------------------- 1 | zend_extension=opcache.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_simplexml.ini: -------------------------------------------------------------------------------- 1 | extension=simplexml.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_tokenizer.ini: -------------------------------------------------------------------------------- 1 | extension=tokenizer.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/00_xmlwriter.ini: -------------------------------------------------------------------------------- 1 | extension=xmlwriter.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/01_pdo_dblib.ini: -------------------------------------------------------------------------------- 1 | extension=pdo_dblib.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/01_pdo_pgsql.ini: -------------------------------------------------------------------------------- 1 | extension=pdo_pgsql.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/01_pdo_sqlite.ini: -------------------------------------------------------------------------------- 1 | extension=pdo_sqlite.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/01_xmlreader.ini: -------------------------------------------------------------------------------- 1 | extension=xmlreader.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/02_pdo_mysql.ini: -------------------------------------------------------------------------------- 1 | extension=pdo_mysql.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/20_memcached.ini: -------------------------------------------------------------------------------- 1 | extension=memcached.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/40_timezonedb.ini: -------------------------------------------------------------------------------- 1 | extension=timezonedb.so 2 | -------------------------------------------------------------------------------- /config/php/7.3/conf.d/60_mailparse.ini: -------------------------------------------------------------------------------- 1 | extension=mailparse.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_opcache.ini: -------------------------------------------------------------------------------- 1 | zend_extension=opcache.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_simplexml.ini: -------------------------------------------------------------------------------- 1 | extension=simplexml.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_tokenizer.ini: -------------------------------------------------------------------------------- 1 | extension=tokenizer.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/00_xmlwriter.ini: -------------------------------------------------------------------------------- 1 | extension=xmlwriter.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/01_pdo_dblib.ini: -------------------------------------------------------------------------------- 1 | extension=pdo_dblib.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/01_pdo_pgsql.ini: -------------------------------------------------------------------------------- 1 | extension=pdo_pgsql.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/01_pdo_sqlite.ini: -------------------------------------------------------------------------------- 1 | extension=pdo_sqlite.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/01_xmlreader.ini: -------------------------------------------------------------------------------- 1 | extension=xmlreader.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/02_pdo_mysql.ini: -------------------------------------------------------------------------------- 1 | extension=pdo_mysql.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/20_memcached.ini: -------------------------------------------------------------------------------- 1 | extension=memcached.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/40_timezonedb.ini: -------------------------------------------------------------------------------- 1 | extension=timezonedb.so 2 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/60_mailparse.ini: -------------------------------------------------------------------------------- 1 | extension=mailparse.so 2 | -------------------------------------------------------------------------------- /tools/adminer.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogtofu33/docker-compose-drupal/HEAD/tools/adminer.php -------------------------------------------------------------------------------- /config/php/7.3/conf.d/xdebug.ini: -------------------------------------------------------------------------------- 1 | ; Uncomment to enable this extension. 2 | ;zend_extension=xdebug.so 3 | -------------------------------------------------------------------------------- /config/php/7.4/conf.d/xdebug.ini: -------------------------------------------------------------------------------- 1 | ; Uncomment to enable this extension. 2 | ;zend_extension=xdebug.so 3 | -------------------------------------------------------------------------------- /config/apache/conf.d/ldap.conf: -------------------------------------------------------------------------------- 1 | LoadModule authnz_ldap_module modules/mod_authnz_ldap.so 2 | LoadModule ldap_module modules/mod_ldap.so 3 | -------------------------------------------------------------------------------- /database/mysql-init/README.md: -------------------------------------------------------------------------------- 1 | # MySQL database init 2 | 3 | Place your uncompressed _.sql_ files in `mysql-init` to be imported when starting the stack (docker-compose up -d). -------------------------------------------------------------------------------- /database/pgsql-init/README.md: -------------------------------------------------------------------------------- 1 | # PGSQL database init 2 | 3 | Place your uncompressed _dump.pg_dump_ file here to be imported when starting 4 | the stack (docker-compose up -d). 5 | -------------------------------------------------------------------------------- /config/apache/conf.d/http2.conf: -------------------------------------------------------------------------------- 1 | LoadModule http2_module modules/mod_http2.so 2 | 3 | 4 | Protocols h2 h2c http/1.1 5 | LogLevel http2:info 6 | 7 | -------------------------------------------------------------------------------- /database/dump/README.md: -------------------------------------------------------------------------------- 1 | # Database dump 2 | 3 | This folder contain all database dumps for _MySQL_ or _PgSQL_ created with : 4 | 5 | ```bash 6 | ./scripts/mysql dump 7 | ./scripts/pgsql dump 8 | ``` 9 | -------------------------------------------------------------------------------- /scripts/README.md: -------------------------------------------------------------------------------- 1 | # Helper bash scripts for DockerComposeDrupal 2 | 3 | This is a collection of bash scripts to help install, test and manage a DockerComposeDrupal stack, only tested on Ubuntu 16+. 4 | 5 | For use with: [https://gitlab.com/mog33/docker-compose-drupal](https://gitlab.com/mog33/docker-compose-drupal) 6 | -------------------------------------------------------------------------------- /database/pgsql-init/init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | __db_dump="/docker-entrypoint-initdb.d/dump.pg_dump" 6 | 7 | if [ -f "$__db_dump" ]; then 8 | printf "[info] Found DB file to import: %s\\n" "$__db_dump" 9 | pg_restore --no-owner --role "$POSTGRES_USER" -U "$POSTGRES_USER" -d "$POSTGRES_DB" "$__db_dump" 10 | else 11 | printf "[info] No DB import file.\\nYou can put a file dump.pg_dump in folder ./database-pgsql-init, it will be automatically imported when starting the stack.\\n" 12 | fi 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Docker compose files 2 | docker-compose.yml 3 | docker-compose.test* 4 | .env 5 | !scripts/.env 6 | !openstack/.env 7 | # ignore static files 8 | database/dump/* 9 | !database/dump/README.md 10 | database/mysql-init/* 11 | !database/mysql-init/README.md 12 | database/pgsql-init/* 13 | !database/pgsql-init/README.md 14 | !database/pgsql-init/init.sh 15 | drupal 16 | build/dashboard/app/vendor 17 | build/dashboard/tools/ 18 | tools/* 19 | !tools/adminer.php 20 | !tools/phpinfo.php 21 | # ignore tmp or specific files 22 | tmp* 23 | myscripts* 24 | .phpintel 25 | .vscode -------------------------------------------------------------------------------- /scripts/drush: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Simple wrapper for drush with DockerComposeDrupal. 4 | # 5 | # Depends on: 6 | # docker 7 | # DockerComposeDrupal 8 | 9 | _SOURCE="${BASH_SOURCE[0]}" 10 | while [ -h "$_SOURCE" ]; do 11 | _DIR="$( cd -P "$( dirname "$_SOURCE" )" && pwd )" 12 | _SOURCE="$(readlink "$_SOURCE")" 13 | [[ $_SOURCE != /* ]] && _SOURCE="$_DIR/$_SOURCE" 14 | done 15 | _DIR="$( cd -P "$( dirname "$_SOURCE" )" && pwd )" 16 | 17 | if [ ! -f $_DIR/helpers/common.sh ]; then 18 | echo -e "[ERROR] Missing helpers/common.sh file." 19 | exit 1 20 | fi 21 | source $_DIR/helpers/common.sh 22 | 23 | _docker_exec \ 24 | "${DRUSH_BIN}" --root="${DRUPAL_DOCROOT}" "$@" 25 | -------------------------------------------------------------------------------- /scripts/drupal: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Simple wrapper for drupal console with DockerComposeDrupal. 4 | # 5 | # Depends on: 6 | # docker 7 | # DockerComposeDrupal 8 | 9 | _SOURCE="${BASH_SOURCE[0]}" 10 | while [ -h "$_SOURCE" ]; do 11 | _DIR="$( cd -P "$( dirname "$_SOURCE" )" && pwd )" 12 | _SOURCE="$(readlink "$_SOURCE")" 13 | [[ $_SOURCE != /* ]] && _SOURCE="$_DIR/$_SOURCE" 14 | done 15 | _DIR="$( cd -P "$( dirname "$_SOURCE" )" && pwd )" 16 | 17 | if [ ! -f $_DIR/helpers/common.sh ]; then 18 | echo -e "(ERROR] Missing helpers/common.sh file." 19 | exit 1 20 | fi 21 | source $_DIR/helpers/common.sh 22 | 23 | _docker_exec \ 24 | "${DRUPAL_BIN}" --root="${DRUPAL_DOCROOT}" "$@" 25 | -------------------------------------------------------------------------------- /config/memcache/Memcache.php: -------------------------------------------------------------------------------- 1 | 'Server', 4 | 'slabs_api' => 'Server', 5 | 'items_api' => 'Server', 6 | 'get_api' => 'Server', 7 | 'set_api' => 'Server', 8 | 'delete_api' => 'Server', 9 | 'flush_all_api' => 'Server', 10 | 'connection_timeout' => '1', 11 | 'max_item_dump' => '100', 12 | 'refresh_rate' => 2, 13 | 'memory_alert' => '80', 14 | 'hit_rate_alert' => '90', 15 | 'eviction_alert' => '0', 16 | 'file_path' => 'Temp/', 17 | 'servers' => 18 | array ( 19 | 'Default' => 20 | array ( 21 | 'memcache:11211' => 22 | array ( 23 | 'hostname' => 'memcache', 24 | 'port' => '11211', 25 | ), 26 | ), 27 | ), 28 | ); 29 | -------------------------------------------------------------------------------- /database/README.md: -------------------------------------------------------------------------------- 1 | # Database dump 2 | 3 | The folder `dump` contain all database dumps for _MySQL_ or _PgSQL_ created with : 4 | 5 | ```bash 6 | ./scripts/mysql dump 7 | ./scripts/pgsql dump 8 | ``` 9 | 10 | To automatically import a database dump on first launch or when the stack has been destroyed, you can copy the dump in respective folders: 11 | 12 | ```bash 13 | ./database/mysql-init 14 | ./database/pgsql-init 15 | ``` 16 | 17 | # MySQL database init 18 | 19 | Place your uncompressed _.sql_ files in `mysql-init` to be imported when starting the stack (docker-compose up -d). 20 | 21 | # PGSQL database init 22 | 23 | Place your uncompressed _dump.pg_dump_ file in `pgsql-init` to be imported when starting 24 | the stack (docker-compose up -d). 25 | -------------------------------------------------------------------------------- /scripts/composer: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Simple wrapper for composer with DockerComposeDrupal. 4 | # 5 | # Depends on: 6 | # docker 7 | # DockerComposeDrupal 8 | 9 | _SOURCE="${BASH_SOURCE[0]}" 10 | while [ -h "$_SOURCE" ]; do 11 | _DIR="$( cd -P "$( dirname "$_SOURCE" )" && pwd )" 12 | _SOURCE="$(readlink "$_SOURCE")" 13 | [[ $_SOURCE != /* ]] && _SOURCE="$_DIR/$_SOURCE" 14 | done 15 | _DIR="$( cd -P "$( dirname "$_SOURCE" )" && pwd )" 16 | 17 | if [ ! -f $_DIR/helpers/common.sh ]; then 18 | echo -e "(ERROR] Missing helpers/common.sh file." 19 | exit 1 20 | fi 21 | source $_DIR/helpers/common.sh 22 | 23 | _docker_exec_root mkdir -p /.composer/cache 24 | _docker_exec_root chown -R ${LOCAL_UID}:${LOCAL_GID} /.composer 25 | 26 | _docker_exec \ 27 | composer --working-dir="${WEB_ROOT}" "$@" 28 | -------------------------------------------------------------------------------- /config/apache/conf.d/userdir.conf: -------------------------------------------------------------------------------- 1 | 2 | # Settings for user home directories 3 | # 4 | # Required module: mod_authz_core, mod_authz_host, mod_userdir 5 | 6 | # 7 | # UserDir: The name of the directory that is appended onto a user's home 8 | # directory if a ~user request is received. Note that you must also set 9 | # the default access control for these directories, as in the example below. 10 | # 11 | UserDir public_html 12 | 13 | # 14 | # Control access to UserDir directories. The following is an example 15 | # for a site where these directories are restricted to read-only. 16 | # 17 | 18 | AllowOverride FileInfo AuthConfig Limit Indexes 19 | Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec 20 | Require method GET POST OPTIONS 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Docker Compose Drupal skeleton. 2 | 3 | UID=$$(id -u $$USER) 4 | GID=$$(id -g $$USER) 5 | 6 | setup: clean-setup 7 | @cp ./docker-compose.tpl.yml ./docker-compose.yml; 8 | @cp ./default.env ./.env; 9 | @sed -i "s/LOCAL_UID=1000/LOCAL_UID=$(UID)/g" ./.env; 10 | @sed -i "s/LOCAL_GID=1000/LOCAL_GID=$(GID)/g" ./.env; 11 | 12 | up: 13 | @docker-compose up -d --build; 14 | 15 | sup: setup 16 | @docker-compose up -d --build; 17 | 18 | clean: 19 | @rm -f ./docker-compose.tpl.yml; 20 | @rm -f ./default.env; 21 | 22 | clean-setup: 23 | @rm -f ./docker-compose.yml; 24 | @rm -f ./.env; 25 | 26 | demo: setup 27 | @cp -f ./samples/apache_mysql_php.yml ./docker-compose.yml; 28 | @docker-compose up -d --build; 29 | @sleep 15s; 30 | @scripts/install-drupal.sh install -p drupal-demo; 31 | 32 | nuke: 33 | @docker-compose down; 34 | @rm -rf drupal; 35 | 36 | st: status 37 | status: 38 | @docker-compose ps; 39 | 40 | .PHONY: setup up sup clean nuke demo status 41 | -------------------------------------------------------------------------------- /config/apache/conf.d/proxy.conf: -------------------------------------------------------------------------------- 1 | LoadModule proxy_module modules/mod_proxy.so 2 | LoadModule proxy_ajp_module modules/mod_proxy_ajp.so 3 | LoadModule proxy_connect_module modules/mod_proxy_connect.so 4 | LoadModule proxy_express_module modules/mod_proxy_express.so 5 | LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so 6 | LoadModule proxy_ftp_module modules/mod_proxy_ftp.so 7 | LoadModule proxy_hcheck_module modules/mod_proxy_hcheck.so 8 | LoadModule proxy_http_module modules/mod_proxy_http.so 9 | LoadModule proxy_scgi_module modules/mod_proxy_scgi.so 10 | LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so 11 | LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so 12 | LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so 13 | # LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so 14 | 15 | LoadModule proxy_balancer_module modules/mod_proxy_balancer.so 16 | LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so 17 | LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so 18 | -------------------------------------------------------------------------------- /config/apache/ssl/server.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIICujCCAaICAQAwdTELMAkGA1UEBhMCTloxEzARBgNVBAgMCkNhbnRlcmJ1cnkx 3 | FTATBgNVBAcMDENocmlzdGNodXJjaDESMBAGA1UECgwJV2ViUnVsZXJzMRIwEAYD 4 | VQQLDAlMb2NhbCBEZXYxEjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcN 5 | AQEBBQADggEPADCCAQoCggEBAJQxQFg00+TTiwf0SjwrWounqZKDh/NcfEt/AYtx 6 | 3y52xUbQ5ee6mKZbFeqbb95VtJgu62br6yP+nbLiB+hZxfyI0aDqR+49CYS+6dbT 7 | qD7VGZn/TwcILuEydEFaey2Yqk24a0s4wdPWSaCVzOIziQETud2YzvU/QkN+dr5s 8 | gzw6KQMgy0U/uT94eWq2dKHJUu22t6rMe8VEKQ+VJ4JGJ7/axe+9AgtfapSFkJfv 9 | 2QVPwCBOGysBj0+MbAaEhYR28wLna5G5tER/byLdqm0RsE+Wgo35nTK6TwSFZlnU 10 | 88+cOEINSuf2kg/XRY6Pff42b9H7KlZMacbjtsrx/vXsif0CAwEAAaAAMA0GCSqG 11 | SIb3DQEBCwUAA4IBAQArvFmLziYmPLLGcDipQgW1zLQwdCPTDQ/uXiSiEZ7UJQ5d 12 | nO0VD84w3RfUnmO9rrlEYzRNhfjE8ClH5Q3aa34vVOVONyi/d7PO2hOIJsmZi0is 13 | r1fXsSwRLqT2vEQ+Uzh7p9RMrQu3ukPvYD+ZcAFCz5q/GUtQGtvnVAWSsSilLsGm 14 | 9IfJAzCyJhnHx9VjpJzjUh2LYmc+qsdfcBA/rSIOaEsCDwivwNgyxSnQ/lbMveae 15 | Kq24ex6+pezlXIQ0ztydxYzOtHy2mo/jP1sce6rNT9EQ5wpuOKv0xHNuedN6TKO8 16 | 530rKY8nZTDDF/gBdz1sWjAOrCVHpwzNbqnAwzSj 17 | -----END CERTIFICATE REQUEST----- 18 | -------------------------------------------------------------------------------- /config/php/7.3/pear.conf: -------------------------------------------------------------------------------- 1 | #PEAR_Config 0.9 2 | a:33:{s:9:"cache_dir";s:15:"/tmp/pear/cache";s:15:"default_channel";s:12:"pear.php.net";s:10:"php_suffix";s:1:"7";s:16:"preferred_mirror";s:12:"pear.php.net";s:13:"remote_config";s:0:"";s:13:"auto_discover";i:0;s:13:"master_server";s:12:"pear.php.net";s:10:"http_proxy";s:0:"";s:7:"php_dir";s:15:"/usr/share/php7";s:7:"ext_dir";s:59:"/home/buildozer/aports/community/php7/src/php-7.3.7/modules";s:7:"doc_dir";s:19:"/usr/share/php7/doc";s:7:"bin_dir";s:8:"/usr/bin";s:8:"data_dir";s:20:"/usr/share/php7/data";s:7:"cfg_dir";s:19:"/usr/share/php7/cfg";s:7:"www_dir";s:22:"/usr/share/php7/htdocs";s:7:"man_dir";s:25:"/usr/share/php7/local/man";s:8:"test_dir";s:20:"/usr/share/php7/test";s:8:"temp_dir";s:14:"/tmp/pear/temp";s:12:"download_dir";s:18:"/tmp/pear/download";s:7:"php_bin";s:12:"/usr/bin/php";s:10:"php_prefix";s:0:"";s:7:"php_ini";s:0:"";s:12:"metadata_dir";s:0:"";s:8:"username";s:0:"";s:8:"password";s:0:"";s:7:"verbose";i:1;s:15:"preferred_state";s:6:"stable";s:5:"umask";i:18;s:9:"cache_ttl";i:3600;s:8:"sig_type";s:3:"gpg";s:7:"sig_bin";s:18:"/usr/local/bin/gpg";s:9:"sig_keyid";s:0:"";s:10:"sig_keydir";s:18:"/etc/php7/pearkeys";} -------------------------------------------------------------------------------- /config/php/7.4/pear.conf: -------------------------------------------------------------------------------- 1 | #PEAR_Config 0.9 2 | a:33:{s:9:"cache_dir";s:15:"/tmp/pear/cache";s:15:"default_channel";s:12:"pear.php.net";s:10:"php_suffix";s:1:"7";s:16:"preferred_mirror";s:12:"pear.php.net";s:13:"remote_config";s:0:"";s:13:"auto_discover";i:0;s:13:"master_server";s:12:"pear.php.net";s:10:"http_proxy";s:0:"";s:7:"php_dir";s:15:"/usr/share/php7";s:7:"ext_dir";s:59:"/home/buildozer/aports/community/php7/src/php-7.3.7/modules";s:7:"doc_dir";s:19:"/usr/share/php7/doc";s:7:"bin_dir";s:8:"/usr/bin";s:8:"data_dir";s:20:"/usr/share/php7/data";s:7:"cfg_dir";s:19:"/usr/share/php7/cfg";s:7:"www_dir";s:22:"/usr/share/php7/htdocs";s:7:"man_dir";s:25:"/usr/share/php7/local/man";s:8:"test_dir";s:20:"/usr/share/php7/test";s:8:"temp_dir";s:14:"/tmp/pear/temp";s:12:"download_dir";s:18:"/tmp/pear/download";s:7:"php_bin";s:12:"/usr/bin/php";s:10:"php_prefix";s:0:"";s:7:"php_ini";s:0:"";s:12:"metadata_dir";s:0:"";s:8:"username";s:0:"";s:8:"password";s:0:"";s:7:"verbose";i:1;s:15:"preferred_state";s:6:"stable";s:5:"umask";i:18;s:9:"cache_ttl";i:3600;s:8:"sig_type";s:3:"gpg";s:7:"sig_bin";s:18:"/usr/local/bin/gpg";s:9:"sig_keyid";s:0:"";s:10:"sig_keydir";s:18:"/etc/php7/pearkeys";} -------------------------------------------------------------------------------- /config/apache/conf.d/info.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Get information about the requests being processed by the server 3 | # and the configuration of the server. 4 | # 5 | # Required modules: mod_authz_core, mod_authz_host, 6 | # mod_info (for the server-info handler), 7 | # mod_status (for the server-status handler) 8 | 9 | 10 | # 11 | # Allow server status reports generated by mod_status, 12 | # with the URL of http://servername/server-status 13 | # Change the ".example.com" to match your domain to enable. 14 | 15 | 16 | SetHandler server-status 17 | Allow from all 18 | 19 | 20 | # 21 | # ExtendedStatus controls whether Apache will generate "full" status 22 | # information (ExtendedStatus On) or just basic information (ExtendedStatus 23 | # Off) when the "server-status" handler is called. The default is Off. 24 | # 25 | #ExtendedStatus On 26 | 27 | 28 | 29 | # 30 | # Allow remote server configuration reports, with the URL of 31 | # http://servername/server-info (requires that mod_info.c be loaded). 32 | # Change the ".example.com" to match your domain to enable. 33 | # 34 | 35 | SetHandler server-info 36 | Allow from all 37 | 38 | 39 | -------------------------------------------------------------------------------- /default.env: -------------------------------------------------------------------------------- 1 | # Host user uid/gid to prevent permissions issues. 2 | # Set your current user uid/gid (run 'id' to get your uid/gid). 3 | LOCAL_UID=1000 4 | LOCAL_GID=1000 5 | 6 | PROJECT_NAME=dcd 7 | 8 | # @see config/php/php.ini for custom php settings. 9 | PHP_VERSION=7.3 10 | # PHP_VERSION=7.4 11 | 12 | # Solr version, 7 (7.4) 13 | SOLR_VERSION=7 14 | 15 | # Services port on host, containers ports are fixed by respective config. 16 | # Here you can switch Nginx/Apache 80 port. 17 | APACHE_HOST_HTTP_PORT=80 18 | APACHE_HOST_HTTPS_PORT=443 19 | APACHE_HOST_ROOT_PORT=88 20 | 21 | NGINX_HOST_HTTP_PORT=81 22 | #NGINX_HOST_HTTPS_PORT=444 23 | 24 | # Dashboard and tools, should be changed only if you have a conflict. 25 | HOST_DASHBORAD_PORT=8181 26 | HOST_TOOLS_PORT=8008 27 | 28 | # Database settings. 29 | MYSQL_ROOT_PASSWORD=root 30 | MYSQL_DATABASE=drupal 31 | MYSQL_USER=drupal 32 | MYSQL_PASSWORD=drupal 33 | MYSQL_ALLOW_EMPTY_PASSWORD=yes 34 | 35 | POSTGRES_USER=drupal 36 | POSTGRES_PASSWORD=drupal 37 | POSTGRES_DB=drupal 38 | 39 | # Varnish settings. 40 | VARNISH_MEMORY=128M 41 | VARNISH_BACKEND_IP=apache 42 | # Other services, you can switch with Apache or Nginx port. 43 | VARNISH_HOST_PORT=8080 44 | 45 | # Data persistence folders, should be changed carefully. 46 | HOST_WEB_ROOT=./drupal 47 | HOST_DATABASE_DUMP=./database/dump -------------------------------------------------------------------------------- /config/apache/ssl/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDZjCCAk4CCQDp4xG04AGRNzANBgkqhkiG9w0BAQsFADB1MQswCQYDVQQGEwJO 3 | WjETMBEGA1UECAwKQ2FudGVyYnVyeTEVMBMGA1UEBwwMQ2hyaXN0Y2h1cmNoMRIw 4 | EAYDVQQKDAlXZWJSdWxlcnMxEjAQBgNVBAsMCUxvY2FsIERldjESMBAGA1UEAwwJ 5 | bG9jYWxob3N0MB4XDTE3MTAxMTIxMDI0MVoXDTE4MTAxMTIxMDI0MVowdTELMAkG 6 | A1UEBhMCTloxEzARBgNVBAgMCkNhbnRlcmJ1cnkxFTATBgNVBAcMDENocmlzdGNo 7 | dXJjaDESMBAGA1UECgwJV2ViUnVsZXJzMRIwEAYDVQQLDAlMb2NhbCBEZXYxEjAQ 8 | BgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB 9 | AJQxQFg00+TTiwf0SjwrWounqZKDh/NcfEt/AYtx3y52xUbQ5ee6mKZbFeqbb95V 10 | tJgu62br6yP+nbLiB+hZxfyI0aDqR+49CYS+6dbTqD7VGZn/TwcILuEydEFaey2Y 11 | qk24a0s4wdPWSaCVzOIziQETud2YzvU/QkN+dr5sgzw6KQMgy0U/uT94eWq2dKHJ 12 | Uu22t6rMe8VEKQ+VJ4JGJ7/axe+9AgtfapSFkJfv2QVPwCBOGysBj0+MbAaEhYR2 13 | 8wLna5G5tER/byLdqm0RsE+Wgo35nTK6TwSFZlnU88+cOEINSuf2kg/XRY6Pff42 14 | b9H7KlZMacbjtsrx/vXsif0CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAW6Ec2oyQ 15 | dWWn0OlCFRql+cheRZvp6O9aXx5QACE5G+ZaOAzckEmYDWCrbkWhdmLIZD2iQCJP 16 | i6AVxjv18/OMaaRa7JnXf7tV5RRPT5mMhZ4Gpz2JmAI8eoX4HxmMaMVQPACTg4bZ 17 | cSGMDgOf4xkEzgHuoHKN2ZjZaQcDaYcDhNjN42RUfgqv0RLFaIYg1JZWyHPtaEim 18 | cTIzOZ+UM9Z3ca4M09QElTR9/+hD9QHgI4uuHKT0ESMff1eYZemplDkiog3ixBca 19 | zc1a4s883mC+LDFWPb1iRFfG5RHnC7w7IU4qGkQQTXIfkq47oMJRFX1j+eOW60rJ 20 | nMwQQrxBkd3GeQ== 21 | -----END CERTIFICATE----- 22 | -------------------------------------------------------------------------------- /config/apache/vhost.conf: -------------------------------------------------------------------------------- 1 | 2 | ServerName localhost 3 | ServerAlias dcd.dev 4 | 5 | DocumentRoot "/var/www/localhost/web" 6 | DirectoryIndex /index.php index.php 7 | 8 | 9 | ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/sock/docker-php.sock|fcgi://php:9000/var/www/localhost/web/ 10 | ProxyTimeout 300 11 | 12 | 13 | 14 | 15 | 16 | ServerName localhost:443 17 | ServerAlias dcd.dev:443 18 | 19 | DocumentRoot "/var/www/localhost/web" 20 | 21 | 22 | ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/sock/docker-php.sock|fcgi://php:9000/var/www/localhost/web/ 23 | ProxyTimeout 300 24 | 25 | 26 | 27 | SSLEngine on 28 | SSLCertificateFile /etc/ssl/apache2/server.crt 29 | SSLCertificateKeyFile /etc/ssl/apache2/server.key 30 | SSLVerifyClient none 31 | 32 | 33 | SSLOptions +StdEnvVars 34 | 35 | 36 | SSLOptions +StdEnvVars 37 | 38 | 39 | 40 | 41 | 42 | # Root access for multi sites (not really recommended). 43 | 44 | ServerName localhost 45 | ServerAlias dcd_root.dev 46 | 47 | DocumentRoot "/var/www/localhost" 48 | DirectoryIndex /index.php index.php 49 | 50 | DirectoryIndex disabled 51 | Options +Indexes +FollowSymlinks 52 | IndexOptions +FoldersFirst 53 | 54 | 55 | ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/sock/docker-php.sock|fcgi://php:9000/var/www/localhost/ 56 | ProxyTimeout 300 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /config/apache/ssl/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEpAIBAAKCAQEAlDFAWDTT5NOLB/RKPCtai6epkoOH81x8S38Bi3HfLnbFRtDl 3 | 57qYplsV6ptv3lW0mC7rZuvrI/6dsuIH6FnF/IjRoOpH7j0JhL7p1tOoPtUZmf9P 4 | Bwgu4TJ0QVp7LZiqTbhrSzjB09ZJoJXM4jOJARO53ZjO9T9CQ352vmyDPDopAyDL 5 | RT+5P3h5arZ0oclS7ba3qsx7xUQpD5UngkYnv9rF770CC19qlIWQl+/ZBU/AIE4b 6 | KwGPT4xsBoSFhHbzAudrkbm0RH9vIt2qbRGwT5aCjfmdMrpPBIVmWdTzz5w4Qg1K 7 | 5/aSD9dFjo99/jZv0fsqVkxpxuO2yvH+9eyJ/QIDAQABAoIBAFG0zgtUJThXQqLC 8 | GGQQaz3w1VgI2V5esdFWV12xDSKrLZ4b84bOpPej5POTfByUGJyH0hbPILiZ3A0S 9 | /tUnGjhgn2QfiEVctfDQ6lEeJfduu0zjLYltA5v6m4qk/qFnOQ7dDZtN0eCgl7vI 10 | nExjqbhETghWBlXF6R0ZjxLy9XCwsb0dKiJIC0E6M3m4J5n0C14z8OKUq1me/FRE 11 | 1A8nNplUw1Nu0NtH+KnzxleYHdo4fmv9ytPwVI5Yd9rUstV9tkUUpYhfWDkcCvNq 12 | F77BWM8lRDqm52m0lvPh3Ekj0H/0hrS/ynC3/hLpaRjjXSKLPsVvXsp5I51+9P6U 13 | WvzZG2kCgYEAxLOnatLE/nTz3fpff5bjThPbOezgncYo2bnLiOOkdp6Edj4X3ItQ 14 | yXBM1qKBwhIbNRQJVbtnWfIl2I8oZIFHadVUEkZ/s5CB/QTk+uqfhoc8t0uH2a9y 15 | AHBO+xSY4f+X0oCukUpv+JDnZKSpg7mU/Nssixps7kG1Pjn7wBRRdv8CgYEAwN3p 16 | 3AJMYnMU/Ty1bhA27nYjMflWTw2AIEiWbEaPLJXFtQS74u5q2EaF1aodsij9edte 17 | RT8e0S6Mk8Etz7FEnynXrxGUM5F8Rr+GQkHBKUE+hax+szMOCZH7ccgEq2IOA41D 18 | 7BG6A9h2pPmChZjk1G5eQaVEHQ/eS+vn/oPU2wMCgYEAoakdQTg0WwT3oEozzoLO 19 | Ec9T74l1GXZRAJAobTraYfrp1tw1dDazkLrRC93HUx7aaYcsHN/Gky/mVtNhWSi+ 20 | 7oY7cEGsloF/s9kf7/CAZ2oiRmq3HfuJcD7dSpGlDKipuIG19wb8e4dsBVUnVHFj 21 | t2TSeQig2jf6o0e4VibcxTUCgYEArVmIbfge4cogTnD3faLTTMggYDWEru8qf1ne 22 | 4hkVbPR9THOh0JmMrTHN7zrFEDIpihJzC/hs4YVeUxup6mihjhGUy8UYGLWmJwzU 23 | Rs9FJ6h94rYk9zpnXpC4mQ83qzcp82VQbGmOcRBpq2ScPSosWweMbqJ1s01k94Zk 24 | 8e1aLzMCgYAPj+zi63CLBj0ceBzU+kTPETLQP8R8uj9XEskpHf+KvFb1O9uNu3+h 25 | ddJkr7YvL7HPeaV1TIquWBoLESkDsvOcEkcV5MCmIK0lz+gx6hqVbRxL8mnF94sI 26 | KSWXOl1aNp0HTCPYFeVwrNTE12vz58NPPcm57KCO/ICiUAB1K5ovww== 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /config/apache/ssl/server.key.protected: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | Proc-Type: 4,ENCRYPTED 3 | DEK-Info: DES-EDE3-CBC,327FD7129D2C9D35 4 | 5 | x/Ii3DEdWM75fiGfhSXVEOfP/QqGKX/eS8Q3l3JmuZYNl8Y+8fOW13/ZaP/SQ08u 6 | UsodTzRFGYMg6s6r1HthuMWZ4GORVGrdpMpw4b845R0wvz1OMQGiIQzaoVL7AJ1d 7 | r3ulKYreXMg/Gf/DF6DcisHMcin8N/Lywe469XgZOQMjxfrYsEK4ZweNdcK50Pps 8 | /bHcjmLiXVlWePBQ1FQ3bsbLFfWKTqBzSbROkHVCCPl1oPVPyzOkhl0lCVXhyUY0 9 | H/5dAIjD0WVIBf51lS0dy9DNEOwibeVKihUOhinyYqges6G3gKOGejqw5yuBQ1JW 10 | hzBRrYVnLiDuESbfO2mkZTZrWed6y2At+lg4iMksMBM66kL2kYwUAynnSLQcLer7 11 | rcpBpIMKK8xfyByN44LVAVAfkITg4yX+tiYGsEmoMpJ2NW+7T4bycjbZuM5APprt 12 | vwZrl+akAVVNUkMnn4NLO6MAzZytf6qprLG37iEtoGhZw4cVry4ovZa0HUdgGz95 13 | cvVO9G42z1GREMrQVfQfPU1e2jR2ofrRuHv6if3Z9IwwJ3BTdzYT6ePHE+SghuXX 14 | +4pQFsXcvA9IlEZRsT/DqgIBCdozjcBGX/a8ZuoRlZ+JRhUJ1JfD2UsS6UZdm7Gr 15 | 0VYXWUIgttPk5zSNjXLOW7dH5PgkG6EGPjA+RSF0Pop1bjZ6iwPtUgpU8V6JnvPd 16 | iA+FASv6N8Tg9MO9kBcRluKxmhD1TaqH3NZA9FJFhRoA3VDhwrJi6hDc6Qi8H14D 17 | d1A0XDbQH/QeQ/F4JKnPEKON8WInl4ygIfQL3akA7g0jPT1JBfaPESUeXJTZeBs/ 18 | MRj6C4N1Or8AbUcc+ZlTRjhKO63uJdrHk7FMjSQvkdxPS0Q3ZHAjdZefN2AYtkOc 19 | H/wqNkD1YktlE+5BPrSCafo3CJadMFy7QenNPJzFJ2Qo9yOUO8AdNqIx41LvqJAM 20 | TmmS7uSEz7GZiqtUjfkX3UqMo+PIsPG6HfthVvVkPUgHudgu7mOzsbcwrll3sl8J 21 | EEAK2txpT6BY9qXFPtjeXFKgDjQ/L1bmq0Ejxs+BGr8/HzRDH1KEFk205Ble3qaf 22 | pynrdx9QxdYTICjZ6oo4wX9uy60XpV8Iq4DzNx1/ryKlSJigzfeQROLXZV5El5Ji 23 | cgBDnl5PMveGRV06T+7iHo9YWRQmTaHQo2zJodz02qnOlo2PUxQM2Nt7Hd1PGKgc 24 | HmG0nMHGgV5efIRuxmouXBOu9HpykAD0INmbyenXsnGVBPVi4PazsZ3mxNvIIcG2 25 | JyXr+xyzw9ErSwXG7WYx1XCYWMGiBXdT/fpqKRG8cn8xT+ieSuESI5LCfl9iVEPy 26 | OTrVNbvFx/KJz10b9C17lWJhtjOAcmzZ8VU5BJSoWmGWf2UAsCa/EAGSTqLuXiQW 27 | tS58k8qOuMbywbWiq1Si9Uj7qeJkTRx7VZbxbe4cstTnDfZ1ublW5eUnosEcNfVs 28 | KoXQMzf9s3FZ48IsFZNbkP0V7g5qw+fa+nSD2r7ojhK2tO1trCiF41pVKxMFtadK 29 | te3/LU6AMswUh3/aNZf67OfukS/7FWld9bm22v3QYaPDtAD4SP86KEgu+Qsr70O3 30 | -----END RSA PRIVATE KEY----- 31 | -------------------------------------------------------------------------------- /config/mysql/my.cnf: -------------------------------------------------------------------------------- 1 | [client] 2 | 3 | # CLIENT # 4 | password = 5 | port = 3306 6 | socket = /run/mysqld/mysqld.sock 7 | 8 | [mysqld] 9 | 10 | # Fixing StartUp Porblems with some DNS Situations and Speeds up the stuff 11 | # http://www.percona.com/blog/2008/05/31/dns-achilles-heel-mysql-installation/ 12 | skip_name_resolve 13 | skip-host-cache 14 | skip-log-bin 15 | bind-address = 0.0.0.0 16 | 17 | #max_binlog_size = 5M 18 | 19 | skip-external-locking 20 | 21 | # GENERAL # 22 | user = mysql 23 | default-storage-engine = InnoDB 24 | port = 3306 25 | socket = /run/mysqld/mysqld.sock 26 | #pid-file = /run/mysqld/mysqld.pid 27 | 28 | # MyISAM # 29 | key_buffer_size = 128M 30 | #myisam-recover = FORCE,BACKUP 31 | 32 | # SAFETY # 33 | max_allowed_packet = 64M 34 | max_connect_errors = 1000000 35 | sysdate-is-now = 1 36 | innodb = FORCE 37 | innodb_strict_mode = 1 38 | 39 | # DATA STORAGE # 40 | #datadir = /var/lib/mysql 41 | 42 | # CACHES AND LIMITS # 43 | tmp_table_size = 64M 44 | max_heap_table_size = 64M 45 | query_cache_type = 1 46 | query_cache_size = 32M 47 | max_connections = 500 48 | thread_cache_size = 128 49 | open_files_limit = 65535 50 | table_definition_cache = 4096 51 | table_open_cache = 10240 52 | 53 | # INNODB # 54 | innodb_flush_method = O_DIRECT 55 | innodb_log_files_in_group = 2 56 | innodb_log_file_size = 64M 57 | innodb_flush_log_at_trx_commit = 1 58 | innodb_file_per_table = 1 59 | innodb_buffer_pool_size = 2G 60 | 61 | # LOGGING # 62 | #log-error = /var/log/mysql/mysql-error.log 63 | log-queries-not-using-indexes = 0 64 | slow-query-log = 0 65 | #slow-query-log-file = /var/log/mysql/mysql-slow.log 66 | 67 | [mysqldump] 68 | quick 69 | max_allowed_packet = 20M 70 | -------------------------------------------------------------------------------- /config/apache/conf.d/multilang-errordoc.conf: -------------------------------------------------------------------------------- 1 | # 2 | # The configuration below implements multi-language error documents through 3 | # content-negotiation. 4 | # 5 | # Required modules: mod_alias, mod_authz_core, mod_authz_host, 6 | # mod_include, mod_negotiation 7 | # 8 | # We use Alias to redirect any /error/HTTP_.html.var response to 9 | # our collection of by-error message multi-language collections. We use 10 | # includes to substitute the appropriate text. 11 | # 12 | # You can modify the messages' appearance without changing any of the 13 | # default HTTP_.html.var files by adding the line: 14 | # 15 | # Alias /error/include/ "/your/include/path/" 16 | # 17 | # which allows you to create your own set of files by starting with the 18 | # /usr/share/apache2/error/include/ files and copying them to /your/include/path/, 19 | # even on a per-VirtualHost basis. The default include files will display 20 | # your Apache version number and your ServerAdmin email address regardless 21 | # of the setting of ServerSignature. 22 | 23 | Alias /error/ "/usr/share/apache2/error/" 24 | 25 | 26 | AllowOverride None 27 | Options IncludesNoExec 28 | AddOutputFilter Includes html 29 | AddHandler type-map var 30 | Order allow,deny 31 | Allow from all 32 | LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr 33 | ForceLanguagePriority Prefer Fallback 34 | 35 | 36 | ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var 37 | ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var 38 | ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var 39 | ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var 40 | ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var 41 | ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var 42 | ErrorDocument 410 /error/HTTP_GONE.html.var 43 | ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var 44 | ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var 45 | ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var 46 | ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var 47 | ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var 48 | ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var 49 | ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var 50 | ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var 51 | ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var 52 | ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var 53 | 54 | -------------------------------------------------------------------------------- /config/apache/conf.d/default.conf: -------------------------------------------------------------------------------- 1 | # 2 | # This configuration file reflects default settings for Apache HTTP Server. 3 | # 4 | # You may change these, but chances are that you may not need to. 5 | # 6 | 7 | # 8 | # Timeout: The number of seconds before receives and sends time out. 9 | # 10 | Timeout 60 11 | 12 | # 13 | # KeepAlive: Whether or not to allow persistent connections (more than 14 | # one request per connection). Set to "Off" to deactivate. 15 | # 16 | KeepAlive On 17 | 18 | # 19 | # MaxKeepAliveRequests: The maximum number of requests to allow 20 | # during a persistent connection. Set to 0 to allow an unlimited amount. 21 | # We recommend you leave this number high, for maximum performance. 22 | # 23 | MaxKeepAliveRequests 100 24 | 25 | # 26 | # KeepAliveTimeout: Number of seconds to wait for the next request from the 27 | # same client on the same connection. 28 | # 29 | KeepAliveTimeout 5 30 | 31 | # 32 | # UseCanonicalName: Determines how Apache constructs self-referencing 33 | # URLs and the SERVER_NAME and SERVER_PORT variables. 34 | # When set "Off", Apache will use the Hostname and Port supplied 35 | # by the client. When set "On", Apache will use the value of the 36 | # ServerName directive. 37 | # 38 | UseCanonicalName Off 39 | 40 | # 41 | # AccessFileName: The name of the file to look for in each directory 42 | # for additional configuration directives. See also the AllowOverride 43 | # directive. 44 | # 45 | AccessFileName .htaccess 46 | 47 | # 48 | # HostnameLookups: Log the names of clients or just their IP addresses 49 | # e.g., www.apache.org (on) or 204.62.129.132 (off). 50 | # The default is off because it'd be overall better for the net if people 51 | # had to knowingly turn this feature on, since enabling it means that 52 | # each client request will result in AT LEAST one lookup request to the 53 | # nameserver. 54 | # 55 | HostnameLookups Off 56 | 57 | # 58 | # Set a timeout for how long the client may take to send the request header 59 | # and body. 60 | # The default for the headers is header=20-40,MinRate=500, which means wait 61 | # for the first byte of headers for 20 seconds. If some data arrives, 62 | # increase the timeout corresponding to a data rate of 500 bytes/s, but not 63 | # above 40 seconds. 64 | # The default for the request body is body=20,MinRate=500, which is the same 65 | # but has no upper limit for the timeout. 66 | # To disable, set to header=0 body=0 67 | # 68 | 69 | RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500 70 | 71 | -------------------------------------------------------------------------------- /config/redis/config.inc.php: -------------------------------------------------------------------------------- 1 | array( 6 | array( 7 | 'name' => 'local server', // Optional name. 8 | 'host' => 'redis', 9 | 'port' => 6379, 10 | 'filter' => '*', 11 | 'scheme' => 'tcp', // Optional. Connection scheme. 'tcp' - for TCP connection, 'unix' - for connection by unix domain socket 12 | 'path' => '' // Optional. Path to unix domain socket. Uses only if 'scheme' => 'unix'. Example: '/var/run/redis/redis.sock' 13 | 14 | // Optional Redis authentication. 15 | //'auth' => 'redispasswordhere' // Warning: The password is sent in plain-text to the Redis server. 16 | ), 17 | 18 | /*array( 19 | 'host' => 'localhost', 20 | 'port' => 6380 21 | ),*/ 22 | 23 | /*array( 24 | 'name' => 'local db 2', 25 | 'host' => 'localhost', 26 | 'port' => 6379, 27 | 'db' => 1, // Optional database number, see http://redis.io/commands/select 28 | 'databases' => 1, // Optional number of databases (prevents use of CONFIG command). 29 | 'filter' => 'something:*', // Show only parts of database for speed or security reasons. 30 | 'seperator' => '/', // Use a different seperator on this database (default uses config default). 31 | 'flush' => false, // Set to true to enable the flushdb button for this instance. 32 | 'charset' => 'cp1251', // Keys and values are stored in redis using this encoding (default utf-8). 33 | 'keys' => false, // Use the old KEYS command instead of SCAN to fetch all keys for this server (default uses config default). 34 | 'scansize' => 1000 // How many entries to fetch using each SCAN command for this server (default uses config default). 35 | ),*/ 36 | ), 37 | 38 | 39 | 'seperator' => ':', 40 | 41 | 42 | // Uncomment to show less information and make phpRedisAdmin fire less commands to the Redis server. Recommended for a really busy Redis server. 43 | //'faster' => true, 44 | 45 | 46 | // Uncomment to enable HTTP authentication 47 | /*'login' => array( 48 | // Username => Password 49 | // Multiple combinations can be used 50 | 'admin' => array( 51 | 'password' => 'adminpassword', 52 | ), 53 | 'guest' => array( 54 | 'password' => '', 55 | 'servers' => array(1) // Optional list of servers this user can access. 56 | ) 57 | ),*/ 58 | 59 | 60 | /*'serialization' => array( 61 | 'foo*' => array( // Match like KEYS 62 | // Function called when saving to redis. 63 | 'save' => function($data) { return json_encode(json_decode($data)); }, 64 | // Function called when loading from redis. 65 | 'load' => function($data) { return json_encode(json_decode($data), JSON_PRETTY_PRINT); }, 66 | ), 67 | ),*/ 68 | 69 | 70 | // You can ignore settings below this point. 71 | 72 | 'maxkeylen' => 100, 73 | 'count_elements_page' => 100, 74 | 75 | // Use the old KEYS command instead of SCAN to fetch all keys. 76 | 'keys' => false, 77 | 78 | // How many entries to fetch using each SCAN command. 79 | 'scansize' => 1000 80 | ); 81 | 82 | ?> 83 | -------------------------------------------------------------------------------- /config/apache/conf.d/autoindex.conf: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # Directives controlling the display of server-generated directory listings. 4 | # 5 | # Required modules: mod_authz_core, mod_authz_host, 6 | # mod_autoindex, mod_alias 7 | # 8 | # To see the listing of a directory, the Options directive for the 9 | # directory must include "Indexes", and the directory must not contain 10 | # a file matching those listed in the DirectoryIndex directive. 11 | # 12 | 13 | # 14 | # IndexOptions: Controls the appearance of server-generated directory 15 | # listings. 16 | # 17 | IndexOptions FancyIndexing HTMLTable VersionSort 18 | 19 | # We include the /icons/ alias for FancyIndexed directory listings. If 20 | # you do not use FancyIndexing, you may comment this out. 21 | # 22 | Alias /icons/ "/usr/share/apache2/icons/" 23 | 24 | 25 | Options Indexes MultiViews 26 | AllowOverride None 27 | Require all granted 28 | 29 | 30 | # 31 | # AddIcon* directives tell the server which icon to show for different 32 | # files or filename extensions. These are only displayed for 33 | # FancyIndexed directories. 34 | # 35 | AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip 36 | 37 | AddIconByType (TXT,/icons/text.gif) text/* 38 | AddIconByType (IMG,/icons/image2.gif) image/* 39 | AddIconByType (SND,/icons/sound2.gif) audio/* 40 | AddIconByType (VID,/icons/movie.gif) video/* 41 | 42 | AddIcon /icons/binary.gif .bin .exe 43 | AddIcon /icons/binhex.gif .hqx 44 | AddIcon /icons/tar.gif .tar 45 | AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv 46 | AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip 47 | AddIcon /icons/a.gif .ps .ai .eps 48 | AddIcon /icons/layout.gif .html .shtml .htm .pdf 49 | AddIcon /icons/text.gif .txt 50 | AddIcon /icons/c.gif .c 51 | AddIcon /icons/p.gif .pl .py 52 | AddIcon /icons/f.gif .for 53 | AddIcon /icons/dvi.gif .dvi 54 | AddIcon /icons/uuencoded.gif .uu 55 | AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl 56 | AddIcon /icons/tex.gif .tex 57 | AddIcon /icons/bomb.gif core 58 | 59 | AddIcon /icons/back.gif .. 60 | AddIcon /icons/hand.right.gif README 61 | AddIcon /icons/folder.gif ^^DIRECTORY^^ 62 | AddIcon /icons/blank.gif ^^BLANKICON^^ 63 | 64 | # 65 | # DefaultIcon is which icon to show for files which do not have an icon 66 | # explicitly set. 67 | # 68 | DefaultIcon /icons/unknown.gif 69 | 70 | # 71 | # AddDescription allows you to place a short description after a file in 72 | # server-generated indexes. These are only displayed for FancyIndexed 73 | # directories. 74 | # Format: AddDescription "description" filename 75 | # 76 | #AddDescription "GZIP compressed document" .gz 77 | #AddDescription "tar archive" .tar 78 | #AddDescription "GZIP compressed tar archive" .tgz 79 | 80 | # 81 | # ReadmeName is the name of the README file the server will look for by 82 | # default, and append to directory listings. 83 | # 84 | # HeaderName is the name of a file which should be prepended to 85 | # directory indexes. 86 | ReadmeName README.html 87 | HeaderName HEADER.html 88 | 89 | # 90 | # IndexIgnore is a set of filenames which directory indexing should ignore 91 | # and not include in the listing. Shell-style wildcarding is permitted. 92 | # 93 | IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t 94 | 95 | 96 | -------------------------------------------------------------------------------- /scripts/.env: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Basic values. 4 | PROJECT_BASE_URL="localhost" 5 | WEB_ROOT="/var/www/localhost" 6 | DRUPAL_DOCROOT="$WEB_ROOT/web" 7 | DRUSH_BIN="$WEB_ROOT/vendor/drush/drush/drush" 8 | DRUPAL_BIN="$WEB_ROOT/vendor/drupal/console/bin/drupal" 9 | 10 | DUMP_FOLDER="${STACK_ROOT}/${HOST_DATABASE_DUMP#'./'}" 11 | DUMP_FOLDER_IMAGE="/dump" 12 | 13 | # Default DB to mysql 14 | DB_DRIVER=mysql 15 | DB_HOST=mysql 16 | 17 | DB_USER=$MYSQL_USER 18 | DB_PASSWORD=$MYSQL_PASSWORD 19 | DB_NAME=$MYSQL_DATABASE 20 | 21 | # Variables to store some distributions default settings. 22 | # ID (arbitrary) 23 | # Description 24 | # Install profile name 25 | # Web root (for symlink as we use /web) 26 | # Project download type (composer or archive) 27 | # Project name (composer create-project) or url (archive) 28 | # Project setup specific script (see functions _setup_FUNC in install-drupal.sh) 29 | _ENV_DRUPAL=( 30 | "drupal" 31 | "Standard drupal project, use -dp for profile minimal or demo_umami. https://github.com/drupal-composer/drupal-project" 32 | "standard" # can be umami or minimal 33 | "web" 34 | "composer" 35 | "drupal-composer/drupal-project:8.x-dev" 36 | "standard" 37 | ) 38 | _ENV_DRUPAL_ARCHIVE=( 39 | "drupal-archive" 40 | "Standard drupal from ARCHIVE, use -dp for profile minimal or demo_umami. https://www.drupal.org/download" 41 | "standard" # can be umami or minimal 42 | "" 43 | "curl" 44 | "https://www.drupal.org/download-latest/tar.gz" 45 | "standard" 46 | ) 47 | _ENV_THUNDER=( 48 | "thunder" 49 | "Drupal 8 distribution for professional publishing. https://www.drupal.org/project/thunder" 50 | "thunder" 51 | "docroot" 52 | "composer" 53 | "burdamagazinorg/thunder-project" 54 | "standard" 55 | ) 56 | _ENV_LIGHTNING=( 57 | "lightning" 58 | "The distribution for Enterprise Authoring. https://www.drupal.org/project/lightning" 59 | "lightning" 60 | "docroot" 61 | "composer" 62 | "acquia/lightning-project" 63 | "standard" 64 | ) 65 | _ENV_VARBASE=( 66 | "varbase" 67 | "Drupal 8 distribution for professional publishing. https://www.drupal.org/project/varbase" 68 | "varbase" 69 | "docroot" 70 | "composer" 71 | "Vardot/varbase-project:^8.6.0" 72 | "varbase" 73 | ) 74 | _ENV_COMMERCE=( 75 | "commerce" 76 | "Drupal Commerce for online selling https://www.drupal.org/project/commerce" 77 | "commerce_base" 78 | "web" 79 | "composer_commerce" 80 | "drupalcommerce/project-base" 81 | "standard" 82 | ) 83 | _ENV_COMMERCE_DEMO=( 84 | "commerce-demo" 85 | "Drupal Commerce for online selling https://www.drupal.org/project/commerce extended with demo from https://www.drupal.org/project/commerce_demo" 86 | "commerce_base" 87 | "web" 88 | "composer_commerce" 89 | "drupalcommerce/project-base" 90 | "commerce_demo" 91 | ) 92 | _ENV_SOCIAL=( 93 | "social" 94 | "Out of the box solution for online communities. https://www.drupal.org/project/social" 95 | "social" 96 | "html" 97 | "composer" 98 | "goalgorilla/social_template:dev-master" 99 | "standard" 100 | ) 101 | _ENV_CONTENTA=( 102 | "contenta" 103 | "The decoupled Drupal. https://github.com/contentacms/contenta_jsonapi" 104 | "contenta_jsonapi" 105 | "web" 106 | "composer_contenta" 107 | "" 108 | "contenta" 109 | ) 110 | # Side project from drupal-project with base modules and config. 111 | _ENV_ADVANCED=( 112 | "drupal-advanced" 113 | "Drupal 8 template with more. https://gitlab.com/mog33/drupal-composer-advanced-template" 114 | "config_installer" 115 | "web" 116 | "composer" 117 | "mog33/drupal-composer-advanced-template:dev-9.x-dev" 118 | "advanced" 119 | ) 120 | DRUPAL_DISTRIBUTIONS=( 121 | _ENV_DRUPAL[@] 122 | _ENV_DRUPAL_ARCHIVE[@] 123 | _ENV_LIGHTNING[@] 124 | _ENV_VARBASE[@] 125 | _ENV_COMMERCE[@] 126 | _ENV_COMMERCE_DEMO[@] 127 | _ENV_SOCIAL[@] 128 | _ENV_CONTENTA[@] 129 | _ENV_THUNDER[@] 130 | _ENV_ADVANCED[@] 131 | ) 132 | -------------------------------------------------------------------------------- /config/nginx/default.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | root /var/www/localhost/web; 4 | 5 | index index.php; 6 | 7 | error_log /dev/stdout info; 8 | access_log /dev/stdout; 9 | 10 | location = /favicon.ico { 11 | log_not_found off; 12 | access_log off; 13 | } 14 | 15 | location = /robots.txt { 16 | allow all; 17 | log_not_found off; 18 | access_log off; 19 | } 20 | 21 | # Very rarely should these ever be accessed outside of your lan 22 | location ~* \.(txt|log)$ { 23 | allow 192.168.0.0/16; 24 | deny all; 25 | } 26 | 27 | location ~ \..*/.*\.php$ { 28 | return 403; 29 | } 30 | 31 | location ~ ^/sites/.*/private/ { 32 | return 403; 33 | } 34 | 35 | # Block access to scripts in site files directory 36 | location ~ ^/sites/[^/]+/files/.*\.php$ { 37 | deny all; 38 | } 39 | 40 | # Allow "Well-Known URIs" as per RFC 5785 41 | location ~* ^/.well-known/ { 42 | allow all; 43 | } 44 | 45 | # Block access to "hidden" files and directories whose names begin with a 46 | # period. This includes directories used by version control systems such 47 | # as Subversion or Git to store control files. 48 | location ~ (^|/)\. { 49 | return 403; 50 | } 51 | 52 | location / { 53 | try_files $uri /index.php?$query_string; 54 | } 55 | 56 | location @rewrite { 57 | rewrite ^/(.*)$ /index.php?q=$1; 58 | } 59 | 60 | # Don't allow direct access to PHP files in the vendor directory. 61 | location ~ /vendor/.*\.php$ { 62 | deny all; 63 | return 404; 64 | } 65 | location ~ /core/vendor/.*\.php$ { 66 | deny all; 67 | return 404; 68 | } 69 | 70 | # In Drupal 8, we must also match new paths where the '.php' appears in 71 | # the middle, such as update.php/selection. The rule we use is strict, 72 | # and only allows this pattern with the update.php front controller. 73 | # This allows legacy path aliases in the form of 74 | # blog/index.php/legacy-path to continue to route to Drupal nodes. If 75 | # you do not have any paths like that, then you might prefer to use a 76 | # laxer rule, such as: 77 | # location ~ \.php(/|$) { 78 | # The laxer rule will continue to work if Drupal uses this new URL 79 | # pattern with front controllers other than update.php in a future 80 | # release. 81 | location ~ '\.php$|^/update.php' { 82 | fastcgi_split_path_info ^(.+?\.php)(|/.*)$; 83 | # Security note: If you're running a version of PHP older than the 84 | # latest 5.3, you should have "cgi.fix_pathinfo = 0;" in php.ini. 85 | # See http://serverfault.com/q/627903/94922 for details. 86 | include fastcgi_params; 87 | # Block httpoxy attacks. See https://httpoxy.org/. 88 | fastcgi_param HTTP_PROXY ""; 89 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 90 | fastcgi_param PATH_INFO $fastcgi_path_info; 91 | fastcgi_param QUERY_STRING $query_string; 92 | fastcgi_intercept_errors on; 93 | # PHP socket location. 94 | fastcgi_pass unix:/sock/docker-php.sock; 95 | } 96 | 97 | # Fighting with Styles? This little gem is amazing. 98 | location ~ ^/sites/.*/files/styles/ { 99 | try_files $uri @rewrite; 100 | } 101 | 102 | # Handle private files through Drupal. Private file's path can come 103 | # with a language prefix. 104 | location ~ ^(/[a-z\-]+)?/system/files/ { 105 | try_files $uri /index.php?$query_string; 106 | } 107 | 108 | location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ { 109 | try_files $uri @rewrite; 110 | expires max; 111 | log_not_found off; 112 | } 113 | # Enable Nginx stats 114 | location /server-status { 115 | stub_status on; 116 | access_log off; 117 | # Only allow access from your IP e.g 1.1.1.1 or localhost # 118 | # allow 127.0.0.1; 119 | # allow 1.1.1.1 120 | # Other request should be denied 121 | # deny all; 122 | } 123 | } -------------------------------------------------------------------------------- /samples/apache_mysql_php.yml: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Docker Compose Drupal 8 full dev stack. 3 | # 4 | # Project page: 5 | # https://github.com/Mogtofu33/docker-compose-drupal 6 | # Documentation: 7 | # https://github.com/Mogtofu33/docker-compose-drupal/blob/master/README.md 8 | ################################################################################ 9 | version: '3' 10 | services: 11 | apache: 12 | image: mogtofu33/apache:latest 13 | depends_on: 14 | - php 15 | ports: 16 | - "${APACHE_HOST_HTTP_PORT:-80}:80" 17 | - "${APACHE_HOST_HTTPS_PORT:-443}:443" 18 | # Web root access, optional. 19 | - "${APACHE_HOST_ROOT_PORT:-88}:81" 20 | volumes: 21 | - ${HOST_WEB_ROOT:-./drupal}:/var/www/localhost 22 | # Apache configuration with SSL support. 23 | - ./config/apache/httpd.conf:/etc/apache2/httpd.conf:ro 24 | - ./config/apache/vhost.conf:/etc/apache2/vhost.conf:ro 25 | - ./config/apache/conf.d/:/etc/apache2/conf.d/:ro 26 | - ./config/apache/ssl/:/etc/ssl/apache2/:ro 27 | # Php FPM socket 28 | - php-sock:/sock:ro 29 | ## If PgSQL, ease drush pgsql access. 30 | - ./config/pgsql/.pg_pass:/home/apache/.pg_pass:ro 31 | env_file: .env 32 | restart: unless-stopped 33 | container_name: ${PROJECT_NAME:-dcd}-apache 34 | php: 35 | image: mogtofu33/php:${PHP_VERSION:-7.3} 36 | volumes: 37 | ## If you have composer set locally, share cache to speed up. 38 | # - ${HOME:-}/.composer/cache:/var/www/.composer/cache 39 | - ${HOST_WEB_ROOT:-./drupal}:/var/www/localhost 40 | - ./config/php/${PHP_VERSION:-7.3}/php.ini:/etc/php7/php.ini:ro 41 | - ./config/php/${PHP_VERSION:-7.3}/php-fpm.conf:/etc/php7/php-fpm.conf:ro 42 | - ./config/php/${PHP_VERSION:-7.3}/conf.d/:/etc/php7/conf.d/:ro 43 | - ./config/php/${PHP_VERSION:-7.3}/php-fpm.d/:/etc/php7/php-fpm.d/:ro 44 | # Drush 9 config file. 45 | - ./config/drush/drush.yml:/etc/drush/drush.yml:ro 46 | # Used by dashboard for accessing tools. 47 | - ./tools:/tools:ro 48 | # Share db dump folder. 49 | - ${HOST_DATABASE_DUMP:-./database/dump}:/dump 50 | # Php FPM socket 51 | - php-sock:/sock 52 | ## If PgSQL, ease drush pgsql access. 53 | - ./config/pgsql/.pg_pass:/home/apache/.pg_pass:ro 54 | links: 55 | # Choose database, uncomment service concerned below. 56 | - mysql 57 | - mailhog 58 | env_file: .env 59 | restart: unless-stopped 60 | container_name: ${PROJECT_NAME:-dcd}-php 61 | mysql: 62 | image: mariadb:latest 63 | expose: 64 | - "3306" 65 | volumes: 66 | - ${HOST_DATABASE_DUMP:-./database/dump}:/dump 67 | # All .sql files will be imported on first start by order. 68 | - ./database/mysql-init:/docker-entrypoint-initdb.d 69 | - ./config/mysql:/etc/mysql:ro 70 | env_file: .env 71 | restart: unless-stopped 72 | container_name: ${PROJECT_NAME:-dcd}-mysql 73 | mailhog: 74 | image: mailhog/mailhog:latest 75 | expose: 76 | - "1025" 77 | ports: 78 | - "8025:8025" 79 | restart: unless-stopped 80 | container_name: ${PROJECT_NAME:-dcd}-mailhog 81 | tools: 82 | image: nginx:alpine 83 | depends_on: 84 | - php 85 | ports: 86 | - "${HOST_TOOLS_PORT:-8008}:80" 87 | volumes: 88 | - ./tools:/tools:ro 89 | - ./build/dashboard/default.conf:/etc/nginx/conf.d/default.conf:ro 90 | # Php FPM socket 91 | - php-sock:/sock:ro 92 | env_file: .env 93 | restart: unless-stopped 94 | container_name: ${PROJECT_NAME:-dcd}-tools 95 | dashboard: 96 | image: mogtofu33/dashboard:latest 97 | ports: 98 | - "${HOST_DASHBORAD_PORT:-8181}:5000" 99 | volumes: 100 | # Share configs for reading on the dashboard. 101 | - ./config/apache/vhost.conf:/config/vhost.conf:ro 102 | - ./config/nginx/default.conf:/config/default.conf:ro 103 | - ./tools:/tools:ro 104 | - .env:/config/stack.env:ro 105 | # Access docker daemon. 106 | - /var/run/docker.sock:/var/run/docker.sock 107 | env_file: .env 108 | restart: unless-stopped 109 | container_name: ${PROJECT_NAME:-dcd}-dashboard 110 | 111 | volumes: 112 | php-sock: -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | image: docker:stable 2 | 3 | services: 4 | - docker:dind 5 | 6 | stages: 7 | - prepare image 8 | - build image 9 | - release image 10 | - build 11 | - run 12 | - tests 13 | 14 | variables: 15 | DOCKER_HOST: tcp://docker:2375 16 | DOCKER_DRIVER: overlay2 17 | LOCAL_IMAGE: registry.gitlab.com/mog33/docker-compose-drupal 18 | RELEASE_REGISTRY: docker.io 19 | RELEASE_IMAGE: index.docker.io/$RELEASE_USER 20 | 21 | ################################################################################ 22 | # Templates to avoid repeat. 23 | # https://docs.gitlab.com/ee/ci/yaml/#anchors 24 | ################################################################################ 25 | 26 | .docker_login_gitlab: 27 | - &docker_login_gitlab docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com 28 | 29 | .docker_build_push: 30 | script: &docker_build_push 31 | - docker build --pull --tag $LOCAL_IMAGE/$IMAGE $DIR 32 | - docker push $LOCAL_IMAGE/$IMAGE 33 | 34 | .docker_pull: 35 | - &docker_pull docker pull $LOCAL_IMAGE/$IMAGE 36 | 37 | .build_image: 38 | stage: build image 39 | before_script: 40 | - *docker_login_gitlab 41 | script: *docker_build_push 42 | 43 | .release: 44 | stage: release image 45 | before_script: 46 | - docker login -u $RELEASE_USER -p $RELEASE_PASSWORD $RELEASE_REGISTRY 47 | script: 48 | - *docker_pull 49 | - docker tag $LOCAL_IMAGE/$IMAGE $RELEASE_IMAGE/$IMAGE 50 | - docker push $RELEASE_IMAGE/$IMAGE 51 | 52 | # https://docs.docker.com/compose/install/ 53 | .install_docker_compose: 54 | - &install_docker_compose 55 | apk add --quiet --no-cache bash make py3-pip python3-dev libffi-dev openssl-dev gcc libc-dev 56 | && pip3 install --quiet --upgrade pip 57 | && pip3 install --quiet docker-compose 58 | 59 | .test_run: 60 | stage: run 61 | script: 62 | - docker-compose build &> /dev/null 63 | - chmod -R 600 config/mysql 64 | - docker-compose up -d 65 | - docker-compose ps 66 | - sleep 5s && docker-compose logs 67 | - docker exec dcd-php php -v 68 | 69 | .test: 70 | stage: tests 71 | script: 72 | - chmod -R 600 config/mysql 73 | - docker-compose up -d --build &> /dev/null 74 | - apk --no-cache add git curl 75 | - scripts/get-tools.sh test 76 | - scripts/composer -V 77 | - scripts/install-drupal.sh install -p drupal-archive --profile minimal --force --quiet 78 | - scripts/mysql test 79 | - scripts/pgsql test 80 | - scripts/install-drupal.sh test 81 | 82 | ################################################################################ 83 | # Jobs based on previous templates. 84 | ################################################################################ 85 | 86 | build:dashboard: 87 | image: node:latest 88 | stage: prepare image 89 | script: 90 | - npm install --prefix build/dashboard build/dashboard --save 91 | - npm run build --prefix build/dashboard 92 | only: 93 | - /^dashboard-.*$/ 94 | - master 95 | cache: 96 | key: ${CI_COMMIT_REF_SLUG} 97 | paths: 98 | - build/dashboard/node_modules 99 | artifacts: 100 | paths: 101 | - build/dashboard/app 102 | expire_in: 1 day 103 | 104 | dashboard: 105 | extends: .build_image 106 | variables: 107 | IMAGE: dashboard:latest 108 | DIR: build/dashboard 109 | dependencies: 110 | - build:dashboard 111 | only: 112 | - /^dashboard-.*$/ 113 | - master 114 | 115 | release:dashboard: 116 | extends: .release 117 | variables: 118 | IMAGE: dashboard:latest 119 | dependencies: 120 | - dashboard 121 | only: 122 | - dashboard-release 123 | - master 124 | 125 | build: 126 | stage: build 127 | before_script: 128 | - *install_docker_compose 129 | script: 130 | - make setup 131 | - docker-compose config 132 | except: 133 | - /^dashboard-.*$/ 134 | 135 | run: 136 | before_script: 137 | - *install_docker_compose 138 | - make setup 139 | extends: .test_run 140 | except: 141 | - /^dashboard-.*$/ 142 | 143 | run basic: 144 | before_script: 145 | - *install_docker_compose 146 | - make setup 147 | - cp samples/apache_mysql_php.yml docker-compose.yml 148 | extends: .test_run 149 | except: 150 | - /^dashboard-.*$/ 151 | 152 | test: 153 | before_script: 154 | - *install_docker_compose 155 | - make setup 156 | extends: .test 157 | except: 158 | - /^dashboard-.*$/ 159 | -------------------------------------------------------------------------------- /scripts/get-tools.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Helper to get third party tools, part of Docker compose Drupal project. 4 | # 5 | # Bash Boilerplate: https://github.com/alphabetum/bash-boilerplate 6 | # Bash Boilerplate: Copyright (c) 2015 William Melody • hi@williammelody.com 7 | 8 | if [ -z ${STACK_ROOT} ]; then 9 | _SOURCE="${BASH_SOURCE[0]}" 10 | while [ -h "$_SOURCE" ]; do 11 | _DIR="$( cd -P "$( dirname "$_SOURCE" )" && pwd )" 12 | _SOURCE="$(readlink "$_SOURCE")" 13 | [[ $_SOURCE != /* ]] && _SOURCE="$_DIR/$_SOURCE" 14 | done 15 | _DIR="$( cd -P "$( dirname "$_SOURCE" )" && pwd )" 16 | 17 | if [ ! -f $_DIR/helpers/common.sh ]; then 18 | echo -e "Missing helpers/common.sh file." 19 | exit 1 20 | fi 21 | source $_DIR/helpers/common.sh 22 | fi 23 | 24 | ############################################################################### 25 | # Help 26 | ############################################################################### 27 | 28 | # _print_help() 29 | # 30 | # Usage: 31 | # _print_help 32 | # 33 | # Print the __program help information. 34 | _print_help() { 35 | _help_logo 36 | cat <] [] 139 | # 140 | # Description: 141 | # Entry point for the program, handling basic option parsing and dispatching. 142 | _main() { 143 | 144 | if ! [ -x "$(command -v git)" ]; then 145 | die 'git is required for this script.' 146 | fi 147 | 148 | # Run command if exist. 149 | __call="_${__cmd}" 150 | if [ "$(type -t "${__call}")" == 'function' ]; then 151 | $__call "@" 152 | else 153 | printf "[ERROR] Unknown command: %s\\n" "${__cmd}" 154 | fi 155 | } 156 | 157 | # Call `_main` after everything has been defined. 158 | _main "$@" 159 | -------------------------------------------------------------------------------- /config/apache/conf.d/mpm.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Server-Pool Management (MPM specific) 3 | # 4 | 5 | # 6 | # PidFile: The file in which the server should record its process 7 | # identification number when it starts. 8 | # 9 | # Note that this is the default PidFile for most MPMs. 10 | # 11 | 12 | PidFile "/run/apache2/httpd.pid" 13 | 14 | 15 | # 16 | # Only one of the below sections will be relevant on your 17 | # installed httpd. Use "apachectl -l" to find out the 18 | # active mpm. 19 | # 20 | 21 | # prefork MPM 22 | # StartServers: number of server processes to start 23 | # MinSpareServers: minimum number of server processes which are kept spare 24 | # MaxSpareServers: maximum number of server processes which are kept spare 25 | # MaxRequestWorkers: maximum number of server processes allowed to start 26 | # MaxConnectionsPerChild: maximum number of connections a server process serves 27 | # before terminating 28 | 29 | StartServers 5 30 | MinSpareServers 5 31 | MaxSpareServers 10 32 | MaxRequestWorkers 250 33 | MaxConnectionsPerChild 0 34 | 35 | 36 | # worker MPM 37 | # StartServers: initial number of server processes to start 38 | # MinSpareThreads: minimum number of worker threads which are kept spare 39 | # MaxSpareThreads: maximum number of worker threads which are kept spare 40 | # ThreadsPerChild: constant number of worker threads in each server process 41 | # MaxRequestWorkers: maximum number of worker threads 42 | # MaxConnectionsPerChild: maximum number of connections a server process serves 43 | # before terminating 44 | 45 | StartServers 3 46 | MinSpareThreads 75 47 | MaxSpareThreads 250 48 | ThreadsPerChild 25 49 | MaxRequestWorkers 400 50 | MaxConnectionsPerChild 0 51 | 52 | 53 | # event MPM 54 | # StartServers: initial number of server processes to start 55 | # MinSpareThreads: minimum number of worker threads which are kept spare 56 | # MaxSpareThreads: maximum number of worker threads which are kept spare 57 | # ThreadsPerChild: constant number of worker threads in each server process 58 | # MaxRequestWorkers: maximum number of worker threads 59 | # MaxConnectionsPerChild: maximum number of connections a server process serves 60 | # before terminating 61 | 62 | StartServers 3 63 | MinSpareThreads 75 64 | MaxSpareThreads 250 65 | ThreadsPerChild 25 66 | MaxRequestWorkers 400 67 | MaxConnectionsPerChild 0 68 | 69 | 70 | # NetWare MPM 71 | # ThreadStackSize: Stack size allocated for each worker thread 72 | # StartThreads: Number of worker threads launched at server startup 73 | # MinSpareThreads: Minimum number of idle threads, to handle request spikes 74 | # MaxSpareThreads: Maximum number of idle threads 75 | # MaxThreads: Maximum number of worker threads alive at the same time 76 | # MaxConnectionsPerChild: Maximum number of connections a thread serves. It 77 | # is recommended that the default value of 0 be set 78 | # for this directive on NetWare. This will allow the 79 | # thread to continue to service requests indefinitely. 80 | 81 | ThreadStackSize 65536 82 | StartThreads 250 83 | MinSpareThreads 25 84 | MaxSpareThreads 250 85 | MaxThreads 1000 86 | MaxConnectionsPerChild 0 87 | 88 | 89 | # OS/2 MPM 90 | # StartServers: Number of server processes to maintain 91 | # MinSpareThreads: Minimum number of idle threads per process, 92 | # to handle request spikes 93 | # MaxSpareThreads: Maximum number of idle threads per process 94 | # MaxConnectionsPerChild: Maximum number of connections per server process 95 | 96 | StartServers 2 97 | MinSpareThreads 5 98 | MaxSpareThreads 10 99 | MaxConnectionsPerChild 0 100 | 101 | 102 | # WinNT MPM 103 | # ThreadsPerChild: constant number of worker threads in the server process 104 | # MaxConnectionsPerChild: maximum number of connections a server process serves 105 | 106 | ThreadsPerChild 150 107 | MaxConnectionsPerChild 0 108 | 109 | 110 | # The maximum number of free Kbytes that every allocator is allowed 111 | # to hold without calling free(). In threaded MPMs, every thread has its own 112 | # allocator. When not set, or when set to zero, the threshold will be set to 113 | # unlimited. 114 | 115 | MaxMemFree 2048 116 | 117 | 118 | MaxMemFree 100 119 | 120 | -------------------------------------------------------------------------------- /config/apache/conf.d/languages.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Settings for hosting different languages. 3 | # 4 | # Required modules: mod_mime, mod_negotiation 5 | 6 | # DefaultLanguage and AddLanguage allows you to specify the language of 7 | # a document. You can then use content negotiation to give a browser a 8 | # file in a language the user can understand. 9 | # 10 | # Specify a default language. This means that all data 11 | # going out without a specific language tag (see below) will 12 | # be marked with this one. You probably do NOT want to set 13 | # this unless you are sure it is correct for all cases. 14 | # 15 | # * It is generally better to not mark a page as 16 | # * being a certain language than marking it with the wrong 17 | # * language! 18 | # 19 | # DefaultLanguage nl 20 | # 21 | # Note 1: The suffix does not have to be the same as the language 22 | # keyword --- those with documents in Polish (whose net-standard 23 | # language code is pl) may wish to use "AddLanguage pl .po" to 24 | # avoid the ambiguity with the common suffix for perl scripts. 25 | # 26 | # Note 2: The example entries below illustrate that in some cases 27 | # the two character 'Language' abbreviation is not identical to 28 | # the two character 'Country' code for its country, 29 | # E.g. 'Danmark/dk' versus 'Danish/da'. 30 | # 31 | # Note 3: In the case of 'ltz' we violate the RFC by using a three char 32 | # specifier. There is 'work in progress' to fix this and get 33 | # the reference data for rfc1766 cleaned up. 34 | # 35 | # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl) 36 | # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de) 37 | # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja) 38 | # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn) 39 | # Norwegian (no) - Polish (pl) - Portugese (pt) 40 | # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv) 41 | # Turkish (tr) - Simplified Chinese (zh-CN) - Spanish (es) 42 | # Traditional Chinese (zh-TW) 43 | # 44 | AddLanguage ca .ca 45 | AddLanguage cs .cz .cs 46 | AddLanguage da .dk 47 | AddLanguage de .de 48 | AddLanguage el .el 49 | AddLanguage en .en 50 | AddLanguage eo .eo 51 | AddLanguage es .es 52 | AddLanguage et .et 53 | AddLanguage fr .fr 54 | AddLanguage he .he 55 | AddLanguage hr .hr 56 | AddLanguage it .it 57 | AddLanguage ja .ja 58 | AddLanguage ko .ko 59 | AddLanguage ltz .ltz 60 | AddLanguage nl .nl 61 | AddLanguage nn .nn 62 | AddLanguage no .no 63 | AddLanguage pl .po 64 | AddLanguage pt .pt 65 | AddLanguage pt-BR .pt-br 66 | AddLanguage ru .ru 67 | AddLanguage sv .sv 68 | AddLanguage tr .tr 69 | AddLanguage zh-CN .zh-cn 70 | AddLanguage zh-TW .zh-tw 71 | 72 | # LanguagePriority allows you to give precedence to some languages 73 | # in case of a tie during content negotiation. 74 | # 75 | # Just list the languages in decreasing order of preference. We have 76 | # more or less alphabetized them here. You probably want to change this. 77 | # 78 | LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv tr zh-CN zh-TW 79 | 80 | # 81 | # ForceLanguagePriority allows you to serve a result page rather than 82 | # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback) 83 | # [in case no accepted languages matched the available variants] 84 | # 85 | ForceLanguagePriority Prefer Fallback 86 | 87 | # 88 | # Commonly used filename extensions to character sets. You probably 89 | # want to avoid clashes with the language extensions, unless you 90 | # are good at carefully testing your setup after each change. 91 | # See http://www.iana.org/assignments/character-sets for the 92 | # official list of charset names and their respective RFCs. 93 | # 94 | AddCharset us-ascii.ascii .us-ascii 95 | AddCharset ISO-8859-1 .iso8859-1 .latin1 96 | AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen 97 | AddCharset ISO-8859-3 .iso8859-3 .latin3 98 | AddCharset ISO-8859-4 .iso8859-4 .latin4 99 | AddCharset ISO-8859-5 .iso8859-5 .cyr .iso-ru 100 | AddCharset ISO-8859-6 .iso8859-6 .arb .arabic 101 | AddCharset ISO-8859-7 .iso8859-7 .grk .greek 102 | AddCharset ISO-8859-8 .iso8859-8 .heb .hebrew 103 | AddCharset ISO-8859-9 .iso8859-9 .latin5 .trk 104 | AddCharset ISO-8859-10 .iso8859-10 .latin6 105 | AddCharset ISO-8859-13 .iso8859-13 106 | AddCharset ISO-8859-14 .iso8859-14 .latin8 107 | AddCharset ISO-8859-15 .iso8859-15 .latin9 108 | AddCharset ISO-8859-16 .iso8859-16 .latin10 109 | AddCharset ISO-2022-JP .iso2022-jp .jis 110 | AddCharset ISO-2022-KR .iso2022-kr .kis 111 | AddCharset ISO-2022-CN .iso2022-cn .cis 112 | AddCharset Big5.Big5 .big5 .b5 113 | AddCharset cn-Big5 .cn-big5 114 | # For russian, more than one charset is used (depends on client, mostly): 115 | AddCharset WINDOWS-1251 .cp-1251 .win-1251 116 | AddCharset CP866 .cp866 117 | AddCharset KOI8 .koi8 118 | AddCharset KOI8-E .koi8-e 119 | AddCharset KOI8-r .koi8-r .koi8-ru 120 | AddCharset KOI8-U .koi8-u 121 | AddCharset KOI8-ru .koi8-uk .ua 122 | AddCharset ISO-10646-UCS-2 .ucs2 123 | AddCharset ISO-10646-UCS-4 .ucs4 124 | AddCharset UTF-7 .utf7 125 | AddCharset UTF-8 .utf8 126 | AddCharset UTF-16 .utf16 127 | AddCharset UTF-16BE .utf16be 128 | AddCharset UTF-16LE .utf16le 129 | AddCharset UTF-32 .utf32 130 | AddCharset UTF-32BE .utf32be 131 | AddCharset UTF-32LE .utf32le 132 | AddCharset euc-cn .euc-cn 133 | AddCharset euc-gb .euc-gb 134 | AddCharset euc-jp .euc-jp 135 | AddCharset euc-kr .euc-kr 136 | #Not sure how euc-tw got in - IANA doesn't list it??? 137 | AddCharset EUC-TW .euc-tw 138 | AddCharset gb2312 .gb2312 .gb 139 | AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2 140 | AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4 141 | AddCharset shift_jis .shift_jis .sjis 142 | -------------------------------------------------------------------------------- /config/apache/conf.d/ssl.conf: -------------------------------------------------------------------------------- 1 | # 2 | # This is the Apache server configuration file providing SSL support. 3 | # It contains the configuration directives to instruct the server how to 4 | # serve pages over an https connection. For detailed information about these 5 | # directives see 6 | # 7 | # Do NOT simply read the instructions in here without understanding 8 | # what they do. They're here only as hints or reminders. If you are unsure 9 | # consult the online docs. You have been warned. 10 | # 11 | # Required modules: mod_log_config, mod_setenvif, mod_ssl, 12 | # socache_shmcb_module (for default value of SSLSessionCache) 13 | LoadModule ssl_module modules/mod_ssl.so 14 | LoadModule socache_shmcb_module modules/mod_socache_shmcb.so 15 | 16 | # 17 | # Pseudo Random Number Generator (PRNG): 18 | # Configure one or more sources to seed the PRNG of the SSL library. 19 | # The seed data should be of good random quality. 20 | # WARNING! On some platforms /dev/random blocks if not enough entropy 21 | # is available. This means you then cannot use the /dev/random device 22 | # because it would lead to very long connection times (as long as 23 | # it requires to make more entropy available). But usually those 24 | # platforms additionally provide a /dev/urandom device which doesn't 25 | # block. So, if available, use this one instead. Read the mod_ssl User 26 | # Manual for more details. 27 | # 28 | #SSLRandomSeed startup file:/dev/random 512 29 | SSLRandomSeed startup file:/dev/urandom 512 30 | SSLRandomSeed connect builtin 31 | #SSLRandomSeed connect file:/dev/random 512 32 | #SSLRandomSeed connect file:/dev/urandom 512 33 | 34 | 35 | # 36 | # When we also provide SSL we have to listen to the 37 | # standard HTTP port (see above) and to the HTTPS port 38 | # 39 | Listen 443 40 | 41 | ## 42 | ## SSL Global Context 43 | ## 44 | ## All SSL configuration in this context applies both to 45 | ## the main server and all SSL-enabled virtual hosts. 46 | ## 47 | 48 | # SSL Cipher Suite: 49 | # List the ciphers that the client is permitted to negotiate, 50 | # and that httpd will negotiate as the client of a proxied server. 51 | # See the OpenSSL documentation for a complete list of ciphers, and 52 | # ensure these follow appropriate best practices for this deployment. 53 | # httpd 2.2.30, 2.4.13 and later force-disable aNULL, eNULL and EXP ciphers, 54 | # while OpenSSL disabled these by default in 0.9.8zf/1.0.0r/1.0.1m/1.0.2a. 55 | SSLCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES:!ADH 56 | SSLProxyCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES:!ADH 57 | 58 | # By the end of 2016, only TLSv1.2 ciphers should remain in use. 59 | # Older ciphers should be disallowed as soon as possible, while the 60 | # kRSA ciphers do not offer forward secrecy. These changes inhibit 61 | # older clients (such as IE6 SP2 or IE8 on Windows XP, or other legacy 62 | # non-browser tooling) from successfully connecting. 63 | # 64 | # To restrict mod_ssl to use only TLSv1.2 ciphers, and disable 65 | # those protocols which do not support forward secrecy, replace 66 | # the SSLCipherSuite and SSLProxyCipherSuite directives above with 67 | # the following two directives, as soon as practical. 68 | # SSLCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA 69 | # SSLProxyCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA 70 | 71 | # User agents such as web browsers are not configured for the user's 72 | # own preference of either security or performance, therefore this 73 | # must be the prerogative of the web server administrator who manages 74 | # cpu load versus confidentiality, so enforce the server's cipher order. 75 | SSLHonorCipherOrder on 76 | 77 | # SSL Protocol support: 78 | # List the protocol versions which clients are allowed to connect with. 79 | # Disable SSLv3 by default (cf. RFC 7525 3.1.1). TLSv1 (1.0) should be 80 | # disabled as quickly as practical. By the end of 2016, only the TLSv1.2 81 | # protocol or later should remain in use. 82 | SSLProtocol all -SSLv2 -SSLv3 83 | SSLProxyProtocol all -SSLv2 -SSLv3 84 | 85 | # Pass Phrase Dialog: 86 | # Configure the pass phrase gathering process. 87 | # The filtering dialog program (`builtin' is an internal 88 | # terminal dialog) has to provide the pass phrase on stdout. 89 | SSLPassPhraseDialog builtin 90 | 91 | # Inter-Process Session Cache: 92 | # Configure the SSL Session Cache: First the mechanism 93 | # to use and second the expiring timeout (in seconds). 94 | #SSLSessionCache "dbm:/run/apache2/ssl_scache" 95 | SSLSessionCache "shmcb:/var/cache/mod_ssl/scache(512000)" 96 | SSLSessionCacheTimeout 300 97 | 98 | # OCSP Stapling (requires OpenSSL 0.9.8h or later) 99 | # 100 | # This feature is disabled by default and requires at least 101 | # the two directives SSLUseStapling and SSLStaplingCache. 102 | # Refer to the documentation on OCSP Stapling in the SSL/TLS 103 | # How-To for more information. 104 | # 105 | # Enable stapling for all SSL-enabled servers: 106 | #SSLUseStapling On 107 | 108 | # Define a relatively small cache for OCSP Stapling using 109 | # the same mechanism that is used for the SSL session cache 110 | # above. If stapling is used with more than a few certificates, 111 | # the size may need to be increased. (AH01929 will be logged.) 112 | #SSLStaplingCache "shmcb:/run/apache2/ssl_stapling(32768)" 113 | 114 | # Seconds before valid OCSP responses are expired from the cache 115 | #SSLStaplingStandardCacheTimeout 3600 116 | 117 | # Seconds before invalid OCSP responses are expired from the cache 118 | #SSLStaplingErrorCacheTimeout 600 119 | 120 | BrowserMatch "MSIE [2-5]" \ 121 | nokeepalive ssl-unclean-shutdown \ 122 | downgrade-1.0 force-response-1.0 123 | 124 | ErrorLog logs/ssl_error.log 125 | TransferLog logs/ssl_access.log 126 | -------------------------------------------------------------------------------- /config/php/7.3/php-fpm.conf: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;; 2 | ; FPM Configuration ; 3 | ;;;;;;;;;;;;;;;;;;;;; 4 | 5 | ; All relative paths in this configuration file are relative to PHP's install 6 | ; prefix (/usr). This prefix can be dynamically changed by using the 7 | ; '-p' argument from the command line. 8 | 9 | ;;;;;;;;;;;;;;;;;; 10 | ; Global Options ; 11 | ;;;;;;;;;;;;;;;;;; 12 | 13 | [global] 14 | ; Pid file 15 | ; Note: the default prefix is /var 16 | ; Default Value: none 17 | ;pid = run/php-fpm7.pid 18 | 19 | ; Error log file 20 | ; If it's set to "syslog", log is sent to syslogd instead of being written 21 | ; into a local file. 22 | ; Note: the default prefix is /var 23 | ; Default Value: log/php7/error.log 24 | ;error_log = log/php7/error.log 25 | error_log = /dev/stderr 26 | 27 | ; syslog_facility is used to specify what type of program is logging the 28 | ; message. This lets syslogd specify that messages from different facilities 29 | ; will be handled differently. 30 | ; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON) 31 | ; Default Value: daemon 32 | ;syslog.facility = daemon 33 | 34 | ; syslog_ident is prepended to every message. If you have multiple FPM 35 | ; instances running on the same server, you can change the default value 36 | ; which must suit common needs. 37 | ; Default Value: php-fpm7 38 | ;syslog.ident = php-fpm7 39 | 40 | ; Log level 41 | ; Possible Values: alert, error, warning, notice, debug 42 | ; Default Value: notice 43 | ;log_level = notice 44 | 45 | ; Log limit on number of characters in the single line (log entry). If the 46 | ; line is over the limit, it is wrapped on multiple lines. The limit is for 47 | ; all logged characters including message prefix and suffix if present. However 48 | ; the new line character does not count into it as it is present only when 49 | ; logging to a file descriptor. It means the new line character is not present 50 | ; when logging to syslog. 51 | ; Default Value: 1024 52 | ;log_limit = 4096 53 | 54 | ; Log buffering specifies if the log line is buffered which means that the 55 | ; line is written in a single write operation. If the value is false, then the 56 | ; data is written directly into the file descriptor. It is an experimental 57 | ; option that can potentionaly improve logging performance and memory usage 58 | ; for some heavy logging scenarios. This option is ignored if logging to syslog 59 | ; as it has to be always buffered. 60 | ; Default value: yes 61 | ;log_buffering = no 62 | 63 | ; If this number of child processes exit with SIGSEGV or SIGBUS within the time 64 | ; interval set by emergency_restart_interval then FPM will restart. A value 65 | ; of '0' means 'Off'. 66 | ; Default Value: 0 67 | ;emergency_restart_threshold = 0 68 | 69 | ; Interval of time used by emergency_restart_interval to determine when 70 | ; a graceful restart will be initiated. This can be useful to work around 71 | ; accidental corruptions in an accelerator's shared memory. 72 | ; Available Units: s(econds), m(inutes), h(ours), or d(ays) 73 | ; Default Unit: seconds 74 | ; Default Value: 0 75 | ;emergency_restart_interval = 0 76 | 77 | ; Time limit for child processes to wait for a reaction on signals from master. 78 | ; Available units: s(econds), m(inutes), h(ours), or d(ays) 79 | ; Default Unit: seconds 80 | ; Default Value: 0 81 | ;process_control_timeout = 0 82 | 83 | ; The maximum number of processes FPM will fork. This has been designed to control 84 | ; the global number of processes when using dynamic PM within a lot of pools. 85 | ; Use it with caution. 86 | ; Note: A value of 0 indicates no limit 87 | ; Default Value: 0 88 | ; process.max = 128 89 | 90 | ; Specify the nice(2) priority to apply to the master process (only if set) 91 | ; The value can vary from -19 (highest priority) to 20 (lowest priority) 92 | ; Note: - It will only work if the FPM master process is launched as root 93 | ; - The pool process will inherit the master process priority 94 | ; unless specified otherwise 95 | ; Default Value: no set 96 | ; process.priority = -19 97 | 98 | ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging. 99 | ; Default Value: yes 100 | daemonize = no 101 | 102 | ; Set open file descriptor rlimit for the master process. 103 | ; Default Value: system defined value 104 | ;rlimit_files = 1024 105 | 106 | ; Set max core size rlimit for the master process. 107 | ; Possible Values: 'unlimited' or an integer greater or equal to 0 108 | ; Default Value: system defined value 109 | ;rlimit_core = 0 110 | 111 | ; Specify the event mechanism FPM will use. The following is available: 112 | ; - select (any POSIX os) 113 | ; - poll (any POSIX os) 114 | ; - epoll (linux >= 2.5.44) 115 | ; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0) 116 | ; - /dev/poll (Solaris >= 7) 117 | ; - port (Solaris >= 10) 118 | ; Default Value: not set (auto detection) 119 | ;events.mechanism = epoll 120 | 121 | ; When FPM is built with systemd integration, specify the interval, 122 | ; in seconds, between health report notification to systemd. 123 | ; Set to 0 to disable. 124 | ; Available Units: s(econds), m(inutes), h(ours) 125 | ; Default Unit: seconds 126 | ; Default value: 10 127 | ;systemd_interval = 10 128 | 129 | ;;;;;;;;;;;;;;;;;;;; 130 | ; Pool Definitions ; 131 | ;;;;;;;;;;;;;;;;;;;; 132 | 133 | ; Multiple pools of child processes may be started with different listening 134 | ; ports and different management options. The name of the pool will be 135 | ; used in logs and stats. There is no limitation on the number of pools which 136 | ; FPM can handle. Your system will tell you anyway :) 137 | 138 | ; Include one or more files. If glob(3) exists, it is used to include a bunch of 139 | ; files from a glob(3) pattern. This directive can be used everywhere in the 140 | ; file. 141 | ; Relative path can also be used. They will be prefixed by: 142 | ; - the global prefix if it's been set (-p argument) 143 | ; - /usr otherwise 144 | include=/etc/php7/php-fpm.d/*.conf 145 | -------------------------------------------------------------------------------- /config/php/7.4/php-fpm.conf: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;; 2 | ; FPM Configuration ; 3 | ;;;;;;;;;;;;;;;;;;;;; 4 | 5 | ; All relative paths in this configuration file are relative to PHP's install 6 | ; prefix (/usr). This prefix can be dynamically changed by using the 7 | ; '-p' argument from the command line. 8 | 9 | ;;;;;;;;;;;;;;;;;; 10 | ; Global Options ; 11 | ;;;;;;;;;;;;;;;;;; 12 | 13 | [global] 14 | ; Pid file 15 | ; Note: the default prefix is /var 16 | ; Default Value: none 17 | ;pid = run/php-fpm7.pid 18 | 19 | ; Error log file 20 | ; If it's set to "syslog", log is sent to syslogd instead of being written 21 | ; into a local file. 22 | ; Note: the default prefix is /var 23 | ; Default Value: log/php7/error.log 24 | ;error_log = log/php7/error.log 25 | error_log = /dev/stderr 26 | 27 | ; syslog_facility is used to specify what type of program is logging the 28 | ; message. This lets syslogd specify that messages from different facilities 29 | ; will be handled differently. 30 | ; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON) 31 | ; Default Value: daemon 32 | ;syslog.facility = daemon 33 | 34 | ; syslog_ident is prepended to every message. If you have multiple FPM 35 | ; instances running on the same server, you can change the default value 36 | ; which must suit common needs. 37 | ; Default Value: php-fpm7 38 | ;syslog.ident = php-fpm7 39 | 40 | ; Log level 41 | ; Possible Values: alert, error, warning, notice, debug 42 | ; Default Value: notice 43 | ;log_level = notice 44 | 45 | ; Log limit on number of characters in the single line (log entry). If the 46 | ; line is over the limit, it is wrapped on multiple lines. The limit is for 47 | ; all logged characters including message prefix and suffix if present. However 48 | ; the new line character does not count into it as it is present only when 49 | ; logging to a file descriptor. It means the new line character is not present 50 | ; when logging to syslog. 51 | ; Default Value: 1024 52 | ;log_limit = 4096 53 | 54 | ; Log buffering specifies if the log line is buffered which means that the 55 | ; line is written in a single write operation. If the value is false, then the 56 | ; data is written directly into the file descriptor. It is an experimental 57 | ; option that can potentionaly improve logging performance and memory usage 58 | ; for some heavy logging scenarios. This option is ignored if logging to syslog 59 | ; as it has to be always buffered. 60 | ; Default value: yes 61 | ;log_buffering = no 62 | 63 | ; If this number of child processes exit with SIGSEGV or SIGBUS within the time 64 | ; interval set by emergency_restart_interval then FPM will restart. A value 65 | ; of '0' means 'Off'. 66 | ; Default Value: 0 67 | ;emergency_restart_threshold = 0 68 | 69 | ; Interval of time used by emergency_restart_interval to determine when 70 | ; a graceful restart will be initiated. This can be useful to work around 71 | ; accidental corruptions in an accelerator's shared memory. 72 | ; Available Units: s(econds), m(inutes), h(ours), or d(ays) 73 | ; Default Unit: seconds 74 | ; Default Value: 0 75 | ;emergency_restart_interval = 0 76 | 77 | ; Time limit for child processes to wait for a reaction on signals from master. 78 | ; Available units: s(econds), m(inutes), h(ours), or d(ays) 79 | ; Default Unit: seconds 80 | ; Default Value: 0 81 | ;process_control_timeout = 0 82 | 83 | ; The maximum number of processes FPM will fork. This has been designed to control 84 | ; the global number of processes when using dynamic PM within a lot of pools. 85 | ; Use it with caution. 86 | ; Note: A value of 0 indicates no limit 87 | ; Default Value: 0 88 | ; process.max = 128 89 | 90 | ; Specify the nice(2) priority to apply to the master process (only if set) 91 | ; The value can vary from -19 (highest priority) to 20 (lowest priority) 92 | ; Note: - It will only work if the FPM master process is launched as root 93 | ; - The pool process will inherit the master process priority 94 | ; unless specified otherwise 95 | ; Default Value: no set 96 | ; process.priority = -19 97 | 98 | ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging. 99 | ; Default Value: yes 100 | daemonize = no 101 | 102 | ; Set open file descriptor rlimit for the master process. 103 | ; Default Value: system defined value 104 | ;rlimit_files = 1024 105 | 106 | ; Set max core size rlimit for the master process. 107 | ; Possible Values: 'unlimited' or an integer greater or equal to 0 108 | ; Default Value: system defined value 109 | ;rlimit_core = 0 110 | 111 | ; Specify the event mechanism FPM will use. The following is available: 112 | ; - select (any POSIX os) 113 | ; - poll (any POSIX os) 114 | ; - epoll (linux >= 2.5.44) 115 | ; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0) 116 | ; - /dev/poll (Solaris >= 7) 117 | ; - port (Solaris >= 10) 118 | ; Default Value: not set (auto detection) 119 | ;events.mechanism = epoll 120 | 121 | ; When FPM is built with systemd integration, specify the interval, 122 | ; in seconds, between health report notification to systemd. 123 | ; Set to 0 to disable. 124 | ; Available Units: s(econds), m(inutes), h(ours) 125 | ; Default Unit: seconds 126 | ; Default value: 10 127 | ;systemd_interval = 10 128 | 129 | ;;;;;;;;;;;;;;;;;;;; 130 | ; Pool Definitions ; 131 | ;;;;;;;;;;;;;;;;;;;; 132 | 133 | ; Multiple pools of child processes may be started with different listening 134 | ; ports and different management options. The name of the pool will be 135 | ; used in logs and stats. There is no limitation on the number of pools which 136 | ; FPM can handle. Your system will tell you anyway :) 137 | 138 | ; Include one or more files. If glob(3) exists, it is used to include a bunch of 139 | ; files from a glob(3) pattern. This directive can be used everywhere in the 140 | ; file. 141 | ; Relative path can also be used. They will be prefixed by: 142 | ; - the global prefix if it's been set (-p argument) 143 | ; - /usr otherwise 144 | include=/etc/php7/php-fpm.d/*.conf 145 | -------------------------------------------------------------------------------- /scripts/pgsql: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Helper to run postgres dump/restore, part of Docker compose Drupal project. 4 | # https://github.com/Mogtofu33/docker-compose-drupal 5 | # 6 | # Usage: 7 | # pgsql dump | restore 8 | # 9 | # Depends on: 10 | # docker 11 | # 12 | # Bash Boilerplate: https://github.com/alphabetum/bash-boilerplate 13 | # Bash Boilerplate: Copyright (c) 2015 William Melody • hi@williammelody.com 14 | 15 | _SOURCE="${BASH_SOURCE[0]}" 16 | while [ -h "$_SOURCE" ]; do 17 | _DIR="$( cd -P "$( dirname "$_SOURCE" )" && pwd )" 18 | _SOURCE="$(readlink "$_SOURCE")" 19 | [[ $_SOURCE != /* ]] && _SOURCE="$_DIR/$_SOURCE" 20 | done 21 | _DIR="$( cd -P "$( dirname "$_SOURCE" )" && pwd )" 22 | 23 | if [ ! -f $_DIR/helpers/common.sh ]; then 24 | printf "[ERROR] Missing helpers/common.sh file.\\n" 25 | exit 1 26 | fi 27 | 28 | source $_DIR/helpers/common.sh 29 | 30 | ############################################################################### 31 | # Help 32 | ############################################################################### 33 | 34 | # _print_help() 35 | # 36 | # Usage: 37 | # _print_help 38 | # 39 | # Print the program help information. 40 | _print_help() { 41 | _help_logo 42 | cat <] [] 191 | # 192 | # Description: 193 | # Entry point for the program, handling basic option parsing and dispatching. 194 | _main() { 195 | 196 | _set_container_pgsql 197 | _ensure_dump_dir 198 | _DB_NAME=$POSTGRES_DB 199 | _DUMP_FILE=${2:-} 200 | 201 | # Run command if exist. 202 | __call="_${1:-}" 203 | if [ "$(type -t "${__call}")" == 'function' ]; then 204 | $__call 205 | else 206 | _print_help 207 | fi 208 | 209 | } 210 | 211 | # Call `_main` after everything has been defined. 212 | _main "$@" 213 | -------------------------------------------------------------------------------- /docker-compose.tpl.yml: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Docker Compose Drupal 8 full dev stack. 3 | # 4 | # Project page: 5 | # https://github.com/Mogtofu33/docker-compose-drupal 6 | # Documentation: 7 | # https://github.com/Mogtofu33/docker-compose-drupal/blob/master/README.md 8 | ################################################################################ 9 | version: '3' 10 | services: 11 | apache: 12 | image: mogtofu33/apache:latest 13 | depends_on: 14 | - php 15 | ports: 16 | - "${APACHE_HOST_HTTP_PORT:-80}:80" 17 | - "${APACHE_HOST_HTTPS_PORT:-443}:443" 18 | # Web root access, optional. 19 | - "${APACHE_HOST_ROOT_PORT:-88}:81" 20 | volumes: 21 | - ${HOST_WEB_ROOT:-./drupal}:/var/www/localhost 22 | # Apache configuration with SSL support. 23 | - ./config/apache/httpd.conf:/etc/apache2/httpd.conf:ro 24 | - ./config/apache/vhost.conf:/etc/apache2/vhost.conf:ro 25 | - ./config/apache/conf.d/:/etc/apache2/conf.d/:ro 26 | - ./config/apache/ssl/:/etc/ssl/apache2/:ro 27 | # Php FPM socket 28 | - php-sock:/sock:ro 29 | ## If PgSQL, ease drush pgsql access. 30 | - ./config/pgsql/.pg_pass:/home/apache/.pg_pass:ro 31 | env_file: .env 32 | restart: unless-stopped 33 | container_name: ${PROJECT_NAME:-dcd}-apache 34 | nginx: 35 | image: nginx:alpine 36 | depends_on: 37 | - php 38 | ports: 39 | - "${NGINX_HOST_HTTP_PORT:-81}:80" 40 | # - "${NGINX_HOST_HTTPS_PORT:-444}:443" 41 | volumes: 42 | - ${HOST_WEB_ROOT:-./drupal}:/var/www/localhost 43 | - ./config/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro 44 | # Php FPM socket 45 | - php-sock:/sock:ro 46 | env_file: .env 47 | restart: unless-stopped 48 | container_name: ${PROJECT_NAME:-dcd}-nginx 49 | php: 50 | image: mogtofu33/php:${PHP_VERSION:-7.3} 51 | volumes: 52 | ## If you have composer set locally, share cache to speed up. 53 | # - ${HOME:-}/.composer/cache:/var/www/.composer/cache 54 | - ${HOST_WEB_ROOT:-./drupal}:/var/www/localhost 55 | - ./config/php/${PHP_VERSION:-7.3}/php.ini:/etc/php7/php.ini:ro 56 | - ./config/php/${PHP_VERSION:-7.3}/php-fpm.conf:/etc/php7/php-fpm.conf:ro 57 | - ./config/php/${PHP_VERSION:-7.3}/conf.d/:/etc/php7/conf.d/:ro 58 | - ./config/php/${PHP_VERSION:-7.3}/php-fpm.d/:/etc/php7/php-fpm.d/:ro 59 | # Drush 9 config file. 60 | - ./config/drush/drush.yml:/etc/drush/drush.yml:ro 61 | # Used by dashboard for accessing tools. 62 | - ./tools:/tools:ro 63 | # Share db dump folder. 64 | - ${HOST_DATABASE_DUMP:-./database/dump}:/dump 65 | # Php FPM socket 66 | - php-sock:/sock 67 | ## If PgSQL, ease drush pgsql access. 68 | - ./config/pgsql/.pg_pass:/home/apache/.pg_pass:ro 69 | links: 70 | # Choose database, uncomment service concerned below. 71 | - mysql 72 | - pgsql 73 | # Choose optionnal services. 74 | - memcache 75 | - redis 76 | - solr 77 | - mailhog 78 | # - varnish 79 | env_file: .env 80 | restart: unless-stopped 81 | container_name: ${PROJECT_NAME:-dcd}-php 82 | mysql: 83 | image: mariadb:latest 84 | expose: 85 | - "3306" 86 | volumes: 87 | - ${HOST_DATABASE_DUMP:-./database/dump}:/dump 88 | # All .sql files will be imported on first start by order. 89 | - ./database/mysql-init:/docker-entrypoint-initdb.d 90 | - ./config/mysql:/etc/mysql:ro 91 | env_file: .env 92 | restart: unless-stopped 93 | container_name: ${PROJECT_NAME:-dcd}-mysql 94 | pgsql: 95 | image: postgres:alpine 96 | expose: 97 | - "5432" 98 | volumes: 99 | - ${HOST_DATABASE_DUMP:-./database/dump}:/dump 100 | # A dump.pg_dump file will be imported from here on first start. 101 | - ./database/pgsql-init:/docker-entrypoint-initdb.d 102 | # Add pg_pass to ease drush access. 103 | - ./config/pgsql/.pg_pass:/home/postgres/.pg_pass 104 | env_file: .env 105 | restart: unless-stopped 106 | container_name: ${PROJECT_NAME:-dcd}-pgsql 107 | mailhog: 108 | image: mailhog/mailhog:latest 109 | expose: 110 | - "1025" 111 | ports: 112 | - "8025:8025" 113 | restart: unless-stopped 114 | container_name: ${PROJECT_NAME:-dcd}-mailhog 115 | memcache: 116 | image: memcached:alpine 117 | expose: 118 | - "11211" 119 | restart: unless-stopped 120 | container_name: ${PROJECT_NAME:-dcd}-memcache 121 | redis: 122 | image: redis:alpine 123 | expose: 124 | - "6379" 125 | restart: unless-stopped 126 | container_name: ${PROJECT_NAME:-dcd}-redis 127 | solr: 128 | image: mogtofu33/solr:${SOLR_VERSION:-7} 129 | ports: 130 | - "8983:8983" 131 | environment: 132 | - EXTRA_ACCESS="/solr/drupal" 133 | restart: unless-stopped 134 | container_name: ${PROJECT_NAME:-dcd}-solr 135 | # varnish: 136 | # image: wodby/varnish:latest 137 | # depends_on: 138 | # - apache 139 | # # - nginx 140 | # ports: 141 | # - "6081:6081" 142 | # environment: 143 | # VARNISH_SECRET: secret 144 | # VARNISH_BACKEND_HOST: apache 145 | # # VARNISH_BACKEND_HOST: nginx 146 | # VARNISH_BACKEND_PORT: 80 147 | # VARNISH_CONFIG_PRESET: drupal 148 | # VARNISH_PURGE_EXTERNAL_REQUEST_HEADER: X-Real-IP 149 | # container_name: ${PROJECT_NAME:-dcd}-varnish 150 | tools: 151 | image: nginx:alpine 152 | depends_on: 153 | - php 154 | ports: 155 | - "${HOST_TOOLS_PORT:-8008}:80" 156 | volumes: 157 | - ./tools:/tools:ro 158 | - ./build/dashboard/default.conf:/etc/nginx/conf.d/default.conf:ro 159 | # Php FPM socket 160 | - php-sock:/sock:ro 161 | env_file: .env 162 | restart: unless-stopped 163 | container_name: ${PROJECT_NAME:-dcd}-tools 164 | dashboard: 165 | image: mogtofu33/dashboard:latest 166 | ports: 167 | - "${HOST_DASHBORAD_PORT:-8181}:5000" 168 | volumes: 169 | # Share configs for reading on the dashboard. 170 | - ./config/apache/vhost.conf:/config/vhost.conf:ro 171 | - ./config/nginx/default.conf:/config/default.conf:ro 172 | - ./tools:/tools:ro 173 | - .env:/config/stack.env:ro 174 | # Access docker daemon. 175 | - /var/run/docker.sock:/var/run/docker.sock 176 | env_file: .env 177 | restart: unless-stopped 178 | container_name: ${PROJECT_NAME:-dcd}-dashboard 179 | ## Full advanced dashboard. 180 | # portainer: 181 | # image: portainer/portainer:latest 182 | # ports: 183 | # - "9000:9000" 184 | # command: --no-auth -H unix:///var/run/docker.sock 185 | # volumes: 186 | # - /var/run/docker.sock:/var/run/docker.sock 187 | # restart: unless-stopped 188 | # container_name: ${PROJECT_NAME:-dcd}-portainer 189 | 190 | volumes: 191 | php-sock: -------------------------------------------------------------------------------- /config/drush/drush.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Examples of valid statements for a Drush runtime config (drush.yml) file. 3 | # 4 | # Use this file to cut down on typing out lengthy and repetitive command line 5 | # options in the Drush commands you use and to avoid mistakes. 6 | # 7 | # The Drush configuration system has been factored out and shared with 8 | # the world at https://github.com/consolidation/config. Feel free to use it 9 | # for your projects. Lots more usage information is there. 10 | 11 | # Directories and Discovery 12 | # 13 | # Rename this file to drush.yml and copy it to one of the places listed below 14 | # in order of precedence: 15 | # 16 | # 1. Drupal site folder (e.g. sites/{default|example.com}/drush.yml). 17 | # 2. Drupal /drush and sites/all/drush folders, or the /drush folder 18 | # in the directory above the Drupal root. 19 | # 3. In any location, as specified by the --config (-c) option. 20 | # 4. User's .drush folder (i.e. ~/.drush/drush.yml). 21 | # 5. System wide configuration folder (e.g. /etc/drush/drush.yml or C:\ProgramData\Drush\drush.yml). 22 | # 23 | # If a configuration file is found in any of the above locations, it will be 24 | # loaded and merged with other configuration files in the search list. 25 | # 26 | # Version-specific configuration 27 | # 28 | # Drush started using yml files for configuration in version 9; earlier versions 29 | # of Drush will never attempt to load a drush.yml file. It is also possible 30 | # to limit the version of Drush that will load a configuration file by placing 31 | # the Drush major version number in the filename, e.g. drush9.yml. 32 | 33 | # Environment variables 34 | # 35 | # Your Drush config file may reference environment variables using a syntax like ${env.home}. 36 | # For example see the drush.paths examples below. 37 | # 38 | # An alternative way to populate Drush configuration is to define environment variables that 39 | # correspond to config keys. For example, to populate the options.uri config item, 40 | # create an environment variable `DRUSH_OPTIONS_URI=http://example.com`. 41 | # As you can see, variable names should be uppercased, prefixed with `DRUSH_`, and periods 42 | # replaced with dashes. 43 | 44 | drush: 45 | paths: 46 | # Specify config files to load. 47 | config: 48 | # Load any personal config files. Is silently skipped if not found. Filename must be drush.yml 49 | - ${env.home}/.drush/config/drush.yml 50 | 51 | 52 | # Specify folders to search for Drush command files. These locations 53 | # are always merged with include paths defined on the command line or 54 | # in other configuration files. On the command line, paths may be separated 55 | # by a colon (:) on Unix-based systems or a semi-colon (;) on Windows, 56 | # or multiple --include options may be provided. Drush 8 and earlier did 57 | # a deep search in ~/.drush and /usr/share/drush/commands when loading 58 | # command files. 59 | include: 60 | - '${env.home}/.drush/commands' 61 | - /usr/share/drush/commands 62 | 63 | # Specify the folders to search for Drush alias files (*.site.yml). These 64 | # locations are always merged with alias paths defined on the command line 65 | # or in other configuration files. On the command line, paths may be 66 | # separated by a colon (:) on Unix-based systems or a semi-colon (;) on 67 | # Windows, or multiple --alias-path options may be provided. Note that 68 | # Drush 8 and earlier did a deep search in ~/.drush and /etc/drush when 69 | # loading alias files. 70 | alias-path: 71 | - '${env.home}/.drush/sites' 72 | - /etc/drush/sites 73 | 74 | # This section is for setting global options. 75 | options: 76 | # Specify the base_url that should be used when generating links. 77 | # Not recommended if you have more than one Drupal site on your system. 78 | # uri: 'http://example.com/subdir' 79 | 80 | # Specify your Drupal core base directory (useful if you use symlinks). 81 | # Not recommended if you have more than one Drupal root on your system. 82 | # root: '/home/USER/workspace/drupal-6' 83 | 84 | # Enable verbose mode. 85 | # verbose: true 86 | 87 | 88 | # This section is for setting command-specific options. 89 | command: 90 | sql: 91 | dump: 92 | options: 93 | # Uncomment to omit cache and similar tables (including during a sql:sync). 94 | structure-tables-key: common 95 | php: 96 | script: 97 | options: 98 | # Additional folders to search for scripts. 99 | # script-path: 'sites/all/scripts:profiles/myprofile/scripts' 100 | core: 101 | rsync: 102 | options: 103 | # Ensure all rsync commands use verbose output. 104 | # verbose: true 105 | 106 | site: 107 | install: 108 | options: 109 | # Set a predetermined username and password when using site-install. 110 | db-url: mysql://drupal:drupal@mysql/drupal 111 | db-su: root 112 | db-su-pw: root 113 | # account-name: 'alice' 114 | # account-pass: 'secret' 115 | 116 | # 117 | # The sections below are configuration thats consulted by various commands, outside 118 | # of the option system. 119 | # 120 | 121 | sql: 122 | # An explicit list of tables which should be included in sql-dump and sql-sync. 123 | # tables: 124 | # common: 125 | # - user 126 | # - permissions 127 | # - role_permissions 128 | # - role 129 | # List of tables whose *data* is skipped by the 'sql-dump' and 'sql-sync' 130 | # commands when the "--structure-tables-key=common" option is provided. 131 | # You may add specific tables to the existing array or add a new element. 132 | structure-tables: 133 | common: 134 | - cache 135 | - cachetags 136 | - 'cache_*' 137 | - history 138 | - 'search_*' 139 | - sessions 140 | - watchdog 141 | - webprofiler 142 | # List of tables to be omitted entirely from SQL dumps made by the 'sql-dump' 143 | # and 'sql-sync' commands when the "--skip-tables-key=common" option is 144 | # provided on the command line. This is useful if your database contains 145 | # non-Drupal tables used by some other application or during a migration for 146 | # example. You may add new tables to the existing array or add a new element. 147 | skip-tables: 148 | common: 149 | - 'migration_*' 150 | 151 | ssh: 152 | # Specify options to pass to ssh in backend invoke. The default is to prohibit 153 | # password authentication, and is included here, so you may add additional 154 | # parameters without losing the default configuration. 155 | options: '-o PasswordAuthentication=no' 156 | 157 | notify: 158 | # Notify when command takes more than 30 seconds. 159 | duration: 0 160 | # Specify a command to run. Defaults to Notification Center (OSX) or libnotify (Linux) 161 | # cmd: /path/to/program 162 | # See src/Commands/core/NotifyCommands.php for more configuration settings. 163 | 164 | xh: 165 | # Start profiling via xhprof/tideways and show a link to the run report. 166 | # link: http://xhprof.local 167 | # See src/Commands/core/XhprofCommands.php for more configuration settings. 168 | -------------------------------------------------------------------------------- /config/apache/httpd.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Minimal Apache configuration without comments, 3 | # See for detailed information. 4 | # In particular, see 5 | # 6 | # for a discussion of each configuration directive. 7 | # 8 | 9 | ServerTokens OS 10 | ServerRoot /var/www 11 | Listen 80 12 | Listen 81 13 | 14 | ServerAdmin dcd@test.com 15 | ServerSignature On 16 | ServerName localhost 17 | 18 | # ErrorLog logs/error.log 19 | # Return errors to Docker directly. 20 | ErrorLog /dev/stderr 21 | 22 | # Possible values include: debug, info, notice, warn, error, crit, 23 | # alert, emerg. 24 | LogLevel info 25 | 26 | LoadModule authn_file_module modules/mod_authn_file.so 27 | LoadModule authn_dbm_module modules/mod_authn_dbm.so 28 | LoadModule authn_anon_module modules/mod_authn_anon.so 29 | LoadModule authn_dbd_module modules/mod_authn_dbd.so 30 | LoadModule authn_socache_module modules/mod_authn_socache.so 31 | LoadModule authn_core_module modules/mod_authn_core.so 32 | LoadModule authz_host_module modules/mod_authz_host.so 33 | LoadModule authz_groupfile_module modules/mod_authz_groupfile.so 34 | LoadModule authz_user_module modules/mod_authz_user.so 35 | LoadModule authz_dbm_module modules/mod_authz_dbm.so 36 | LoadModule authz_owner_module modules/mod_authz_owner.so 37 | LoadModule authz_dbd_module modules/mod_authz_dbd.so 38 | LoadModule authz_core_module modules/mod_authz_core.so 39 | LoadModule access_compat_module modules/mod_access_compat.so 40 | LoadModule auth_basic_module modules/mod_auth_basic.so 41 | LoadModule auth_form_module modules/mod_auth_form.so 42 | LoadModule auth_digest_module modules/mod_auth_digest.so 43 | LoadModule allowmethods_module modules/mod_allowmethods.so 44 | LoadModule file_cache_module modules/mod_file_cache.so 45 | LoadModule cache_module modules/mod_cache.so 46 | LoadModule cache_disk_module modules/mod_cache_disk.so 47 | LoadModule cache_socache_module modules/mod_cache_socache.so 48 | #LoadModule socache_shmcb_module modules/mod_socache_shmcb.so 49 | LoadModule socache_dbm_module modules/mod_socache_dbm.so 50 | LoadModule socache_memcache_module modules/mod_socache_memcache.so 51 | LoadModule watchdog_module modules/mod_watchdog.so 52 | LoadModule macro_module modules/mod_macro.so 53 | LoadModule dbd_module modules/mod_dbd.so 54 | LoadModule dumpio_module modules/mod_dumpio.so 55 | LoadModule echo_module modules/mod_echo.so 56 | LoadModule buffer_module modules/mod_buffer.so 57 | LoadModule data_module modules/mod_data.so 58 | LoadModule ratelimit_module modules/mod_ratelimit.so 59 | LoadModule reqtimeout_module modules/mod_reqtimeout.so 60 | LoadModule ext_filter_module modules/mod_ext_filter.so 61 | LoadModule request_module modules/mod_request.so 62 | LoadModule include_module modules/mod_include.so 63 | LoadModule filter_module modules/mod_filter.so 64 | LoadModule reflector_module modules/mod_reflector.so 65 | LoadModule substitute_module modules/mod_substitute.so 66 | LoadModule sed_module modules/mod_sed.so 67 | LoadModule charset_lite_module modules/mod_charset_lite.so 68 | LoadModule deflate_module modules/mod_deflate.so 69 | LoadModule mime_module modules/mod_mime.so 70 | LoadModule log_config_module modules/mod_log_config.so 71 | LoadModule log_debug_module modules/mod_log_debug.so 72 | LoadModule log_forensic_module modules/mod_log_forensic.so 73 | LoadModule logio_module modules/mod_logio.so 74 | LoadModule env_module modules/mod_env.so 75 | LoadModule mime_magic_module modules/mod_mime_magic.so 76 | LoadModule expires_module modules/mod_expires.so 77 | LoadModule headers_module modules/mod_headers.so 78 | LoadModule usertrack_module modules/mod_usertrack.so 79 | LoadModule unique_id_module modules/mod_unique_id.so 80 | LoadModule setenvif_module modules/mod_setenvif.so 81 | LoadModule version_module modules/mod_version.so 82 | LoadModule remoteip_module modules/mod_remoteip.so 83 | LoadModule session_module modules/mod_session.so 84 | LoadModule session_cookie_module modules/mod_session_cookie.so 85 | LoadModule session_crypto_module modules/mod_session_crypto.so 86 | LoadModule session_dbd_module modules/mod_session_dbd.so 87 | LoadModule slotmem_shm_module modules/mod_slotmem_shm.so 88 | LoadModule slotmem_plain_module modules/mod_slotmem_plain.so 89 | LoadModule dialup_module modules/mod_dialup.so 90 | # LoadModule http2_module modules/mod_http2.so 91 | LoadModule mpm_event_module modules/mod_mpm_event.so 92 | # LoadModule mpm_prefork_module modules/mod_mpm_prefork.so 93 | # LoadModule mpm_worker_module modules/mod_mpm_worker.so 94 | LoadModule unixd_module modules/mod_unixd.so 95 | LoadModule heartbeat_module modules/mod_heartbeat.so 96 | LoadModule heartmonitor_module modules/mod_heartmonitor.so 97 | LoadModule status_module modules/mod_status.so 98 | LoadModule autoindex_module modules/mod_autoindex.so 99 | LoadModule asis_module modules/mod_asis.so 100 | LoadModule info_module modules/mod_info.so 101 | LoadModule suexec_module modules/mod_suexec.so 102 | 103 | LoadModule cgid_module modules/mod_cgid.so 104 | 105 | 106 | LoadModule cgi_module modules/mod_cgi.so 107 | 108 | LoadModule vhost_alias_module modules/mod_vhost_alias.so 109 | #LoadModule negotiation_module modules/mod_negotiation.so 110 | LoadModule dir_module modules/mod_dir.so 111 | LoadModule actions_module modules/mod_actions.so 112 | LoadModule speling_module modules/mod_speling.so 113 | LoadModule userdir_module modules/mod_userdir.so 114 | LoadModule alias_module modules/mod_alias.so 115 | LoadModule rewrite_module modules/mod_rewrite.so 116 | 117 | LoadModule negotiation_module modules/mod_negotiation.so 118 | 119 | 120 | 121 | User apache 122 | Group www-data 123 | 124 | 125 | 126 | 127 | Options Indexes FollowSymLinks 128 | AllowOverride All 129 | Require all denied 130 | 131 | 132 | DocumentRoot "/var/www" 133 | 134 | Options Indexes FollowSymLinks 135 | AllowOverride All 136 | Require all granted 137 | 138 | 139 | 140 | Options Indexes FollowSymLinks 141 | AllowOverride All 142 | Require all granted 143 | 144 | 145 | 146 | DirectoryIndex index.php index.html 147 | 148 | 149 | 150 | Require all denied 151 | 152 | 153 | 154 | LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined 155 | LogFormat "%h %l %u %t \"%r\" %>s %b" common 156 | 157 | 158 | LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio 159 | 160 | 161 | # CustomLog logs/access.log combined 162 | CustomLog /dev/stdout combined 163 | 164 | 165 | 166 | ScriptAlias /cgi-bin/ "/var/www/localhost/cgi-bin/" 167 | 168 | 169 | 170 | Scriptsock cgisock 171 | 172 | 173 | 174 | AllowOverride None 175 | Options None 176 | Require all granted 177 | 178 | 179 | 180 | RequestHeader unset Proxy early 181 | 182 | 183 | 184 | ProxyPassMatch ^/(fpm-ping|fpm-status) unix:/sock/docker-php.sock|fcgi://php:9000 185 | ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/sock/docker-php.sock|fcgi://php:9000/var/www/ 186 | ProxyTimeout 300 187 | 188 | 189 | 190 | 191 | TypesConfig /etc/apache2/mime.types 192 | AddType application/x-compress .Z 193 | AddType application/x-gzip .gz .tgz 194 | #AddHandler cgi-script .cgi 195 | #AddHandler type-map var 196 | #AddType text/html .shtml 197 | #AddOutputFilter INCLUDES .shtml 198 | 199 | 200 | 201 | MIMEMagicFile /etc/apache2/magic 202 | 203 | 204 | #MaxRanges unlimited 205 | #EnableMMAP off 206 | #EnableSendfile on 207 | 208 | IncludeOptional /etc/apache2/conf.d/*.conf 209 | IncludeOptional /etc/apache2/vhost.conf 210 | -------------------------------------------------------------------------------- /scripts/mysql: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Helper to run mysql dump/restore with DockerComposeDrupal. 4 | # 5 | # Usage: 6 | # mysql dump | restore 7 | # 8 | # Depends on: 9 | # docker 10 | # DockerComposeDrupal 11 | # 12 | # Bash Boilerplate: https://github.com/alphabetum/bash-boilerplate 13 | # Bash Boilerplate: Copyright (c) 2015 William Melody • hi@williammelody.com 14 | 15 | _SOURCE="${BASH_SOURCE[0]}" 16 | while [ -h "$_SOURCE" ]; do 17 | _DIR="$( cd -P "$( dirname "$_SOURCE" )" && pwd )" 18 | _SOURCE="$(readlink "$_SOURCE")" 19 | [[ $_SOURCE != /* ]] && _SOURCE="$_DIR/$_SOURCE" 20 | done 21 | _DIR="$( cd -P "$( dirname "$_SOURCE" )" && pwd )" 22 | 23 | if [ ! -f $_DIR/helpers/common.sh ]; then 24 | printf "[ERROR] Missing helpers/common.sh file.\\n" 25 | exit 1 26 | fi 27 | 28 | source $_DIR/helpers/common.sh 29 | 30 | ############################################################################### 31 | # Help 32 | ############################################################################### 33 | 34 | # _print_help() 35 | # 36 | # Usage: 37 | # _print_help 38 | # 39 | # Print the program help information. 40 | _print_help() { 41 | _help_logo 42 | cat < 87 | # 88 | # If is blank or another option, print an error message and exit 89 | # with status 1. 90 | _require_argument() { 91 | # Set local variables from arguments. 92 | # 93 | # NOTE: 'local' is a non-POSIX bash feature and keeps the variable local to 94 | # the block of code, as defined by curly braces. It's easiest to just think 95 | # of them as local to a function. 96 | local _option="${1:-}" 97 | local _argument="${2:-}" 98 | 99 | if [[ -z "${_argument}" ]] || [[ "${_argument}" =~ ^- ]] 100 | then 101 | _die printf "Option requires a argument: %s\\n" "${_option}" 102 | fi 103 | } 104 | 105 | while [[ ${#} -gt 0 ]] 106 | do 107 | __option="${1:-}" 108 | __maybe_param="${2:-}" 109 | case "${__option}" in 110 | -h|--help) 111 | _PRINT_HELP=1 112 | ;; 113 | -f|--file) 114 | _require_argument "${__option}" "${__maybe_param}" 115 | _DUMP_FILE="${__maybe_param}" 116 | shift 117 | ;; 118 | -d|--database) 119 | _require_argument "${__option}" "${__maybe_param}" 120 | _DB_NAME="${__maybe_param}" 121 | shift 122 | ;; 123 | --endopts) 124 | # Terminate option parsing. 125 | break 126 | ;; 127 | -*) 128 | _die printf "Unexpected option: %s\\n" "${__option}" 129 | ;; 130 | *) 131 | _CMD=${__option} 132 | ;; 133 | esac 134 | shift 135 | done 136 | 137 | ############################################################################### 138 | # Program Functions 139 | ############################################################################### 140 | 141 | _create() { 142 | _mysql_exec 'exec mysql -uroot -p$MYSQL_ROOT_PASSWORD -e "CREATE DATABASE IF NOT EXISTS "'"$_DB_NAME"'" CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"' 143 | 144 | _GRANT="GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON $_DB_NAME.* TO '$MYSQL_USER'@'%';" 145 | echo $_GRANT > /tmp/tmp_grant.sql 146 | $DOCKER cp /tmp/tmp_grant.sql "${PROJECT_CONTAINER_MYSQL}":/tmp/tmp_grant.sql 147 | _mysql_exec 'exec mysql -uroot -p$MYSQL_ROOT_PASSWORD < /tmp/tmp_grant.sql' 148 | rm -f /tmp/tmp_grant.sql 149 | } 150 | 151 | _drop_native() { 152 | _mysql_exec 'exec mysql -uroot -p$MYSQL_ROOT_PASSWORD -e "DROP DATABASE IF EXISTS "'"$_DB_NAME"'' 153 | } 154 | 155 | _drop() { 156 | if ! [ -f ${STACK_DRUPAL_ROOT}/vendor/drush/drush/drush ]; then 157 | _drop_native 158 | else 159 | _docker_exec_noi \ 160 | "${DRUSH_BIN}" --root "${DRUPAL_DOCROOT}" -y sql-drop 161 | fi 162 | } 163 | 164 | _dump() { 165 | _set_dump_file 166 | if ! [ -f "${STACK_DRUPAL_ROOT}/vendor/drush/drush/drush" ]; then 167 | printf "Drush not found, fallback to mysql dump" 168 | _dump_native 169 | else 170 | _docker_exec_noi \ 171 | "${DRUSH_BIN}" --root "${DRUPAL_DOCROOT}" sql-dump \ 172 | --structure-tables-list=cache*,history,node_counter,search_*,sessions,watchdog \ 173 | --result-file="/dump/${_DUMP_FILE}" 174 | fi 175 | } 176 | 177 | _dump_native() { 178 | _set_dump_file 179 | _mysql_exec 'exec mysqldump -u$MYSQL_USER -p$MYSQL_PASSWORD "'"$_DB_NAME"'" > /dump/'"$_DUMP_FILE"'' 180 | printf "Database dump saved to %s\\n" ${DUMP_FOLDER}/${_DUMP_FILE} 181 | } 182 | 183 | _restore() { 184 | _set_dump_file 185 | 186 | if [ -z "$_DUMP_FILE" ]; then 187 | _select_dump 188 | fi 189 | if ! [ -f "${DUMP_FOLDER}/${_DUMP_FILE}" ]; then 190 | printf "File not found: %s\\n" "${DUMP_FOLDER}/${_DUMP_FILE}" 191 | _select_dump 192 | fi 193 | 194 | printf "Restoring %s...\\n" $_DUMP_FILE 195 | _drop_native 196 | _create 197 | _mysql_exec 'exec mysql -u$MYSQL_USER -p$MYSQL_PASSWORD "'"$_DB_NAME"'" < /dump/'"$_DUMP_FILE"'' 198 | 199 | printf "... Done!\n" 200 | } 201 | 202 | _import() { 203 | _restore 204 | } 205 | 206 | _list() { 207 | printf "Available dump files:\\n" 208 | __list=$(ls -lAh "${DUMP_FOLDER}") 209 | printf "%s\\n" "$__list" 210 | } 211 | 212 | _select_dump() { 213 | 214 | _DUMPS=$(ls "${DUMP_FOLDER}") 215 | _DUMPS=(`echo $_DUMPS | sed 's/ /\n/g'`) 216 | 217 | printf "Select a dump file:\\n" 218 | select opt in "Cancel" "${_DUMPS[@]}"; do 219 | case $opt in 220 | *.sql) 221 | _DUMP_FILE=$opt 222 | break 223 | ;; 224 | "Cancel") 225 | die "You chose to cancel" 226 | _DUMP_FILE="" 227 | break 228 | ;; 229 | *) 230 | echo "This is not a number or wrong selection/file format" 231 | ;; 232 | esac 233 | done 234 | } 235 | 236 | _mysql_exec() { 237 | $DOCKER exec \ 238 | "${PROJECT_CONTAINER_MYSQL}" \ 239 | sh -c $@ 240 | } 241 | 242 | _ensure_dump_dir() { 243 | if [[ ! -d ${DUMP_FOLDER} ]] 244 | then 245 | mkdir -p ${DUMP_FOLDER} 246 | fi 247 | _mysql_exec 'mkdir -p "'"$DUMP_FOLDER_IMAGE"'"' 248 | _mysql_exec 'chown -R mysql:mysql "'"$DUMP_FOLDER_IMAGE"'"' 249 | _mysql_exec 'chmod -R 777 "'"$DUMP_FOLDER_IMAGE"'"' 250 | } 251 | 252 | _set_dump_file() { 253 | if [ -z ${_DUMP_FILE} ]; then 254 | _DUMP_FILE=dump_${NOW}.sql 255 | fi 256 | } 257 | 258 | _test_native() { 259 | _DUMP_FILE=dump_test_no_drush.sql 260 | _dump 261 | if [ -f ${DUMP_FOLDER}/${_DUMP_FILE} ]; then 262 | echo "... Dump success!" 263 | fi 264 | _restore 265 | _list 266 | } 267 | 268 | _test_drush() { 269 | if ! [ -f ${STACK_DRUPAL_ROOT}/vendor/drush/drush/drush ]; then 270 | echo "[Warning] Could not find Drush, tests skipped, did you install Drupal 8 with Drush?" 271 | fi 272 | _DUMP_FILE=dump_test_drush.sql 273 | _dump 274 | _restore 275 | _list 276 | _drop 277 | } 278 | 279 | _test() { 280 | _test_native 281 | _test_drush 282 | } 283 | 284 | ############################################################################### 285 | # Main 286 | ############################################################################### 287 | 288 | # _main() 289 | # 290 | # Usage: 291 | # _main [] [] 292 | # 293 | # Description: 294 | # Entry point for the program, handling basic option parsing and dispatching. 295 | _main() { 296 | 297 | if ((_PRINT_HELP)) 298 | then 299 | _print_help 300 | else 301 | 302 | _set_container_mysql 303 | _ensure_dump_dir 304 | 305 | # Run command if exist. 306 | __call="_${_CMD}" 307 | if [ "$(type -t "${__call}")" == 'function' ]; then 308 | $__call 309 | else 310 | printf "Unknown command: %s" "${_CMD}" 311 | fi 312 | 313 | fi 314 | 315 | } 316 | 317 | # Call `_main` after everything has been defined. 318 | _main "$@" 319 | -------------------------------------------------------------------------------- /scripts/helpers/common.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Helper to have common bash settings for most of the scripts. 3 | # Based on Bash simple Boilerplate. 4 | # https://github.com/Mogtofu33/docker-compose-drupal 5 | # 6 | # Bash Boilerplate: https://github.com/alphabetum/bash-boilerplate 7 | # Bash Boilerplate: Copyright (c) 2015 William Melody • hi@williammelody.com 8 | 9 | set -o nounset 10 | set -o errexit 11 | trap 'echo "Aborting due to errexit on line $LINENO. Exit code: $?" >&2' ERR 12 | set -o errtrace 13 | set -o pipefail 14 | IFS=$'\n\t' 15 | 16 | ############################################################################### 17 | # Environment 18 | ############################################################################### 19 | 20 | # $_ME 21 | # 22 | # Set to the program's basename. 23 | _ME=$(basename "${0}") 24 | 25 | # $_SOURCE 26 | # 27 | # Set to the program's source. 28 | _SOURCE="${BASH_SOURCE[0]}" 29 | 30 | while [ -h "$_SOURCE" ]; do 31 | _DIR="$( cd -P "$( dirname "$_SOURCE" )" && pwd )" 32 | _SOURCE="$(readlink "$_SOURCE")" 33 | [[ $_SOURCE != /* ]] && _SOURCE="$_DIR/$_SOURCE" 34 | done 35 | _DIR="$( cd -P "$( dirname "$_SOURCE" )" && pwd )" 36 | 37 | # Use on a lot of scripts. 38 | STACK_ROOT=${_DIR%"/scripts/helpers"} 39 | _USE_DEBUG=0 40 | 41 | ############################################################################### 42 | # Debug 43 | ############################################################################### 44 | 45 | # _debug() 46 | # 47 | # Usage: 48 | # _debug printf "Debug info. Variable: %s\\n" "$0" 49 | # 50 | # A simple function for executing a specified command if the `$_USE_DEBUG` 51 | # variable has been set. The command is expected to print a message and 52 | # should typically be either `echo`, `printf`, or `cat`. 53 | __DEBUG_COUNTER=0 54 | _debug() { 55 | if [[ "${_USE_DEBUG:-"0"}" -eq 1 ]] 56 | then 57 | __DEBUG_COUNTER=$((__DEBUG_COUNTER+1)) 58 | # Prefix debug message with "bug (U+1F41B)" 59 | printf "🐛 %s " "${__DEBUG_COUNTER}" 60 | "${@}" 61 | printf "――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\\n" 62 | fi 63 | } 64 | # debug() 65 | # 66 | # Usage: 67 | # debug "Debug info. Variable: $0" 68 | # 69 | # Print the specified message if the `$_USE_DEBUG` variable has been set. 70 | # 71 | # This is a shortcut for the _debug() function that simply echos the message. 72 | debug() { 73 | _debug echo "${@}" 74 | } 75 | 76 | ############################################################################### 77 | # Die 78 | ############################################################################### 79 | 80 | # _die() 81 | # 82 | # Usage: 83 | # _die printf "Error message. Variable: %s\n" "$0" 84 | # 85 | # A simple function for exiting with an error after executing the specified 86 | # command. The command is expected to print a message and should typically 87 | # be either `echo`, `printf`, or `cat`. 88 | _die() { 89 | # Prefix die message with "cross mark (U+274C)", often displayed as a red x. 90 | printf "❌ " 91 | "${@}" 1>&2 92 | exit 1 93 | } 94 | # die() 95 | # 96 | # Usage: 97 | # die "Error message. Variable: $0" 98 | # 99 | # Exit with an error and print the specified message. 100 | # 101 | # This is a shortcut for the _die() function that simply echos the message. 102 | die() { 103 | _die echo "${@}" 104 | } 105 | 106 | ############################################################################### 107 | # Variables 108 | ############################################################################### 109 | 110 | # Get Stack values if any. 111 | if [ -f $STACK_ROOT/.env ]; then 112 | source $STACK_ROOT/.env 113 | fi 114 | 115 | if [ -f $STACK_ROOT/.env.local ]; then 116 | source $STACK_ROOT/.env.local 117 | fi 118 | 119 | # Get scripts values. 120 | if [ -f $_DIR/../.env ]; then 121 | source $_DIR/../.env 122 | fi 123 | 124 | STACK_DRUPAL_ROOT=${STACK_ROOT}/${HOST_WEB_ROOT#'./'} 125 | 126 | # Basic variables. 127 | NOW="$(date +'%Y%m%d.%H-%M-%S')" 128 | tty= 129 | tty -s && tty=--tty 130 | 131 | if ! [ -x "$(command -v docker)" ]; then 132 | printf "[notice] docker not found and is probably required for this script.\\n" 133 | DOCKER="" 134 | else 135 | DOCKER=$(which docker) 136 | fi 137 | 138 | if ! [ -x "$(command -v docker-compose)" ]; then 139 | printf "[notice] docker-compose not found and is probably required for this script.\\n" 140 | DOCKER_COMPOSE="" 141 | else 142 | DOCKER_COMPOSE=$(which docker-compose) 143 | fi 144 | 145 | PROJECT_CONTAINER_PHP="${PROJECT_NAME}-php" 146 | 147 | ############################################################################### 148 | # Common Program Functions 149 | ############################################################################### 150 | 151 | # Helpers to run docker exec commands on Php container. 152 | _docker_exec() { 153 | $DOCKER exec \ 154 | $tty \ 155 | --interactive \ 156 | --user ${LOCAL_UID} \ 157 | ${PROJECT_CONTAINER_PHP} "$@" 158 | } 159 | 160 | _docker_exec_noi() { 161 | $DOCKER exec \ 162 | $tty \ 163 | --user ${LOCAL_UID} \ 164 | ${PROJECT_CONTAINER_PHP} "$@" 165 | } 166 | 167 | _docker_exec_root() { 168 | $DOCKER exec \ 169 | ${PROJECT_CONTAINER_PHP} "$@" 170 | } 171 | 172 | # Helper to ensure mysql container is runing. 173 | _set_container_mysql() { 174 | RUNNING=$(docker ps -f "name=mariadb" -f "name=mysql" -f "status=running" -q | head -1 2> /dev/null) 175 | if [ -z "$RUNNING" ]; then 176 | die "No running MySQL container found, did you run docker-compose up -d ?" 177 | else 178 | PROJECT_CONTAINER_MYSQL=$(docker inspect --format="{{ .Name }}" $RUNNING) 179 | PROJECT_CONTAINER_MYSQL="${PROJECT_CONTAINER_MYSQL///}" 180 | fi 181 | } 182 | 183 | # Helper to ensure postgres container is runing. 184 | _set_container_pgsql() { 185 | RUNNING=$(docker ps -f "name=pgsql" -f "status=running" -q | head -1 2> /dev/null) 186 | if [ -z "$RUNNING" ]; then 187 | die "No running PGSQL container found, did you run docker-compose up -d ?" 188 | else 189 | PROJECT_CONTAINER_PGSQL=$(docker inspect --format="{{ .Name }}" $RUNNING) 190 | PROJECT_CONTAINER_PGSQL="${PROJECT_CONTAINER_PGSQL///}" 191 | fi 192 | } 193 | 194 | # _stack_down() 195 | # 196 | # Description: 197 | # Run docker-compose down. 198 | _stack_down() { 199 | log_info "Stop stack..." 200 | $DOCKER_COMPOSE --file "${STACK_ROOT}/docker-compose.yml" down 201 | } 202 | 203 | # _stack_up() 204 | # 205 | # Description: 206 | # Run docker-compose up with build. 207 | _stack_up() { 208 | log_info "Launch stack..." 209 | $DOCKER_COMPOSE --file "${STACK_ROOT}/docker-compose.yml" up -d --build 210 | # Wait to be sure DB is up. 211 | sleep 5s 212 | } 213 | 214 | ############################################################################### 215 | # Utility Functions 216 | ############################################################################### 217 | 218 | # A logo, because it's cool. 219 | _help_logo() { 220 | cat <&2 echo -e "${timestamp} ${3}[${level}]\e[0m ${message}" 238 | } 239 | 240 | # Log the given message at INFO level. All logs are written to stderr with a timestamp. 241 | function log_info { 242 | local -r message="$1" 243 | _log "INFO" "$message" '\e[0;34m' 244 | } 245 | 246 | # Log the given message at WARN level. All logs are written to stderr with a timestamp. 247 | function log_warn { 248 | local -r message="$1" 249 | _log "WARN" "$message" '\e[0;33m' 250 | } 251 | 252 | # Log the given message at ERROR level. All logs are written to stderr with a timestamp. 253 | function log_error { 254 | local -r message="$1" 255 | _log "ERROR" "$message" '\e[0;31m' 256 | } 257 | 258 | function log_success { 259 | local -r message="$1" 260 | _log "SUCCESS" "$message" '\e[0;32m' 261 | } 262 | 263 | ############################################################################### 264 | # _prompt_yn() 265 | # 266 | # Description: 267 | # Display a simple yes/no prompt and stop if no. 268 | _prompt_yn() { 269 | printf "%s\\n" "$@" 270 | read -p "Are you sure? (y/n) " -n 1 -r 271 | echo 272 | if [[ ! $REPLY =~ ^[Yy]$ ]] 273 | then 274 | die "Canceled" 275 | fi 276 | } 277 | 278 | ############################################################################### 279 | # _spinner() 280 | # 281 | # Usage: 282 | # _spinner 283 | # 284 | # Description: 285 | # Display an ascii spinner while is running. 286 | # 287 | # Example Usage: 288 | # ``` 289 | # _spinner_example() { 290 | # printf "Working..." 291 | # (sleep 1) & 292 | # _spinner $! 293 | # printf "Done!\n" 294 | # } 295 | # (_spinner_example) 296 | # ``` 297 | # 298 | # More Information: 299 | # http://fitnr.com/showing-a-bash-spinner.html 300 | _spinner() { 301 | local _pid="${1:-}" 302 | local _delay=0.75 303 | local _spin_string="|/-\\" 304 | 305 | if [[ -z "${_pid}" ]] 306 | then 307 | printf "Usage: _spinner \\n" 308 | return 1 309 | fi 310 | 311 | while ps a | awk '{print $1}' | grep -q "${_pid}" 312 | do 313 | local _temp="${_spin_string#?}" 314 | printf " [%c] " "${_spin_string}" 315 | _spin_string="${_temp}${_spin_string%${_temp}}" 316 | sleep ${_delay} 317 | printf "\\b\\b\\b\\b\\b\\b" 318 | done 319 | printf " \\b\\b\\b\\b" 320 | } 321 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Drupal 8 Docker Compose Development 2 | 3 | [![pipeline status](https://gitlab.com/mog33/docker-compose-drupal/badges/master/pipeline.svg)](https://gitlab.com/mog33/docker-compose-drupal/commits/master) 4 | 5 | - [Requirements](#requirements) 6 | - [Description](#description) 7 | - [What's this?](#whats-this) 8 | - [Services included](#services-included) 9 | - [Database management](#database-management) 10 | - [Quick demo (Ubuntu)](#quick-demo-ubuntu) 11 | - [Installation and configuration](#installation-and-configuration) 12 | - [Project installation](#project-installation) 13 | - [Option 1: existing Drupal 8 project](#option-1-existing-drupal-8-project) 14 | - [Copy codebase](#copy-codebase) 15 | - [Import database](#import-database) 16 | - [Launch the stack](#launch-the-stack) 17 | - [Access the minimal dashboard](#access-the-minimal-dashboard) 18 | - [Option 2: setup Vanilla Drupal 8 with Composer](#option-2-setup-vanilla-drupal-8-with-composer) 19 | - [Code download](#code-download) 20 | - [Launch the stack](#launch-the-stack-1) 21 | - [Install Drupal 8](#install-drupal-8) 22 | - [Access your Drupal 8](#access-your-drupal-8) 23 | - [Daily usage](#daily-usage) 24 | - [Add some modules](#add-some-modules) 25 | - [Enable some modules](#enable-some-modules) 26 | - [Run a command on the server](#run-a-command-on-the-server) 27 | - [Access the server with bash](#access-the-server-with-bash) 28 | - [Reset the stack](#reset-the-stack) 29 | - [Destroy containers](#destroy-containers) 30 | - [Remove your persistent data (and lost everything!)](#remove-your-persistent-data-and-lost-everything) 31 | - [Linux helpers](#linux-helpers) 32 | - [Upgrade](#upgrade) 33 | - [Suggested tools](#suggested-tools) 34 | - [Troubleshooting](#troubleshooting) 35 | - [General problem](#general-problem) 36 | - [Port 80](#port-80) 37 | - [Windows](#windows) 38 | 39 | **Full** Linux support. Tested daily on Ubuntu 16+. 40 | 41 | **Windows** support is **very, very limited** due to Docker for [Windows permissions problems](https://github.com/docker/for-win/issues/1829) and no privileged support :( 42 | 43 | **Mac** support is **very limited** due to the fact that I don't have a Mac! 44 | 45 | ## Requirements 46 | 47 | - [Docker engine 19+](https://docs.docker.com/install) 48 | - [Docker compose 1.26+](https://docs.docker.com/compose/install) 49 | 50 | **Recommended** 51 | 52 | - [Composer](https://getcomposer.org) 53 | 54 | ## Description 55 | 56 | ### What's this? 57 | 58 | Based mostly on [Docker official images](https://hub.docker.com/search/?type=image&image_filter=official) and lightweight [Alpine Linux](https://alpinelinux.org/) to ease maintenance and size. 59 | 60 | This stack is meant to be used as a single [Drupal 8](https://www.drupal.org/8) project only with quick setup, run and destroy workflow. 61 | 62 | The purpose is to give flexibility in management, try to rely as much as possible on official tools to avoid any new custom patterns. 63 | 64 | This stack is not a one line command but more for users with a good dev-op level and knowledge on each technology used. 65 | 66 | See other great project for a Docker based development 67 | 68 | - [Lando](https://docs.devwithlando.io/tutorials/drupal8.html) 69 | - [Docksal](https://docksal.io/) 70 | - [ddev](https://github.com/drud/ddev) 71 | - [docker4drupal](https://github.com/wodby/docker4drupal) 72 | 73 | ### Services included 74 | 75 | _Every service is optional as declared in the yml file._ 76 | 77 | - Apache 78 | - Nginx 79 | - Php 7.3 / 7.4 fpm with Xdebug 80 | - MariaDB 81 | - PostgreSQL 82 | - [Memcache](https://hub.docker.com/_/memcached) 83 | - [Redis](https://redis.io/) 84 | - [Mailhog](https://github.com/mailhog/MailHog) 85 | - [Solr](http://lucene.apache.org/solr) 86 | - [Dashboard](https://cloud.docker.com/u/mogtofu33/repository/docker/mogtofu33/dashboard): a very minimal docker dashboard for this stack 87 | - [Portainer](https://github.com/portainer/portainer): (Optional) a full Docker dashboard / manager 88 | 89 | #### Database management 90 | 91 | - [Adminer](https://www.adminer.org) 92 | 93 | ## Quick demo (Ubuntu) 94 | 95 | Get this project 96 | 97 | ```bash 98 | wget https://gitlab.com/mog33/docker-compose-drupal/-/archive/master/docker-compose-drupal-master.tar.gz 99 | tar -xzf docker-compose-drupal-master.tar.gz 100 | cd docker-compose-drupal-master 101 | ``` 102 | 103 | Install this stack with minimal services, download and install Drupal 8 with 104 | profile [Demo Umami](https://www.drupal.org/project/demo_umami) 105 | 106 | ```bash 107 | make demo 108 | ``` 109 | 110 | ## Installation and configuration 111 | 112 | ### Project installation 113 | 114 | Grab this project 115 | 116 | ```bash 117 | wget https://gitlab.com/mog33/docker-compose-drupal/-/archive/master/docker-compose-drupal-master.tar.gz 118 | tar -xzf docker-compose-drupal-master.tar.gz 119 | cd docker-compose-drupal-master 120 | ``` 121 | 122 | Create your docker compose file from template 123 | 124 | ```bash 125 | cp docker-compose.tpl.yml docker-compose.yml 126 | cp default.env .env 127 | ``` 128 | 129 | _Optional:_ Edit configuration 130 | 131 | Recommended on Unix add your local uid/gid. 132 | 133 | ```bash 134 | vi .env 135 | ``` 136 | 137 | _Optional:_ Customize the stack 138 | 139 | Choose a database, remove or add services, add your composer cache folder if needed on service `php`. 140 | Do not touch for a default quick stack. 141 | 142 | ```bash 143 | vi docker-compose.yml 144 | ``` 145 | 146 | Check the yml file and fix if there is an error message 147 | 148 | ```bash 149 | docker-compose config 150 | ``` 151 | 152 | ### Option 1: existing Drupal 8 project 153 | 154 | #### Copy codebase 155 | 156 | For an existing Drupal 8 project, copy it here in a folder named `drupal`. 157 | 158 | So you have your composer.json file in `drupal\composer.json` 159 | 160 | Note that based on Composer template web root must be under `drupal/web` 161 | folder. If not you need to adapt Apache vhost config from 162 | `config/apache/vhost.conf` 163 | 164 | ```bash 165 | cp -r _YOUR_DRUPAL_ drupal 166 | ``` 167 | 168 | #### Import database 169 | 170 | For **MySQL**, copy your database dump **uncompressed** in `./database/mysql-init/*.sql`, it 171 | will be automatically imported on the first launch of the stack. 172 | 173 | For **PostgresSQL**, copy your database dump **uncompressed** in `./database/pgsql-init/*.pg_dump`, it 174 | will be automatically imported on the first launch of the stack. 175 | 176 | If you want to manually import your database with adminer or included helper scripts 177 | with _Linux_you can skip this step. 178 | 179 | #### Launch the stack 180 | 181 | ```bash 182 | docker-compose up --build -d 183 | ``` 184 | 185 | Wait and check the import of your database dump with (change mysql to pgsql if needed) 186 | 187 | ```bash 188 | docker-compose logs mysql 189 | ``` 190 | 191 | #### Access the minimal dashboard 192 | 193 | - [http://localhost:8181](http://localhost:8181) 194 | 195 | ### Option 2: setup Vanilla Drupal 8 with Composer 196 | 197 | #### Code download 198 | 199 | Setup a new Drupal 8 based on a Composer project. 200 | 201 | Based on [Drupal 8 template](https://github.com/drupal-composer/drupal-project), include [Drush](http://www.drush.org) and [Drupal console](https://drupalconsole.com/), using [Composer](https://getcomposer.org) locally: 202 | 203 | ```bash 204 | composer create-project drupal-composer/drupal-project:8.x-dev drupal --stability dev --no-interaction 205 | ``` 206 | 207 | #### Launch the stack 208 | 209 | ```bash 210 | docker-compose up --build -d 211 | ``` 212 | 213 | #### Install Drupal 8 214 | 215 | To use **PostGreSQL** change **mysql** to **pgsql** 216 | 217 | You can replace **standard** by an other profile as **minimal** or **demo_umami** for [Drupal 8.6+](https://www.drupal.org/project/demo_umami). 218 | 219 | ```bash 220 | docker exec -it -u apache dcd-php /var/www/localhost/vendor/bin/drush -y site:install standard \ 221 | --root=/var/www/localhost/web \ 222 | --account-name=admin \ 223 | --account-pass=password \ 224 | --db-url=mysql://drupal:drupal@mysql/drupal 225 | #--db-url=pgsql://drupal:drupal@pgsql/drupal 226 | ``` 227 | 228 | #### Access your Drupal 8 229 | 230 | - [http://localhost](http://localhost) 231 | 232 | Login with _admin_ / _password_: 233 | 234 | - [http://localhost/user/login](http://localhost/user/login) 235 | 236 | ## Daily usage 237 | 238 | ### Add some modules 239 | 240 | ```bash 241 | docker exec -it -u apache dcd-php \ 242 | composer --working-dir=/var/www/localhost require \ 243 | drupal/admin_toolbar drupal/ctools drupal/pathauto drupal/token drupal/panels 244 | ``` 245 | 246 | With _Linux_, you can use included helper script 247 | 248 | ```bash 249 | scripts/composer require drupal/admin_toolbar drupal/ctools drupal/pathauto drupal/token drupal/panels 250 | ``` 251 | 252 | ### Enable some modules 253 | 254 | ```bash 255 | docker exec -it -u apache dcd-php \ 256 | /var/www/localhost/vendor/bin/drush -y en \ 257 | --root=/var/www/localhost/web \ 258 | admin_toolbar ctools ctools_block ctools_views panels token pathauto 259 | ``` 260 | 261 | With _Linux_, you can use included helper script 262 | 263 | ```bash 264 | scripts/drush -y en admin_toolbar ctools ctools_block ctools_views panels token pathauto 265 | ``` 266 | 267 | ### Run a command on the server 268 | 269 | ```bash 270 | docker exec -it -u apache dcd-php \ 271 | ls -lah /var/www/localhost/web 272 | ``` 273 | 274 | ### Access the server with bash 275 | 276 | ```bash 277 | docker exec -it -w /var/www/localhost -u apache dcd-php bash 278 | ``` 279 | 280 | ## Reset the stack 281 | 282 | ### Destroy containers 283 | 284 | _Note:_ `./drupal/` is persistent but NOT the database files! 285 | 286 | Save your database under _Linux_ 287 | 288 | ```bash 289 | scripts/mysql dump 290 | scripts/pgsql dump 291 | ``` 292 | 293 | Stop and remove containers 294 | 295 | ```bash 296 | docker-compose down 297 | ``` 298 | 299 | ### Remove your persistent data (and lost everything!) 300 | 301 | ```bash 302 | rm -rf data 303 | ``` 304 | 305 | ## Linux helpers 306 | 307 | For Ubuntu (16+) or Linux you can find in `./scripts/` multiple helpers to quickly 308 | run some daily commands from root folder, and drush/drupal links at the root. 309 | 310 | ```bash 311 | # Run drush or drupal within the container 312 | scripts/drush status 313 | scripts/drupal site:status 314 | # Quickly dump/restore/drop your DB 315 | scripts/mysql --help 316 | scripts/pgsql --help 317 | # Run composer as a service without local installation 318 | scripts/composer --help 319 | scripts/composer status 320 | ``` 321 | 322 | Install Drupal 8 variant helpers (This delete and replace existing Drupal in `./drupal` folder) 323 | 324 | ```bash 325 | scripts/install-drupal.sh 326 | scripts/install-drupal.sh list 327 | scripts/install-drupal.sh install -p drupal-demo 328 | ``` 329 | 330 | ## Upgrade 331 | 332 | Because this project is mainly focused on a one time usage, there is currently 333 | **no upgrade path** and the best way to upgrade is to dump and copy your project to 334 | a new version of this project. 335 | 336 | ## Suggested tools 337 | 338 | - [Opcache GUI](https://github.com/amnuts/opcache-gui) 339 | - [Phpmemcacheadmin](https://github.com/wp-cloud/phpmemcacheadmin) 340 | - [Xdebug GUI](https://github.com/splitbrain/xdebug-trace-tree) 341 | - [Adminer extended](https://github.com/dg/adminer-custom) 342 | - [Php Redis Admin](https://github.com/ErikDubbelboer/phpRedisAdmin) 343 | 344 | You can find a script for Linux in `scripts/get-tools.sh` folder to download or update all tools 345 | 346 | ```bash 347 | chmod +x scripts/get-tools.sh 348 | ./scripts/get-tools.sh install 349 | ``` 350 | 351 | ## Troubleshooting 352 | 353 | ### General problem 354 | 355 | In case of any problem, first step is to check the configuration and the logs 356 | 357 | ```bash 358 | docker-compose config 359 | docker-compose logs 360 | ``` 361 | 362 | ### Port 80 363 | 364 | If you have already a web server running on port __80__ or __443__ on your machine 365 | you must stop it or change __APACHE_HOST_HTTP_PORT__ in __.env__ 366 | 367 | ### Windows 368 | 369 | Windows support very partial, before running docker-compose you must run in Powershell 370 | 371 | ```powershell 372 | $Env:COMPOSE_CONVERT_WINDOWS_PATHS=1 373 | ``` 374 | 375 | Some permissions and privileged problems 376 | 377 | - [This issue](https://github.com/docker/for-win/issues/1829) 378 | 379 | ---- 380 | Want some help implementing this on your project? I provide Drupal 8 expertise as a freelance, just [contact me](https://developpeur-drupal.com/en). 381 | -------------------------------------------------------------------------------- /tools/phpinfo.php: -------------------------------------------------------------------------------- 1 | 6 | * @copyright (c)2009,2013,2015 Constantin Loskutov, www.syncap.ru 7 | * 8 | */ 9 | 10 | define('PPI_VERSION', '2016-35'); 11 | define('PPI_GITHUB_SOURCE_PATH', 'https://raw.githubusercontent.com/SynCap/PHP-Info/master/info.php'); 12 | 13 | if (isset($_GET['format']) && $_GET['format'] == 'json') { 14 | header('Content-type: application/json'); 15 | echo json_encode(['version' => PHP_VERSION] + ini_get_all(NULL, FALSE)); 16 | die(); 17 | } 18 | 19 | /* 20 | 21 | Very old school mini router for some additional commands 22 | 23 | native - launch native phpinfo($mode) with `mode` as another GET param 24 | update - get fresh version from GitHub and launch it 25 | 26 | */ 27 | if (isset($_GET['do'])) { 28 | 29 | switch ($_GET['do']) { 30 | case 'native': 31 | /* 32 | If we need, we can call native phpinfo(). In this case we don't need any other porcessings. 33 | Just do it, then die. ;) 34 | 35 | INFO_GENERAL 1 36 | INFO_CREDITS 2 37 | INFO_CONFIGURATION 4 38 | INFO_MODULES 8 39 | INFO_ENVIRONMENT 16 40 | INFO_VARIABLES 32 41 | INFO_LICENSE 64 42 | INFO_ALL -1 43 | 44 | if requested mode is NOT integer in range of INFO_GENERAL..INFO_LICENSE, 45 | for example some textual or non-legal integer, we assume default value INFO_ALL 46 | */ 47 | $mode = 0+$_GET['mode'] & 64 > 0 48 | ?$_GET['mode'] 49 | : -1 ; 50 | phpinfo($mode); 51 | die(); 52 | break; 53 | 54 | case 'update': 55 | $remoteSource = @file_get_contents(PPI_GITHUB_SOURCE_PATH); 56 | if ( 57 | ($remoteSource !== FALSE) 58 | && 59 | (file_put_contents(__FILE__, $remoteSource ) !== FALSE) 60 | ) { 61 | header('Location: '.$_SERVER["SCRIPT_NAME"]); 62 | exit('Starting with updated version'); 63 | } 64 | ; 65 | break; 66 | } 67 | 68 | } 69 | 70 | class prettyPhpInfo 71 | { 72 | public $nav = ""; 73 | public $content = ""; 74 | public $info_arr = array(); 75 | 76 | const FILTER_FORM = <<<'FLTF' 77 |
78 | 79 | 80 |
81 | FLTF; 82 | 83 | /** 84 | * Grep the all info from built-in PHP function 85 | */ 86 | protected function phpinfo_array() { 87 | ob_start(); 88 | phpinfo(INFO_GENERAL); 89 | phpinfo(INFO_CONFIGURATION); 90 | phpinfo(INFO_ENVIRONMENT); 91 | phpinfo(INFO_VARIABLES); 92 | phpinfo(INFO_MODULES); 93 | $info_lines = explode("\n", strip_tags(ob_get_clean(), "

")); 94 | $cat = "General"; 95 | foreach($info_lines as $line) { 96 | // new cat? 97 | preg_match("~

(.*)

~", $line, $title) ? $cat = $title[1] : null; 98 | if 99 | ( 100 | preg_match("~]+>([^<]*)]+>([^<]*)~", $line, $val) 101 | OR 102 | preg_match("~]+>([^<]*)]+>([^<]*)]+>([^<]*)~", $line, $val) 103 | ) 104 | $info_arr[$cat][$val[1]] = str_replace(';','; ', $val[2]);// 2016: the same made in JS, but better: on non Windows servers replaced `:` but not `;` 105 | } 106 | return $info_arr; 107 | } 108 | 109 | function __construct() { 110 | $this->info_arr = $this->phpinfo_array(); 111 | foreach( $this->info_arr as $cat=>$vals ) { 112 | $catID = str_replace(' ', '_', $cat); 113 | // add navigation pane item 114 | $this->nav .= "
  • $cat
  • "; 115 | // add a section to main page 116 | // Q: Why not use original tables? 117 | // A: Because we need an our own structure, IDs and classes. 118 | // We need an ability to show exact section on startup, we need a headers separated from tables, and so on... 119 | $this->content .= "
    \n

    $cat #

    \n\n\n"; 120 | foreach($vals as $key=>$val) { 121 | $this->content .= "\n"; 122 | } 123 | $this->content .= "\n
    $key$val
    \n
    \n"; 124 | } 125 | $this->nav = "
    \n".$this::FILTER_FORM."\n
      \n$this->nav\n
    \n"; 126 | return $this; 127 | } 128 | } 129 | 130 | $phpinfo = new prettyPhpInfo(); 131 | ?> 132 | 133 | 134 | 135 | 136 | PHP info :: <?php echo $_SERVER['HTTP_HOST'].' – '.PHP_VERSION ?> 137 | 138 | 139 | 140 | 141 | 142 | 146 |
    147 |

    v.

    148 |
      149 |
    • Colors
    • 150 |
    • 151 |
      152 | 153 | 170 | 171 |
      172 |
    • 173 |
    • v.
    • 174 |
    175 |
    176 |
    177 | content ?> 178 |
    179 | 180 | 181 | 185 | 186 | -------------------------------------------------------------------------------- /config/php/7.3/php-fpm.d/www.conf: -------------------------------------------------------------------------------- 1 | ; Start a new pool named 'www'. 2 | ; the variable $pool can be used in any directive and will be replaced by the 3 | ; pool name ('www' here) 4 | [www] 5 | 6 | ; Per pool prefix 7 | ; It only applies on the following directives: 8 | ; - 'access.log' 9 | ; - 'slowlog' 10 | ; - 'listen' (unixsocket) 11 | ; - 'chroot' 12 | ; - 'chdir' 13 | ; - 'php_values' 14 | ; - 'php_admin_values' 15 | ; When not set, the global prefix (or /usr) applies instead. 16 | ; Note: This directive can also be relative to the global prefix. 17 | ; Default Value: none 18 | ;prefix = /path/to/pools/$pool 19 | 20 | ; Unix user/group of processes 21 | ; Note: The user is mandatory. If the group is not set, the default user's group 22 | ; will be used. 23 | user = apache 24 | group = www-data 25 | 26 | ; The address on which to accept FastCGI requests. 27 | ; Valid syntaxes are: 28 | ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on 29 | ; a specific port; 30 | ; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on 31 | ; a specific port; 32 | ; 'port' - to listen on a TCP socket to all addresses 33 | ; (IPv6 and IPv4-mapped) on a specific port; 34 | ; '/path/to/unix/socket' - to listen on a unix socket. 35 | ; Note: This value is mandatory. 36 | ;listen = 127.0.0.1:9000 37 | listen = /sock/docker-php.sock 38 | 39 | ; Set listen(2) backlog. 40 | ; Default Value: 511 (-1 on FreeBSD and OpenBSD) 41 | ;listen.backlog = 511 42 | 43 | ; Set permissions for unix socket, if one is used. In Linux, read/write 44 | ; permissions must be set in order to allow connections from a web server. Many 45 | ; BSD-derived systems allow connections regardless of permissions. 46 | ; Default Values: user and group are set as the running user 47 | ; mode is set to 0660 48 | listen.owner = apache 49 | listen.group = www-data 50 | listen.mode = 0777 51 | ; When POSIX Access Control Lists are supported you can set them using 52 | ; these options, value is a comma separated list of user/group names. 53 | ; When set, listen.owner and listen.group are ignored 54 | ;listen.acl_users = 55 | ;listen.acl_groups = 56 | 57 | ; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect. 58 | ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original 59 | ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address 60 | ; must be separated by a comma. If this value is left blank, connections will be 61 | ; accepted from any ip address. 62 | ; Default Value: any 63 | ;listen.allowed_clients = 127.0.0.1 64 | 65 | ; Specify the nice(2) priority to apply to the pool processes (only if set) 66 | ; The value can vary from -19 (highest priority) to 20 (lower priority) 67 | ; Note: - It will only work if the FPM master process is launched as root 68 | ; - The pool processes will inherit the master process priority 69 | ; unless it specified otherwise 70 | ; Default Value: no set 71 | ; process.priority = -19 72 | 73 | ; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user 74 | ; or group is differrent than the master process user. It allows to create process 75 | ; core dump and ptrace the process for the pool user. 76 | ; Default Value: no 77 | ; process.dumpable = yes 78 | 79 | ; Choose how the process manager will control the number of child processes. 80 | ; Possible Values: 81 | ; static - a fixed number (pm.max_children) of child processes; 82 | ; dynamic - the number of child processes are set dynamically based on the 83 | ; following directives. With this process management, there will be 84 | ; always at least 1 children. 85 | ; pm.max_children - the maximum number of children that can 86 | ; be alive at the same time. 87 | ; pm.start_servers - the number of children created on startup. 88 | ; pm.min_spare_servers - the minimum number of children in 'idle' 89 | ; state (waiting to process). If the number 90 | ; of 'idle' processes is less than this 91 | ; number then some children will be created. 92 | ; pm.max_spare_servers - the maximum number of children in 'idle' 93 | ; state (waiting to process). If the number 94 | ; of 'idle' processes is greater than this 95 | ; number then some children will be killed. 96 | ; ondemand - no children are created at startup. Children will be forked when 97 | ; new requests will connect. The following parameter are used: 98 | ; pm.max_children - the maximum number of children that 99 | ; can be alive at the same time. 100 | ; pm.process_idle_timeout - The number of seconds after which 101 | ; an idle process will be killed. 102 | ; Note: This value is mandatory. 103 | pm = dynamic 104 | 105 | ; The number of child processes to be created when pm is set to 'static' and the 106 | ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. 107 | ; This value sets the limit on the number of simultaneous requests that will be 108 | ; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. 109 | ; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP 110 | ; CGI. The below defaults are based on a server without much resources. Don't 111 | ; forget to tweak pm.* to fit your needs. 112 | ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' 113 | ; Note: This value is mandatory. 114 | pm.max_children = 25 115 | 116 | ; The number of child processes created on startup. 117 | ; Note: Used only when pm is set to 'dynamic' 118 | ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 119 | pm.start_servers = 10 120 | 121 | ; The desired minimum number of idle server processes. 122 | ; Note: Used only when pm is set to 'dynamic' 123 | ; Note: Mandatory when pm is set to 'dynamic' 124 | pm.min_spare_servers = 1 125 | 126 | ; The desired maximum number of idle server processes. 127 | ; Note: Used only when pm is set to 'dynamic' 128 | ; Note: Mandatory when pm is set to 'dynamic' 129 | pm.max_spare_servers = 20 130 | 131 | ; The number of seconds after which an idle process will be killed. 132 | ; Note: Used only when pm is set to 'ondemand' 133 | ; Default Value: 10s 134 | pm.process_idle_timeout = 15s; 135 | 136 | ; The number of requests each child process should execute before respawning. 137 | ; This can be useful to work around memory leaks in 3rd party libraries. For 138 | ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. 139 | ; Default Value: 0 140 | pm.max_requests = 500 141 | 142 | ; The URI to view the FPM status page. If this value is not set, no URI will be 143 | ; recognized as a status page. It shows the following informations: 144 | ; pool - the name of the pool; 145 | ; process manager - static, dynamic or ondemand; 146 | ; start time - the date and time FPM has started; 147 | ; start since - number of seconds since FPM has started; 148 | ; accepted conn - the number of request accepted by the pool; 149 | ; listen queue - the number of request in the queue of pending 150 | ; connections (see backlog in listen(2)); 151 | ; max listen queue - the maximum number of requests in the queue 152 | ; of pending connections since FPM has started; 153 | ; listen queue len - the size of the socket queue of pending connections; 154 | ; idle processes - the number of idle processes; 155 | ; active processes - the number of active processes; 156 | ; total processes - the number of idle + active processes; 157 | ; max active processes - the maximum number of active processes since FPM 158 | ; has started; 159 | ; max children reached - number of times, the process limit has been reached, 160 | ; when pm tries to start more children (works only for 161 | ; pm 'dynamic' and 'ondemand'); 162 | ; Value are updated in real time. 163 | ; Example output: 164 | ; pool: www 165 | ; process manager: static 166 | ; start time: 01/Jul/2011:17:53:49 +0200 167 | ; start since: 62636 168 | ; accepted conn: 190460 169 | ; listen queue: 0 170 | ; max listen queue: 1 171 | ; listen queue len: 42 172 | ; idle processes: 4 173 | ; active processes: 11 174 | ; total processes: 15 175 | ; max active processes: 12 176 | ; max children reached: 0 177 | ; 178 | ; By default the status page output is formatted as text/plain. Passing either 179 | ; 'html', 'xml' or 'json' in the query string will return the corresponding 180 | ; output syntax. Example: 181 | ; http://www.foo.bar/status 182 | ; http://www.foo.bar/status?json 183 | ; http://www.foo.bar/status?html 184 | ; http://www.foo.bar/status?xml 185 | ; 186 | ; By default the status page only outputs short status. Passing 'full' in the 187 | ; query string will also return status for each pool process. 188 | ; Example: 189 | ; http://www.foo.bar/status?full 190 | ; http://www.foo.bar/status?json&full 191 | ; http://www.foo.bar/status?html&full 192 | ; http://www.foo.bar/status?xml&full 193 | ; The Full status returns for each process: 194 | ; pid - the PID of the process; 195 | ; state - the state of the process (Idle, Running, ...); 196 | ; start time - the date and time the process has started; 197 | ; start since - the number of seconds since the process has started; 198 | ; requests - the number of requests the process has served; 199 | ; request duration - the duration in µs of the requests; 200 | ; request method - the request method (GET, POST, ...); 201 | ; request URI - the request URI with the query string; 202 | ; content length - the content length of the request (only with POST); 203 | ; user - the user (PHP_AUTH_USER) (or '-' if not set); 204 | ; script - the main script called (or '-' if not set); 205 | ; last request cpu - the %cpu the last request consumed 206 | ; it's always 0 if the process is not in Idle state 207 | ; because CPU calculation is done when the request 208 | ; processing has terminated; 209 | ; last request memory - the max amount of memory the last request consumed 210 | ; it's always 0 if the process is not in Idle state 211 | ; because memory calculation is done when the request 212 | ; processing has terminated; 213 | ; If the process is in Idle state, then informations are related to the 214 | ; last request the process has served. Otherwise informations are related to 215 | ; the current request being served. 216 | ; Example output: 217 | ; ************************ 218 | ; pid: 31330 219 | ; state: Running 220 | ; start time: 01/Jul/2011:17:53:49 +0200 221 | ; start since: 63087 222 | ; requests: 12808 223 | ; request duration: 1250261 224 | ; request method: GET 225 | ; request URI: /test_mem.php?N=10000 226 | ; content length: 0 227 | ; user: - 228 | ; script: /home/fat/web/docs/php/test_mem.php 229 | ; last request cpu: 0.00 230 | ; last request memory: 0 231 | ; 232 | ; Note: There is a real-time FPM status monitoring sample web page available 233 | ; It's available in: /usr/share/php7/fpm/status.html 234 | ; 235 | ; Note: The value must start with a leading slash (/). The value can be 236 | ; anything, but it may not be a good idea to use the .php extension or it 237 | ; may conflict with a real PHP file. 238 | ; Default Value: not set 239 | pm.status_path = /fpm-status 240 | 241 | ; The ping URI to call the monitoring page of FPM. If this value is not set, no 242 | ; URI will be recognized as a ping page. This could be used to test from outside 243 | ; that FPM is alive and responding, or to 244 | ; - create a graph of FPM availability (rrd or such); 245 | ; - remove a server from a group if it is not responding (load balancing); 246 | ; - trigger alerts for the operating team (24/7). 247 | ; Note: The value must start with a leading slash (/). The value can be 248 | ; anything, but it may not be a good idea to use the .php extension or it 249 | ; may conflict with a real PHP file. 250 | ; Default Value: not set 251 | ping.path = /fpm-ping 252 | 253 | ; This directive may be used to customize the response of a ping request. The 254 | ; response is formatted as text/plain with a 200 response code. 255 | ; Default Value: pong 256 | ping.response = Enabled 257 | 258 | ; The access log file 259 | ; Default: not set 260 | ;access.log = log/php7/$pool.access.log 261 | 262 | ; The access log format. 263 | ; The following syntax is allowed 264 | ; %%: the '%' character 265 | ; %C: %CPU used by the request 266 | ; it can accept the following format: 267 | ; - %{user}C for user CPU only 268 | ; - %{system}C for system CPU only 269 | ; - %{total}C for user + system CPU (default) 270 | ; %d: time taken to serve the request 271 | ; it can accept the following format: 272 | ; - %{seconds}d (default) 273 | ; - %{miliseconds}d 274 | ; - %{mili}d 275 | ; - %{microseconds}d 276 | ; - %{micro}d 277 | ; %e: an environment variable (same as $_ENV or $_SERVER) 278 | ; it must be associated with embraces to specify the name of the env 279 | ; variable. Some exemples: 280 | ; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e 281 | ; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e 282 | ; %f: script filename 283 | ; %l: content-length of the request (for POST request only) 284 | ; %m: request method 285 | ; %M: peak of memory allocated by PHP 286 | ; it can accept the following format: 287 | ; - %{bytes}M (default) 288 | ; - %{kilobytes}M 289 | ; - %{kilo}M 290 | ; - %{megabytes}M 291 | ; - %{mega}M 292 | ; %n: pool name 293 | ; %o: output header 294 | ; it must be associated with embraces to specify the name of the header: 295 | ; - %{Content-Type}o 296 | ; - %{X-Powered-By}o 297 | ; - %{Transfert-Encoding}o 298 | ; - .... 299 | ; %p: PID of the child that serviced the request 300 | ; %P: PID of the parent of the child that serviced the request 301 | ; %q: the query string 302 | ; %Q: the '?' character if query string exists 303 | ; %r: the request URI (without the query string, see %q and %Q) 304 | ; %R: remote IP address 305 | ; %s: status (response code) 306 | ; %t: server time the request was received 307 | ; it can accept a strftime(3) format: 308 | ; %d/%b/%Y:%H:%M:%S %z (default) 309 | ; The strftime(3) format must be encapsuled in a %{}t tag 310 | ; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t 311 | ; %T: time the log has been written (the request has finished) 312 | ; it can accept a strftime(3) format: 313 | ; %d/%b/%Y:%H:%M:%S %z (default) 314 | ; The strftime(3) format must be encapsuled in a %{}t tag 315 | ; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t 316 | ; %u: remote user 317 | ; 318 | ; Default: "%R - %u %t \"%m %r\" %s" 319 | ;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" 320 | 321 | ; The log file for slow requests 322 | ; Default Value: not set 323 | ; Note: slowlog is mandatory if request_slowlog_timeout is set 324 | slowlog = /dev/stdout 325 | 326 | ; The timeout for serving a single request after which a PHP backtrace will be 327 | ; dumped to the 'slowlog' file. A value of '0s' means 'off'. 328 | ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) 329 | ; Default Value: 0 330 | request_slowlog_timeout = 10s 331 | 332 | ; Depth of slow log stack trace. 333 | ; Default Value: 20 334 | ;request_slowlog_trace_depth = 20 335 | 336 | ; The timeout for serving a single request after which the worker process will 337 | ; be killed. This option should be used when the 'max_execution_time' ini option 338 | ; does not stop script execution for some reason. A value of '0' means 'off'. 339 | ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) 340 | ; Default Value: 0 341 | request_terminate_timeout = 300 342 | 343 | ; Set open file descriptor rlimit. 344 | ; Default Value: system defined value 345 | ;rlimit_files = 1024 346 | 347 | ; Set max core size rlimit. 348 | ; Possible Values: 'unlimited' or an integer greater or equal to 0 349 | ; Default Value: system defined value 350 | ;rlimit_core = 0 351 | 352 | ; Chroot to this directory at the start. This value must be defined as an 353 | ; absolute path. When this value is not set, chroot is not used. 354 | ; Note: you can prefix with '$prefix' to chroot to the pool prefix or one 355 | ; of its subdirectories. If the pool prefix is not set, the global prefix 356 | ; will be used instead. 357 | ; Note: chrooting is a great security feature and should be used whenever 358 | ; possible. However, all PHP paths will be relative to the chroot 359 | ; (error_log, sessions.save_path, ...). 360 | ; Default Value: not set 361 | ;chroot = 362 | 363 | ; Chdir to this directory at the start. 364 | ; Note: relative path can be used. 365 | ; Default Value: current directory or / when chroot 366 | ;chdir = /var/www 367 | 368 | ; Redirect worker stdout and stderr into main error log. If not set, stdout and 369 | ; stderr will be redirected to /dev/null according to FastCGI specs. 370 | ; Note: on highloaded environement, this can cause some delay in the page 371 | ; process time (several ms). 372 | ; Default Value: no 373 | ;catch_workers_output = yes 374 | 375 | ; Decorate worker output with prefix and suffix containing information about 376 | ; the child that writes to the log and if stdout or stderr is used as well as 377 | ; log level and time. This options is used only if catch_workers_output is yes. 378 | ; Settings to "no" will output data as written to the stdout or stderr. 379 | ; Default value: yes 380 | ;decorate_workers_output = no 381 | 382 | ; Clear environment in FPM workers 383 | ; Prevents arbitrary environment variables from reaching FPM worker processes 384 | ; by clearing the environment in workers before env vars specified in this 385 | ; pool configuration are added. 386 | ; Setting to "no" will make all environment variables available to PHP code 387 | ; via getenv(), $_ENV and $_SERVER. 388 | ; Default Value: yes 389 | clear_env = no 390 | 391 | ; Limits the extensions of the main script FPM will allow to parse. This can 392 | ; prevent configuration mistakes on the web server side. You should only limit 393 | ; FPM to .php extensions to prevent malicious users to use other extensions to 394 | ; execute php code. 395 | ; Note: set an empty value to allow all extensions. 396 | ; Default Value: .php 397 | ;security.limit_extensions = .php .php3 .php4 .php5 .php7 398 | 399 | ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from 400 | ; the current environment. 401 | ; Default Value: clean env 402 | ;env[HOSTNAME] = $HOSTNAME 403 | ;env[PATH] = /usr/local/bin:/usr/bin:/bin 404 | ;env[TMP] = /tmp 405 | ;env[TMPDIR] = /tmp 406 | ;env[TEMP] = /tmp 407 | 408 | ; Additional php.ini defines, specific to this pool of workers. These settings 409 | ; overwrite the values previously defined in the php.ini. The directives are the 410 | ; same as the PHP SAPI: 411 | ; php_value/php_flag - you can set classic ini defines which can 412 | ; be overwritten from PHP call 'ini_set'. 413 | ; php_admin_value/php_admin_flag - these directives won't be overwritten by 414 | ; PHP call 'ini_set' 415 | ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. 416 | 417 | ; Defining 'extension' will load the corresponding shared extension from 418 | ; extension_dir. Defining 'disable_functions' or 'disable_classes' will not 419 | ; overwrite previously defined php.ini values, but will append the new value 420 | ; instead. 421 | 422 | ; Note: path INI options can be relative and will be expanded with the prefix 423 | ; (pool, global or /usr) 424 | 425 | ; Default Value: nothing is defined by default except the values in php.ini and 426 | ; specified at startup with the -d argument 427 | ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com 428 | ;php_flag[display_errors] = off 429 | ;php_admin_value[error_log] = /var/log/php7/$pool.error.log 430 | ;php_admin_flag[log_errors] = on 431 | ;php_admin_value[memory_limit] = 32M 432 | --------------------------------------------------------------------------------