├── .dockerignore ├── .gitignore ├── .travis.yml ├── Dockerfile ├── LICENSE ├── README.md ├── build.sh ├── continuous-pipe.yml ├── couchdb ├── Dockerfile └── README.md ├── docker-compose.eol.yml ├── docker-compose.stable.yml ├── docker-compose.test.yml ├── docker-compose.yml ├── drupal ├── Dockerfile ├── README.md ├── etc │ └── confd │ │ └── templates │ │ └── apache │ │ └── site_base.conf.tmpl └── usr │ └── local │ └── share │ ├── container │ └── baseimage-30.sh │ ├── drupal │ └── drupal_functions.sh │ └── env │ ├── 30-framework │ └── 60-framework ├── drupal8-solr ├── 4.10 │ ├── Dockerfile │ ├── README.md │ └── usr │ │ └── local │ │ └── share │ │ └── solr │ │ └── d8 │ │ └── conf │ │ ├── elevate.xml │ │ ├── mapping-ISOLatin1Accent.txt │ │ ├── protwords.txt │ │ ├── schema.xml │ │ ├── schema_extra_fields.xml │ │ ├── schema_extra_types.xml │ │ ├── solrconfig.xml │ │ ├── solrconfig_extra.xml │ │ ├── solrcore.properties │ │ ├── stopwords.txt │ │ └── synonyms.txt └── 6.2 │ ├── Dockerfile │ ├── README.md │ ├── docker-entrypoint-initdb.d │ └── .gitkeep │ └── usr │ └── local │ └── share │ └── solr │ ├── elevate.xml │ ├── mapping-ISOLatin1Accent.txt │ ├── protwords.txt │ ├── schema.xml │ ├── schema_extra_fields.xml │ ├── schema_extra_types.xml │ ├── schema_legacy_fields.xml │ ├── schema_legacy_types.xml │ ├── solrconfig.xml │ ├── solrconfig_spellcheck.xml │ ├── solrcore.properties │ ├── stopwords.txt │ └── synonyms.txt ├── drupal8-varnish └── 4.0 │ ├── Dockerfile │ ├── README.md │ ├── etc │ ├── confd │ │ ├── conf.d │ │ │ └── .gitkeep │ │ └── templates │ │ │ └── varnish │ │ │ └── default.vcl.tmpl │ └── supervisor │ │ └── conf.d │ │ └── .gitkeep │ └── usr │ └── local │ └── share │ └── env │ └── 30-framework ├── elasticsearch ├── Dockerfile-dockerhub ├── Dockerfile-elastic └── README.md ├── ezplatform ├── Dockerfile ├── README.md ├── etc │ └── confd │ │ ├── conf.d │ │ ├── apache2_site_additional_rewrites.conf.toml │ │ └── apache2_site_caching.conf.toml │ │ └── templates │ │ └── apache │ │ ├── site_additional_rewrites.conf.tmpl │ │ └── site_caching.conf.tmpl └── usr │ └── local │ └── share │ ├── container │ └── baseimage-40.sh │ ├── env │ └── 25-framework │ └── ez │ └── ez_functions.sh ├── hem ├── Dockerfile └── README.md ├── magento1 ├── Dockerfile ├── README.md ├── apache │ └── etc │ │ ├── apache2 │ │ └── sites-available │ │ │ └── 000-default-05_site_deny.conf │ │ └── confd │ │ ├── conf.d │ │ └── apache2_site_magento.conf.toml │ │ └── templates │ │ └── apache │ │ └── site_magento.conf.tmpl ├── etc │ └── confd │ │ ├── conf.d │ │ ├── magento_cron.toml │ │ ├── magento_local.xml.toml │ │ └── supervisor_magento_cron.conf.toml │ │ └── templates │ │ ├── magento │ │ ├── cron.tmpl │ │ └── local.xml.tmpl │ │ └── supervisor │ │ └── magento_cron.conf.tmpl ├── nginx │ └── etc │ │ ├── confd │ │ ├── conf.d │ │ │ └── nginx_site_magento.conf.toml │ │ └── templates │ │ │ └── nginx │ │ │ ├── site_magento.conf.tmpl │ │ │ └── site_phpfpm.conf.tmpl │ │ └── nginx │ │ └── sites-available │ │ └── default-05_site_deny.conf └── usr │ └── local │ └── share │ ├── container │ └── baseimage-30.sh │ ├── env │ ├── 30-framework │ └── 60-framework │ └── magento1 │ └── magento_functions.sh ├── magento2-varnish └── 4.0 │ ├── Dockerfile │ ├── README.md │ ├── etc │ ├── confd │ │ ├── conf.d │ │ │ └── .gitkeep │ │ └── templates │ │ │ └── varnish │ │ │ └── default.vcl.tmpl │ └── supervisor │ │ └── conf.d │ │ └── .gitkeep │ └── usr │ └── local │ └── share │ └── env │ └── 30-framework ├── magento2 ├── Dockerfile ├── README.md ├── etc │ ├── confd │ │ ├── conf.d │ │ │ ├── hem-config.yaml.toml │ │ │ ├── magento_config.php.toml │ │ │ ├── magento_cron.toml │ │ │ ├── magento_echo_reports_cron.toml │ │ │ ├── magento_env.php.toml │ │ │ ├── nginx_admin_htpasswd.toml │ │ │ ├── nginx_php_upstream.conf.toml │ │ │ ├── nginx_protect_admin.conf.toml │ │ │ ├── nginx_run_code_mapping.conf.toml │ │ │ ├── nginx_site_media.conf.toml │ │ │ ├── nginx_site_pub.conf.toml │ │ │ ├── nginx_site_root.conf.toml │ │ │ ├── nginx_site_setup.conf.toml │ │ │ ├── nginx_site_static.conf.toml │ │ │ ├── nginx_site_update.conf.toml │ │ │ ├── supervisor_echo_magento_reports.conf.toml │ │ │ └── supervisor_magento_cron.conf.toml │ │ └── templates │ │ │ ├── hem │ │ │ └── config.yaml.tmpl │ │ │ ├── magento │ │ │ ├── config.php.tmpl │ │ │ ├── cron.tmpl │ │ │ ├── echo_reports_cron.tmpl │ │ │ └── env.php.tmpl │ │ │ ├── nginx │ │ │ ├── admin_htpasswd.tmpl │ │ │ ├── php_upstream.conf.tmpl │ │ │ ├── run_code_mapping.conf.tmpl │ │ │ ├── site_base.conf.tmpl │ │ │ ├── site_media.conf.tmpl │ │ │ ├── site_phpfpm.conf.tmpl │ │ │ ├── site_protect_admin.conf.tmpl │ │ │ ├── site_pub.conf.tmpl │ │ │ ├── site_rewriteapp.conf.tmpl │ │ │ ├── site_root.conf.tmpl │ │ │ ├── site_setup.conf.tmpl │ │ │ ├── site_static.conf.tmpl │ │ │ └── site_update.conf.tmpl │ │ │ └── supervisor │ │ │ ├── echo_magento_reports.conf.tmpl │ │ │ └── magento_cron.conf.tmpl │ ├── nginx │ │ └── sites-available │ │ │ ├── default-05_site_deny.conf │ │ │ └── default-50_site_final_match.conf │ └── supervisor │ │ └── conf.d │ │ └── .gitkeep └── usr │ └── local │ └── share │ ├── container │ └── baseimage-30.sh │ ├── env │ ├── 30-framework │ └── 60-framework │ └── magento2 │ ├── development │ ├── install.sh │ ├── install_assets.sh │ ├── install_custom.sh │ ├── install_database.sh │ └── replace_core_config_values.sh │ ├── format_env.php │ ├── install_magento.sh │ ├── install_magento_custom.sh │ ├── install_magento_finalise.sh │ ├── install_magento_finalise_custom.sh │ ├── magento_functions.sh │ └── magento_legacy_asset_functions.sh ├── mailcatcher ├── Dockerfile ├── README.md ├── etc │ └── supervisor │ │ └── conf.d │ │ └── mailcatcher.conf └── usr │ └── local │ └── bin │ └── mailcatcher.sh ├── memcached └── 1.4 │ ├── Dockerfile │ ├── README.md │ └── etc │ ├── confd │ ├── conf.d │ │ └── supervisor_memcached.conf.toml │ └── templates │ │ └── supervisor │ │ └── memcached.conf.tmpl │ └── supervisor │ └── conf.d │ └── .gitkeep ├── mongodb ├── Dockerfile ├── README.md └── usr │ └── local │ ├── bin │ └── mongo-init.sh │ └── share │ └── mongodb │ ├── mongo-set-auth.js │ └── mongo-startup.js ├── mysql ├── Dockerfile ├── README.md └── docker-entrypoint-initdb.d │ └── mysql_grants.sh ├── nginx-ingress-controller ├── Dockerfile ├── README.md ├── etc │ └── nginx │ │ └── template │ │ └── nginx.tmpl └── usr │ └── local │ └── bin │ └── boot.sh ├── nginx-reverse-proxy ├── Dockerfile ├── README.md └── etc │ └── confd │ ├── conf.d │ └── upstreams.conf.toml │ └── templates │ └── nginx │ ├── site_base.conf.tmpl │ └── upstreams.conf.tmpl ├── nginx ├── Dockerfile ├── README.md ├── etc │ ├── confd │ │ ├── conf.d │ │ │ ├── crond_dhparam_regenerate.toml │ │ │ ├── nginx.conf.toml │ │ │ ├── nginx_basic_auth.conf.toml │ │ │ ├── nginx_core.conf.toml │ │ │ ├── nginx_htpasswd.toml │ │ │ ├── nginx_ip_whitelist.conf.toml │ │ │ ├── nginx_log_format.conf.toml │ │ │ ├── nginx_realip.conf.toml │ │ │ ├── nginx_server_name_bucket_size.conf.toml │ │ │ ├── nginx_site.conf.toml │ │ │ ├── nginx_site_base.conf.toml │ │ │ ├── nginx_site_custom_scheme_flags.conf.toml │ │ │ ├── nginx_site_healthcheck.conf.toml │ │ │ ├── nginx_site_redirect_to_https.conf.toml │ │ │ ├── nginx_site_ssl.conf.toml │ │ │ ├── supervisor_dhparam_regenerate.conf.toml │ │ │ └── supervisor_nginx.conf.toml │ │ └── templates │ │ │ ├── crond │ │ │ └── dhparam_regenerate.tmpl │ │ │ ├── nginx │ │ │ ├── nginx.conf.tmpl │ │ │ ├── nginx_basic_auth.conf.tmpl │ │ │ ├── nginx_core.conf.tmpl │ │ │ ├── nginx_htpasswd.tmpl │ │ │ ├── nginx_ip_whitelist.conf.tmpl │ │ │ ├── nginx_log_format.conf.tmpl │ │ │ ├── nginx_realip.conf.tmpl │ │ │ ├── nginx_server_name_bucket_size.conf.tmpl │ │ │ ├── site.conf.tmpl │ │ │ ├── site_base.conf.tmpl │ │ │ ├── site_custom_scheme_flags.conf.tmpl │ │ │ ├── site_healthcheck.conf.tmpl │ │ │ ├── site_redirect_to_https.conf.tmpl │ │ │ └── site_ssl.conf.tmpl │ │ │ └── supervisor │ │ │ ├── dhparam_regenerate.conf.tmpl │ │ │ └── nginx.conf.tmpl │ └── supervisor │ │ └── conf.d │ │ └── .gitkeep └── usr │ └── local │ └── share │ ├── container │ └── baseimage-20.sh │ ├── env │ ├── 20-heroku │ ├── 40-stack │ └── 55-stack │ └── nginx │ └── nginx_functions.sh ├── nodejs ├── Dockerfile └── README.md ├── phantomjs ├── Dockerfile ├── README.md └── etc │ └── supervisor │ └── conf.d │ └── phantomjs.conf ├── php ├── Dockerfile-apache ├── Dockerfile-nginx ├── Dockerfile-nginx-phpsource ├── Dockerfile-php ├── apache │ ├── README.md │ ├── etc │ │ └── confd │ │ │ ├── conf.d │ │ │ ├── apache2-security.toml │ │ │ ├── apache2.toml │ │ │ ├── apache2_auth.conf.toml │ │ │ ├── apache2_htpasswd.toml │ │ │ ├── apache2_remoteip.conf.toml │ │ │ ├── apache2_site_base.conf.toml │ │ │ ├── apache2_site_custom_scheme_flags.conf.toml │ │ │ ├── apache2_site_healthcheck.conf.toml │ │ │ ├── apache2_site_redirect_to_https.conf.toml │ │ │ ├── apache2_site_rewriteapp.conf.toml │ │ │ ├── apache2_site_ssl.conf.toml │ │ │ ├── apache2_ssl.conf.toml │ │ │ ├── php_env_apache.ini.toml │ │ │ ├── site_php.conf.toml │ │ │ ├── supervisor_apache.conf.toml │ │ │ └── virtual-host.conf.toml │ │ │ └── templates │ │ │ ├── apache │ │ │ ├── apache2-security.conf.tmpl │ │ │ ├── apache2.conf.tmpl │ │ │ ├── apache2_auth.conf.tmpl │ │ │ ├── apache2_htpasswd.tmpl │ │ │ ├── apache2_remoteip.conf.tmpl │ │ │ ├── apache2_ssl.conf.tmpl │ │ │ ├── site_base.conf.tmpl │ │ │ ├── site_custom_scheme_flags.conf.tmpl │ │ │ ├── site_healthcheck.conf.tmpl │ │ │ ├── site_php.conf.tmpl │ │ │ ├── site_redirect_to_https.conf.tmpl │ │ │ ├── site_rewriteapp.conf.tmpl │ │ │ ├── site_ssl.conf.tmpl │ │ │ └── virtual-host.conf.tmpl │ │ │ └── supervisor │ │ │ └── apache.conf.tmpl │ └── usr │ │ └── local │ │ └── share │ │ ├── container │ │ └── baseimage-21.sh │ │ └── env │ │ └── 40-webserver ├── nginx │ ├── README.md │ ├── etc │ │ └── confd │ │ │ ├── conf.d │ │ │ ├── nginx.conf.toml │ │ │ ├── nginx_basic_auth.conf.toml │ │ │ ├── nginx_htpasswd.toml │ │ │ ├── nginx_ip_whitelist.conf.toml │ │ │ ├── nginx_log_format.conf.toml │ │ │ ├── nginx_realip.conf.toml │ │ │ ├── nginx_server_name_bucket_size.conf.toml │ │ │ ├── nginx_site.conf.toml │ │ │ ├── nginx_site_base.conf.toml │ │ │ ├── nginx_site_custom_scheme_flags.conf.toml │ │ │ ├── nginx_site_disable_further_php.conf.toml │ │ │ ├── nginx_site_healthcheck.conf.toml │ │ │ ├── nginx_site_phpfpm.conf.toml │ │ │ ├── nginx_site_redirect_to_https.conf.toml │ │ │ ├── nginx_site_rewriteapp.conf.toml │ │ │ ├── nginx_site_ssl.conf.toml │ │ │ ├── php-fpm-pool.conf.toml │ │ │ ├── php-fpm.conf.toml │ │ │ ├── php_env_fpm.ini.toml │ │ │ ├── supervisor_fpm.conf.toml │ │ │ └── supervisor_nginx.conf.toml │ │ │ └── templates │ │ │ ├── nginx │ │ │ ├── nginx.conf.tmpl │ │ │ ├── nginx_basic_auth.conf.tmpl │ │ │ ├── nginx_htpasswd.tmpl │ │ │ ├── nginx_ip_whitelist.conf.tmpl │ │ │ ├── nginx_log_format.conf.tmpl │ │ │ ├── nginx_realip.conf.tmpl │ │ │ ├── nginx_server_name_bucket_size.conf.tmpl │ │ │ ├── site.conf.tmpl │ │ │ ├── site_base.conf.tmpl │ │ │ ├── site_custom_scheme_flags.conf.tmpl │ │ │ ├── site_disable_further_php.conf.tmpl │ │ │ ├── site_healthcheck.conf.tmpl │ │ │ ├── site_phpfpm.conf.tmpl │ │ │ ├── site_redirect_to_https.conf.tmpl │ │ │ ├── site_rewriteapp.conf.tmpl │ │ │ └── site_ssl.conf.tmpl │ │ │ ├── php-fpm │ │ │ ├── php-fpm.conf.tmpl │ │ │ └── pool.conf.tmpl │ │ │ └── supervisor │ │ │ ├── nginx.conf.tmpl │ │ │ └── php-fpm.conf.tmpl │ └── usr │ │ └── local │ │ └── share │ │ ├── container │ │ └── baseimage-21.sh │ │ └── env │ │ └── 40-webserver ├── shared │ ├── etc │ │ ├── confd │ │ │ ├── conf.d │ │ │ │ ├── crond_dhparam_regenerate.toml │ │ │ │ ├── php_env_cli.ini.toml │ │ │ │ ├── postfix_main.cf.toml │ │ │ │ ├── postfix_sasl_passwd.toml │ │ │ │ ├── supervisor_dhparam_regenerate.conf.toml │ │ │ │ ├── supervisor_postfix.conf.toml │ │ │ │ ├── tideways.ini.toml │ │ │ │ └── xdebug.ini.toml │ │ │ └── templates │ │ │ │ ├── crond │ │ │ │ └── dhparam_regenerate.tmpl │ │ │ │ ├── php │ │ │ │ └── env.ini.tmpl │ │ │ │ ├── postfix │ │ │ │ ├── main.cf.tmpl │ │ │ │ └── sasl_passwd.tmpl │ │ │ │ ├── supervisor │ │ │ │ ├── dhparam_regenerate.conf.tmpl │ │ │ │ └── postfix.conf.tmpl │ │ │ │ ├── tideways │ │ │ │ └── tideways.ini.tmpl │ │ │ │ └── xdebug │ │ │ │ └── xdebug.ini.tmpl │ │ └── supervisor │ │ │ └── conf.d │ │ │ └── .gitkeep │ └── usr │ │ └── local │ │ ├── sbin │ │ └── postfix.sh │ │ └── share │ │ ├── assets │ │ └── assets_functions.sh │ │ ├── container │ │ └── baseimage-20.sh │ │ ├── database │ │ └── database_functions.sh │ │ ├── env │ │ ├── 20-heroku │ │ ├── 35-stack │ │ ├── 40-assets │ │ ├── 40-stack │ │ ├── 55-assets │ │ └── 55-stack │ │ └── php │ │ ├── common_functions.sh │ │ └── webserver_functions.sh └── tests │ └── integration │ ├── Dockerfile │ ├── docker-compose.yml │ ├── tests │ └── plan.sh │ └── web │ └── index.php ├── piwik ├── Dockerfile └── README.md ├── postgres ├── Dockerfile └── README.md ├── rabbitmq ├── Dockerfile └── README.md ├── redis └── 3.2 │ ├── Dockerfile │ └── README.md ├── scala-base └── 1.0 │ ├── Dockerfile │ └── README.md ├── solr ├── 4.10 │ ├── Dockerfile │ ├── README.md │ └── usr │ │ └── local │ │ └── share │ │ └── solr │ │ ├── solr.xml │ │ └── startup.sh └── 6.2 │ ├── Dockerfile │ ├── README.md │ ├── docker-entrypoint-initdb.d │ └── create-main-core.sh │ └── usr │ └── local │ └── share │ └── solr │ └── .gitkeep ├── spryker ├── Dockerfile ├── README.md ├── apache │ ├── etc │ │ ├── apache2 │ │ │ └── sites-enabled │ │ │ │ ├── 001-yves.conf │ │ │ │ └── 002-zed.conf │ │ ├── confd │ │ │ └── templates │ │ │ │ └── apache │ │ │ │ └── site_base.conf.tmpl │ │ ├── confd_yves │ │ │ ├── conf.d │ │ │ │ ├── apache2_site_yves.conf.toml │ │ │ │ └── apache2_site_yves_webroot.conf.toml │ │ │ └── templates │ │ │ │ └── apache │ │ │ │ ├── site_yves.conf.tmpl │ │ │ │ └── site_yves_webroot.conf.tmpl │ │ └── confd_zed │ │ │ ├── conf.d │ │ │ ├── apache2_site_zed.conf.toml │ │ │ └── apache2_site_zed_webroot.conf.toml │ │ │ └── templates │ │ │ └── apache │ │ │ ├── site_zed.conf.tmpl │ │ │ └── site_zed_webroot.conf.tmpl │ └── usr │ │ └── local │ │ └── share │ │ └── env │ │ └── 31-framework-apache ├── etc │ ├── confd │ │ ├── conf.d │ │ │ ├── cron_ofelia_spryker.toml │ │ │ ├── cron_spryker.toml │ │ │ ├── supervisor_spryker_collectors_crons.conf.toml │ │ │ ├── supervisor_spryker_crons.conf.toml │ │ │ └── supervisor_spryker_queue_worker.conf.toml │ │ └── templates │ │ │ ├── cron │ │ │ ├── ofelia_spryker.ini.tmpl │ │ │ └── spryker.tmpl │ │ │ └── supervisor │ │ │ ├── spryker_collectors_crons.conf.tmpl │ │ │ ├── spryker_crons.conf.tmpl │ │ │ └── spryker_queue_worker.conf.tmpl │ └── ofelia │ │ └── .gitkeep ├── nginx │ ├── etc │ │ ├── confd │ │ │ └── templates │ │ │ │ └── nginx │ │ │ │ └── site_base.conf.tmpl │ │ ├── confd_yves │ │ │ ├── conf.d │ │ │ │ ├── nginx_site_yves.conf.toml │ │ │ │ └── nginx_site_yves_webroot.conf.toml │ │ │ └── templates │ │ │ │ └── nginx │ │ │ │ ├── site_yves.conf.tmpl │ │ │ │ └── site_yves_webroot.conf.tmpl │ │ ├── confd_zed │ │ │ ├── conf.d │ │ │ │ ├── nginx_site_zed.conf.toml │ │ │ │ └── nginx_site_zed_webroot.conf.toml │ │ │ └── templates │ │ │ │ └── nginx │ │ │ │ ├── site_zed.conf.tmpl │ │ │ │ └── site_zed_webroot.conf.tmpl │ │ └── nginx │ │ │ └── sites-enabled │ │ │ ├── yves │ │ │ └── zed │ └── usr │ │ └── local │ │ └── share │ │ └── env │ │ └── 31-framework-nginx └── usr │ └── local │ └── share │ ├── container │ └── baseimage-45.sh │ ├── env │ ├── 30-framework │ └── 60-framework │ └── spryker │ └── spryker_functions.sh ├── ssh-forward ├── Dockerfile ├── README.md ├── etc │ └── supervisor │ │ └── conf.d │ │ └── sshd.conf └── usr │ └── local │ └── share │ └── container │ └── baseimage-20.sh ├── symfony-pack ├── Dockerfile ├── README.md └── usr │ └── local │ └── share │ ├── container │ └── baseimage-30.sh │ ├── env │ └── 30-framework │ └── symfony │ └── symfony_pack_functions.sh ├── symfony ├── Dockerfile ├── README.md └── usr │ └── local │ └── share │ ├── container │ └── baseimage-30.sh │ ├── env │ ├── 30-framework │ ├── 37-framework │ └── 56-framework │ └── symfony │ └── symfony_functions.sh ├── test.sh ├── tests ├── bats-mock │ └── 0001-Patch-for-similar-space-splits-as-the-execution-plan.patch ├── bats │ └── helper.bash └── plan.sh ├── tideways ├── Dockerfile ├── README.md ├── etc │ ├── confd │ │ ├── conf.d │ │ │ └── supervisor_tideways_daemon.conf.toml │ │ └── templates │ │ │ └── supervisor │ │ │ └── tideways_daemon.conf.tmpl │ └── supervisor │ │ └── conf.d │ │ └── .gitkeep └── usr │ └── local │ └── share │ └── env │ └── 40-stack ├── tools ├── compare │ ├── Dockerfile │ ├── README.md │ ├── compare.sh │ ├── exclusions.txt │ └── pull_and_compare.sh └── generate_stable_docker_compose_file.rb ├── ubuntu └── 16.04 │ ├── Dockerfile │ ├── README.md │ ├── etc │ ├── bash.bashrc │ ├── bash_completion.d │ │ └── container │ ├── confd │ │ ├── conf.d │ │ │ ├── .gitkeep │ │ │ └── supervisor_cron.conf.toml │ │ └── templates │ │ │ ├── .gitkeep │ │ │ └── supervisor │ │ │ └── cron.conf.tmpl │ └── supervisor │ │ ├── conf.d │ │ ├── .gitkeep │ │ └── kill_supervisord_upon_fatal_process_state.conf │ │ └── supervisord.conf │ ├── tests │ └── common_functions.bats │ └── usr │ └── local │ ├── bin │ ├── container │ └── supervisor_custom_start │ └── share │ ├── bootstrap │ ├── bootstrap.sh │ ├── common_functions.sh │ ├── parallel_shell_wrapper.sh │ ├── run_confd.sh │ ├── setup.sh │ ├── trigger_update_permissions.sh │ └── update_permissions.sh │ ├── container │ ├── baseimage-10.sh │ └── plan.sh │ ├── env │ └── 50-bootstrap │ └── supervisord │ └── kill_supervisord_upon_fatal_process_state.py └── varnish └── 4.0 ├── Dockerfile ├── README.md ├── etc ├── confd │ ├── conf.d │ │ ├── default.vcl.toml │ │ ├── secret.toml │ │ └── supervisor_varnish.conf.toml │ └── templates │ │ ├── supervisor │ │ └── varnish.conf.tmpl │ │ └── varnish │ │ ├── default.vcl.tmpl │ │ └── secret.tmpl └── supervisor │ └── conf.d │ └── .gitkeep └── usr └── local └── share └── env └── 40-stack /.dockerignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/continuouspipe/dockerfiles/f89d6857af09999f928ca022d131298f474adb7d/.dockerignore -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | tmp 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: bash 2 | 3 | sudo: required 4 | 5 | services: 6 | - docker 7 | 8 | env: 9 | DOCKER_COMPOSE_VERSION: 1.23.0-rc3 10 | 11 | before_install: 12 | - docker-compose --version 13 | - docker pull koalaman/shellcheck:v0.4.6 14 | - docker pull lukasmartinelli/hadolint:latest 15 | - curl -L https://github.com/docker/compose/releases/download/1.23.0-rc3/docker-compose-`uname -s`-`uname -m` -o docker-compose 16 | - chmod +x docker-compose 17 | - sudo mv docker-compose /usr/local/bin/ 18 | - docker-compose --version 19 | - wget https://ftpmirror.gnu.org/parallel/parallel-latest.tar.bz2 20 | - bzip2 -dc parallel-latest.tar.bz2 | tar xvf - 21 | - (cd parallel-*/ && ./configure && make && sudo make install && cd ../ && rm -rf parallel-*) 22 | 23 | script: 24 | - bash ./test.sh 25 | 26 | after_success: 27 | - | 28 | if [ "$TRAVIS_BRANCH" == "main" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] ; then 29 | docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" quay.io && DO_PUBLISH='y' bash ./build.sh 30 | fi 31 | - | 32 | if [ "$TRAVIS_BRANCH" == "force-eol" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] ; then 33 | docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" quay.io && DO_PUBLISH='y' EOL_BUILD=true bash ./build.sh 34 | fi 35 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM quay.io/continuouspipe/ubuntu16.04:latest 2 | 3 | RUN apt-get update -qq \ 4 | && DEBIAN_FRONTEND=noninteractive apt-get -qq -y --no-install-recommends install \ 5 | bats \ 6 | entr \ 7 | \ 8 | # Clean the image \ 9 | && apt-get auto-remove -qq -y \ 10 | && apt-get clean \ 11 | && rm -rf /var/lib/apt/lists/* \ 12 | \ 13 | # Install bats-mock package \ 14 | && mkdir -p /usr/local/share/bats/ \ 15 | && chown -R build:build /usr/local/share/bats/ 16 | 17 | COPY ./tests/plan.sh /usr/local/share/container/plan.sh 18 | COPY ./tests/bats/helper.bash /usr/local/share/bats/ 19 | COPY . /app 20 | WORKDIR /app 21 | 22 | USER build 23 | RUN git clone https://github.com/ztombol/bats-support.git /usr/local/share/bats/bats-support \ 24 | && git clone https://github.com/ztombol/bats-assert.git /usr/local/share/bats/bats-assert \ 25 | && git clone https://github.com/jasonkarns/bats-mock.git /usr/local/share/bats/bats-mock \ 26 | && ( cd /usr/local/share/bats/bats-mock || exit 1; git apply /app/tests/bats-mock/0001-Patch-for-similar-space-splits-as-the-execution-plan.patch ) 27 | USER root 28 | 29 | CMD ["container", "run_tests"] 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2015-2018 Samuel Roze 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /couchdb/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG FROM_TAG 2 | FROM couchdb:${FROM_TAG} 3 | 4 | ARG FROM_TAG 5 | RUN if [ "$FROM_TAG" = "1.6" ]; then \ 6 | echo "deb http://deb.debian.org/debian/ jessie main" > /etc/apt/sources.list \ 7 | && echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ 8 | && echo "Acquire::Check-Valid-Until false;" >> /etc/apt/apt.conf.d/10-nocheckvalid \ 9 | && echo 'Package: *\nPin: origin "archive.debian.org"\nPin-Priority: 500' >> /etc/apt/preferences.d/10-archive-pin; \ 10 | fi \ 11 | && apt-get update -qq \ 12 | && DEBIAN_FRONTEND=noninteractive apt-get -s dist-upgrade | grep "^Inst" | \ 13 | grep -i securi | awk -F " " '{print $2}' | \ 14 | xargs apt-get -qq -y --no-install-recommends install \ 15 | \ 16 | # Clean the image \ 17 | && apt-get autoremove -qq \ 18 | && apt-get clean \ 19 | && rm -rf /var/lib/apt/lists/* \ 20 | -------------------------------------------------------------------------------- /couchdb/README.md: -------------------------------------------------------------------------------- 1 | # CouchDB 1.6 2 | 3 | In a docker-compose.yml: 4 | ```yml 5 | version: '3' 6 | services: 7 | database: 8 | image: quay.io/continuouspipe/couchdb1.6:latest 9 | environment: 10 | COUCHDB_USER: "myAdminUser" 11 | COUCHDB_PASSWORD: "A secret password for myAdminUser" 12 | ``` 13 | 14 | In a Dockerfile: 15 | ```Dockerfile 16 | FROM quay.io/continuouspipe/couchdb1.6:latest 17 | ``` 18 | 19 | ## How to build 20 | ```bash 21 | ./build.sh 22 | docker-compose build --pull couchdb16 23 | docker-compose push couchdb16 24 | ``` 25 | 26 | ## About 27 | 28 | This is a Docker image for CouchDB which tracks the upstream official image. 29 | 30 | We heavily advise against exposing this image to the internet. 31 | 32 | You should also consider making `/usr/local/var/lib/couchdb` a volume to persist data across container starts. 33 | 34 | ## How to use 35 | 36 | As this is based on the library CouchDB image, see their README on 37 | [The Docker Hub](https://hub.docker.com/_/couchdb/). 38 | 39 | ### Authentication 40 | 41 | Authentication can be enabled by setting the environment variables COUCHDB_USER and COUCHDB_PASSWORD. 42 | -------------------------------------------------------------------------------- /docker-compose.eol.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | magento1_php55_nginx: 4 | build: 5 | context: ./magento1/ 6 | args: 7 | FROM_IMAGE: eol-php5.5-nginx 8 | WEB_SERVER: nginx 9 | image: quay.io/continuouspipe/eol-magento1-nginx-php5.5:latest 10 | depends_on: 11 | - php55_nginx 12 | 13 | php55_nginx: 14 | build: 15 | context: ./php/ 16 | dockerfile: Dockerfile-nginx-phpsource 17 | args: 18 | PHP_FULL_VERSION: '5.5.38' 19 | image: quay.io/continuouspipe/eol-php5.5-nginx:latest 20 | depends_on: 21 | - ubuntu 22 | -------------------------------------------------------------------------------- /docker-compose.test.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | tests: 4 | build: 5 | context: . 6 | volumes: 7 | - .:/app 8 | depends_on: 9 | - ubuntu 10 | -------------------------------------------------------------------------------- /drupal/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG PHP_VERSION 2 | ARG FROM_TAG=latest 3 | FROM quay.io/continuouspipe/php${PHP_VERSION}-apache:${FROM_TAG} 4 | 5 | RUN curl -sL https://deb.nodesource.com/setup_7.x > /tmp/install-node.sh \ 6 | && bash /tmp/install-node.sh \ 7 | && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ 8 | && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ 9 | && apt-get update -qq -y \ 10 | && DEBIAN_FRONTEND=noninteractive apt-get -qq -y --no-install-recommends install \ 11 | mysql-client \ 12 | nodejs \ 13 | yarn \ 14 | \ 15 | # Clean the image \ 16 | && apt-get auto-remove -qq -y \ 17 | && apt-get clean \ 18 | && rm -rf /var/lib/apt/lists/* \ 19 | # Enable headers and expires modules \ 20 | && a2enmod expires \ 21 | && a2enmod headers \ 22 | \ 23 | # Install Drupal's CLI tool \ 24 | && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ 25 | && chmod a+x /usr/local/bin/drupal 26 | 27 | USER build 28 | 29 | # Install Drupal's Drush tool 30 | RUN composer global require drush/drush:~8.1.10 \ 31 | && composer global clear-cache 32 | 33 | USER root 34 | 35 | RUN ln -s /home/build/.composer/vendor/bin/drush /usr/local/bin/ 36 | 37 | COPY ./etc/ /etc 38 | COPY ./usr/ /usr 39 | -------------------------------------------------------------------------------- /drupal/etc/confd/templates/apache/site_base.conf.tmpl: -------------------------------------------------------------------------------- 1 | DocumentRoot {{ getenv "WEB_DIRECTORY" }} 2 | 3 | 4 | Options FollowSymLinks 5 | # Use the .htaccess provided by Drupal (for now) 6 | AllowOverride All 7 | Require all granted 8 | 9 | -------------------------------------------------------------------------------- /drupal/usr/local/share/container/baseimage-30.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source /usr/local/share/drupal/drupal_functions.sh 4 | 5 | ##### 6 | # Tasks here happen during the bulding of the Dockerfile, and cannot rely on 7 | # other services being available. 8 | ##### 9 | alias_function do_build do_drupal_build_inner 10 | do_build() { 11 | do_drupal_build_inner 12 | do_drupal_build 13 | } 14 | 15 | ##### 16 | # Tasks here are run when the container is started, and all services should be 17 | # available. 18 | #### 19 | alias_function do_start do_drupal_start_inner 20 | do_start() { 21 | do_drupal_start_inner 22 | do_drupal_start 23 | } 24 | 25 | alias_function do_development_start do_drupal_development_start_inner 26 | do_development_start() { 27 | do_drupal_development_start_inner 28 | do_drupal_development_start 29 | } 30 | 31 | alias_function do_setup do_drupal_setup_inner 32 | do_setup() { 33 | do_drupal_setup_inner 34 | do_drupal_install 35 | do_drupal_legacy_install_script 36 | do_drupal_legacy_install_finalise_script 37 | } 38 | -------------------------------------------------------------------------------- /drupal/usr/local/share/env/60-framework: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Support older configurations by setting original env vars 4 | export DRUPAL_DATABASE_NAME=${DATABASE_NAME} 5 | export DRUPAL_DATABASE_USERNAME=${DATABASE_USER} 6 | export DRUPAL_DATABASE_PASSWORD=${DATABASE_PASSWORD} 7 | export DRUPAL_DATABASE_PREFIX=${DATABASE_PREFIX} 8 | export DRUPAL_DATABASE_HOST=${DATABASE_HOST} 9 | export DRUPAL_DATABASE_PORT=${DATABASE_PORT} 10 | export DATABASE_HOST_PORT=${DATABASE_PORT} 11 | -------------------------------------------------------------------------------- /drupal8-solr/4.10/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG FROM_TAG=latest 2 | FROM quay.io/continuouspipe/solr4:${FROM_TAG} 3 | 4 | ENV SOLR_CORE_NAME=d8 5 | 6 | RUN mkdir -p /usr/local/share/solr/d8/data/tlog \ 7 | && chown -R solr:solr /usr/local/share/solr/d8/data/ 8 | 9 | COPY ./usr/ /usr 10 | -------------------------------------------------------------------------------- /drupal8-solr/4.10/README.md: -------------------------------------------------------------------------------- 1 | # Drupal 8: Solr 4.10 2 | 3 | In a docker-compose.yml: 4 | ```yml 5 | version: '3' 6 | services: 7 | solr: 8 | image: quay.io/continuouspipe/drupal8-solr4:latest 9 | volumes: 10 | - solr_data:/usr/local/share/solr/d8/data/ 11 | 12 | volumes: 13 | solr_data: 14 | driver: local 15 | driver_opts: 16 | type: tmpfs 17 | device: tmpfs 18 | o: size=100m,uid=1000 19 | ``` 20 | 21 | ```Dockerfile 22 | FROM quay.io/continuouspipe/drupal8-solr4:latest 23 | ``` 24 | 25 | ## How to build 26 | ```bash 27 | docker-compose build drupal8_solr_4_10 28 | docker-compose push drupal8_solr_4_10 29 | ``` 30 | 31 | ## About 32 | 33 | This is a Docker image that provides a Solr 4 search service that has been configured for use with the Drupal 8 module, https://www.drupal.org/project/search_api_solr . 34 | 35 | ## How to use 36 | 37 | We automatically configure a "d8" solr core, which is passed in as the SOLR_CORE_NAME variable. 38 | The config was fetched from https://www.drupal.org/project/search_api_solr on Nov 9, 2016. 39 | 40 | As this is based off of a semi-official solr image, please see their README, here: 41 | https://hub.docker.com/r/makuk66/docker-solr/builds/bxsjvchebmrgdmbtjabbta3/ 42 | 43 | We are also based off of a parent image within this repository. Check out [the solr 4.10 image](../../solr/4.10). 44 | -------------------------------------------------------------------------------- /drupal8-solr/4.10/usr/local/share/solr/d8/conf/elevate.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 | 22 | 23 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /drupal8-solr/4.10/usr/local/share/solr/d8/conf/mapping-ISOLatin1Accent.txt: -------------------------------------------------------------------------------- 1 | # This file contains character mappings for the default fulltext field type. 2 | # The source characters (on the left) will be replaced by the respective target 3 | # characters before any other processing takes place. 4 | # Lines starting with a pound character # are ignored. 5 | # 6 | # For sensible defaults, use the mapping-ISOLatin1Accent.txt file distributed 7 | # with the example application of your Solr version. 8 | # 9 | # Examples: 10 | # "À" => "A" 11 | # "\u00c4" => "A" 12 | # "\u00c4" => "\u0041" 13 | # "æ" => "ae" 14 | # "\n" => " " 15 | -------------------------------------------------------------------------------- /drupal8-solr/4.10/usr/local/share/solr/d8/conf/protwords.txt: -------------------------------------------------------------------------------- 1 | #----------------------------------------------------------------------- 2 | # This file blocks words from being operated on by the stemmer and word delimiter. 3 | & 4 | < 5 | > 6 | ' 7 | " 8 | -------------------------------------------------------------------------------- /drupal8-solr/4.10/usr/local/share/solr/d8/conf/solrcore.properties: -------------------------------------------------------------------------------- 1 | # Defines Solr properties for this specific core. 2 | solr.replication.master=false 3 | solr.replication.slave=false 4 | solr.replication.pollInterval=00:00:60 5 | solr.replication.masterUrl=http://localhost:8983/solr 6 | solr.replication.confFiles=schema.xml,mapping-ISOLatin1Accent.txt,protwords.txt,stopwords.txt,synonyms.txt,elevate.xml 7 | solr.mlt.timeAllowed=2000 8 | # You should not set your luceneMatchVersion to anything lower than your Solr 9 | # Version. 10 | solr.luceneMatchVersion=LUCENE_40 11 | solr.pinkPony.timeAllowed=-1 12 | # autoCommit after 10000 docs 13 | solr.autoCommit.MaxDocs=10000 14 | # autoCommit after 2 minutes 15 | solr.autoCommit.MaxTime=120000 16 | # autoSoftCommit after 2000 docs 17 | solr.autoSoftCommit.MaxDocs=2000 18 | # autoSoftCommit after 10 seconds 19 | solr.autoSoftCommit.MaxTime=10000 20 | solr.contrib.dir=../../../contrib 21 | -------------------------------------------------------------------------------- /drupal8-solr/4.10/usr/local/share/solr/d8/conf/stopwords.txt: -------------------------------------------------------------------------------- 1 | # Contains words which shouldn't be indexed for fulltext fields, e.g., because 2 | # they're too common. For documentation of the format, see 3 | # http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.StopFilterFactory 4 | # (Lines starting with a pound character # are ignored.) 5 | -------------------------------------------------------------------------------- /drupal8-solr/4.10/usr/local/share/solr/d8/conf/synonyms.txt: -------------------------------------------------------------------------------- 1 | # Contains synonyms to use for your index. For the format used, see 2 | # http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.SynonymFilterFactory 3 | # (Lines starting with a pound character # are ignored.) 4 | -------------------------------------------------------------------------------- /drupal8-solr/6.2/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG FROM_TAG=latest 2 | FROM quay.io/continuouspipe/solr6:${FROM_TAG} 3 | 4 | ENV SOLR_CORE_NAME=d8 5 | COPY ./docker-entrypoint-initdb.d/ /docker-entrypoint-initdb.d 6 | COPY ./usr/ /usr 7 | -------------------------------------------------------------------------------- /drupal8-solr/6.2/README.md: -------------------------------------------------------------------------------- 1 | # Drupal 8: Solr 6.2 2 | 3 | In a docker-compose.yml: 4 | ```yml 5 | version: '3' 6 | services: 7 | solr: 8 | image: quay.io/continuouspipe/drupal8-solr6:latest 9 | volumes: 10 | - solr_data:/usr/local/share/solr/d8/data/ 11 | 12 | volumes: 13 | solr_data: 14 | driver: local 15 | driver_opts: 16 | type: tmpfs 17 | device: tmpfs 18 | o: size=100m,uid=1000 19 | ``` 20 | 21 | ```Dockerfile 22 | FROM quay.io/continuouspipe/drupal8-solr6:latest 23 | ``` 24 | 25 | ## How to build 26 | ```bash 27 | docker-compose build drupal8_solr_6_2 28 | docker-compose push drupal8_solr_6_2 29 | ``` 30 | 31 | ## About 32 | 33 | This is a Docker image that provides a Solr 6 search service that has been configured for use with the Drupal 8 module, https://www.drupal.org/project/search_api_solr . 34 | 35 | ## How to use 36 | 37 | We automatically configure a "d8" solr core, which is passed in as the SOLR_CORE_NAME variable. 38 | The config was fetched from https://www.drupal.org/project/search_api_solr on Nov 9, 2016. 39 | 40 | As this is based off of an official solr image, please see their README, here: 41 | https://hub.docker.com/_/solr/ 42 | -------------------------------------------------------------------------------- /drupal8-solr/6.2/docker-entrypoint-initdb.d/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/continuouspipe/dockerfiles/f89d6857af09999f928ca022d131298f474adb7d/drupal8-solr/6.2/docker-entrypoint-initdb.d/.gitkeep -------------------------------------------------------------------------------- /drupal8-solr/6.2/usr/local/share/solr/elevate.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 | 22 | 23 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /drupal8-solr/6.2/usr/local/share/solr/mapping-ISOLatin1Accent.txt: -------------------------------------------------------------------------------- 1 | # This file contains character mappings for the default fulltext field type. 2 | # The source characters (on the left) will be replaced by the respective target 3 | # characters before any other processing takes place. 4 | # Lines starting with a pound character # are ignored. 5 | # 6 | # For sensible defaults, use the mapping-ISOLatin1Accent.txt file distributed 7 | # with the example application of your Solr version. 8 | # 9 | # Examples: 10 | # "À" => "A" 11 | # "\u00c4" => "A" 12 | # "\u00c4" => "\u0041" 13 | # "æ" => "ae" 14 | # "\n" => " " 15 | -------------------------------------------------------------------------------- /drupal8-solr/6.2/usr/local/share/solr/protwords.txt: -------------------------------------------------------------------------------- 1 | #----------------------------------------------------------------------- 2 | # This file blocks words from being operated on by the stemmer and word delimiter. 3 | & 4 | < 5 | > 6 | ' 7 | " 8 | -------------------------------------------------------------------------------- /drupal8-solr/6.2/usr/local/share/solr/schema_legacy_types.xml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /drupal8-solr/6.2/usr/local/share/solr/solrcore.properties: -------------------------------------------------------------------------------- 1 | # Defines Solr properties for this specific core. 2 | solr.replication.master=false 3 | solr.replication.slave=false 4 | solr.replication.pollInterval=00:00:60 5 | solr.replication.masterUrl=http://localhost:8983/solr 6 | solr.replication.confFiles=schema.xml,mapping-ISOLatin1Accent.txt,protwords.txt,stopwords.txt,synonyms.txt,elevate.xml 7 | solr.mlt.timeAllowed=2000 8 | # You should not set your luceneMatchVersion to anything lower than your Solr 9 | # Version. 10 | solr.luceneMatchVersion=6.0 11 | solr.selectSearchHandler.timeAllowed=-1 12 | # autoCommit after 10000 docs 13 | solr.autoCommit.MaxDocs=10000 14 | # autoCommit after 2 minutes 15 | solr.autoCommit.MaxTime=120000 16 | # autoSoftCommit after 2000 docs 17 | solr.autoSoftCommit.MaxDocs=2000 18 | # autoSoftCommit after 10 seconds 19 | solr.autoSoftCommit.MaxTime=10000 20 | solr.contrib.dir=../../../contrib 21 | -------------------------------------------------------------------------------- /drupal8-solr/6.2/usr/local/share/solr/stopwords.txt: -------------------------------------------------------------------------------- 1 | # Contains words which shouldn't be indexed for fulltext fields, e.g., because 2 | # they're too common. For documentation of the format, see 3 | # http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.StopFilterFactory 4 | # (Lines starting with a pound character # are ignored.) 5 | -------------------------------------------------------------------------------- /drupal8-solr/6.2/usr/local/share/solr/synonyms.txt: -------------------------------------------------------------------------------- 1 | # Contains synonyms to use for your index. For the format used, see 2 | # http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.SynonymFilterFactory 3 | # (Lines starting with a pound character # are ignored.) 4 | -------------------------------------------------------------------------------- /drupal8-varnish/4.0/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG FROM_TAG=latest 2 | FROM quay.io/continuouspipe/varnish4:${FROM_TAG} 3 | 4 | COPY ./etc/ /etc/ 5 | COPY ./usr/ /usr/ 6 | -------------------------------------------------------------------------------- /drupal8-varnish/4.0/README.md: -------------------------------------------------------------------------------- 1 | # Drupal 8: Varnish 2 | 3 | In a docker-compose.yml: 4 | ```yml 5 | version: '3' 6 | services: 7 | varnish: 8 | image: quay.io/continuouspipe/drupal8-varnish4:latest 9 | environment: 10 | VARNISH_SECRET: "A secret that should remain secret!" 11 | ``` 12 | 13 | In a Dockerfile: 14 | ```Dockerfile 15 | FROM quay.io/continuouspipe/drupal8-varnish4:latest 16 | ``` 17 | 18 | ## How to build 19 | ```bash 20 | docker-compose build drupal8_varnish 21 | docker-compose push drupal8_varnish 22 | ``` 23 | 24 | ## About 25 | 26 | This is a Docker image that provides a Varnish HTTP Cache service customised for Drupal 8. 27 | It may work for Drupal 7 too! 28 | 29 | ## How to use 30 | 31 | ### Environment variables 32 | 33 | The following environment variables are supported 34 | 35 | Variable | Description | Expected values | Default 36 | ---|---|---|--- 37 | DRUPAL_CACHE_ERRORS | If "true", varnish will cache responses with HTTP Codes 404, 301 or 500 for 10 minutes to protect the web server. | true/false | true 38 | 39 | We configure the varnish config file, `/etc/varnish/default.vcl` to be one from 40 | [geerlingguy's Drupal VM](https://raw.githubusercontent.com/geerlingguy/drupal-vm/3.5.2/provisioning/templates/drupalvm.vcl.j2) 41 | 42 | As for all images based on the ubuntu base image, see 43 | [the base image README](../../ubuntu/16.04/README.md) 44 | -------------------------------------------------------------------------------- /drupal8-varnish/4.0/etc/confd/conf.d/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/continuouspipe/dockerfiles/f89d6857af09999f928ca022d131298f474adb7d/drupal8-varnish/4.0/etc/confd/conf.d/.gitkeep -------------------------------------------------------------------------------- /drupal8-varnish/4.0/etc/supervisor/conf.d/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/continuouspipe/dockerfiles/f89d6857af09999f928ca022d131298f474adb7d/drupal8-varnish/4.0/etc/supervisor/conf.d/.gitkeep -------------------------------------------------------------------------------- /drupal8-varnish/4.0/usr/local/share/env/30-framework: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DRUPAL_CACHE_ERRORS=${DRUPAL_CACHE_ERRORS:-true} 3 | export DRUPAL_CACHE_ERRORS 4 | -------------------------------------------------------------------------------- /elasticsearch/Dockerfile-dockerhub: -------------------------------------------------------------------------------- 1 | ARG FROM_TAG 2 | FROM elasticsearch:${FROM_TAG} 3 | 4 | ARG FROM_TAG 5 | RUN if [ "$FROM_TAG" = "1.7" ]; then \ 6 | echo "deb http://deb.debian.org/debian/ jessie main" > /etc/apt/sources.list \ 7 | && echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ 8 | && echo "deb http://archive.debian.org/debian/ jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list \ 9 | && echo "deb-src http://archive.debian.org/debian/ jessie-backports main" >> /etc/apt/sources.list.d/jessie-backports.list \ 10 | && echo "Acquire::Check-Valid-Until false;" >> /etc/apt/apt.conf.d/10-nocheckvalid \ 11 | && echo 'Package: *\nPin: origin "archive.debian.org"\nPin-Priority: 500' >> /etc/apt/preferences.d/10-archive-pin; \ 12 | fi \ 13 | && apt-get update -qq \ 14 | && DEBIAN_FRONTEND=noninteractive apt-get -s dist-upgrade | grep "^Inst" | \ 15 | grep -i securi | awk -F " " '{print $2}' | \ 16 | xargs apt-get -qq -y --no-install-recommends install \ 17 | \ 18 | # Clean the image \ 19 | && apt-get autoremove -qq \ 20 | && apt-get clean \ 21 | && rm -rf /var/lib/apt/lists/* 22 | -------------------------------------------------------------------------------- /elasticsearch/Dockerfile-elastic: -------------------------------------------------------------------------------- 1 | ARG FROM_TAG 2 | FROM docker.elastic.co/elasticsearch/elasticsearch:${FROM_TAG} 3 | 4 | USER root 5 | RUN yum makecache fast && yum upgrade -y && yum clean all 6 | USER elasticsearch 7 | -------------------------------------------------------------------------------- /ezplatform/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG PHP_VERSION 2 | ARG FROM_TAG=latest 3 | FROM quay.io/continuouspipe/symfony-php${PHP_VERSION}-apache:${FROM_TAG} 4 | 5 | COPY ./etc/ /etc/ 6 | COPY ./usr/ /usr/ 7 | -------------------------------------------------------------------------------- /ezplatform/etc/confd/conf.d/apache2_site_additional_rewrites.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/site_additional_rewrites.conf.tmpl" 3 | dest = "/etc/apache2/sites-available/000-default-15-additional_rewrites.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /ezplatform/etc/confd/conf.d/apache2_site_caching.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/site_caching.conf.tmpl" 3 | dest = "/etc/apache2/sites-available/000-default-30-site_caching.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /ezplatform/etc/confd/templates/apache/site_additional_rewrites.conf.tmpl: -------------------------------------------------------------------------------- 1 | RewriteEngine On 2 | 3 | # For FastCGI mode or when using PHP-FPM, to get basic auth working. 4 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 5 | 6 | # Cluster/streamed files rewrite rules. Enable on cluster with DFS as a binary data handler 7 | #RewriteRule ^/var/([^/]+/)?storage/images(-versioned)?/.* /app.php [L] 8 | RewriteRule ^/var/([^/]+/)?storage/images(-versioned)?/.* - [L] 9 | 10 | # Makes it possible to place your favicon at the root of your eZ Platform instance. 11 | # It will then be served directly. 12 | RewriteRule ^/favicon\.ico - [L] 13 | 14 | # Give direct access to robots.txt for use by crawlers (Google, Bing, etc...) 15 | RewriteRule ^/robots\.txt - [L] 16 | 17 | # Platform for Privacy Preferences Project ( P3P ) related files for Internet Explorer 18 | # More info here : http://en.wikipedia.org/wiki/P3p 19 | RewriteRule ^/w3c/p3p\.xml - [L] 20 | 21 | # The following rule is needed to correctly display assets from eZ Platform / Symfony bundles 22 | RewriteRule ^/bundles/ - [L] 23 | 24 | # Additional assets rules, stops 404s for assets hitting PHP 25 | RewriteRule ^/style-guide/ - [L] 26 | RewriteRule ^/images/ - [L] 27 | RewriteRule ^/(css|js|font)/.*\.(css|js|otf|eot|ttf|svg|woff) - [L] 28 | -------------------------------------------------------------------------------- /ezplatform/etc/confd/templates/apache/site_caching.conf.tmpl: -------------------------------------------------------------------------------- 1 | # Everything below is optional to improve performance by forcing 2 | # clients to cache image and design files, change the expires time 3 | # to suite project needs. 4 | 5 | 6 | # eZ Platform appends the version number to image URL (ezimage 7 | # datatype) so when an image is updated, its URL changes too 8 | ExpiresActive on 9 | ExpiresDefault "now plus 10 years" 10 | 11 | 12 | -------------------------------------------------------------------------------- /ezplatform/usr/local/share/container/baseimage-40.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source /usr/local/share/ez/ez_functions.sh 4 | 5 | alias_function do_setup do_ez_setup_inner 6 | function do_setup() { 7 | do_ez_setup_inner 8 | do_ez_setup 9 | } 10 | 11 | alias_function do_development_start do_ez_development_start_inner 12 | function do_development_start() { 13 | do_ez_development_start_inner 14 | do_setup 15 | } 16 | -------------------------------------------------------------------------------- /ezplatform/usr/local/share/env/25-framework: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export EZPLATFORM_INSTALL_PROFILE=${EZPLATFORM_INSTALL_PROFILE:-clean} 4 | 5 | export DATABASE_HOST=${DATABASE_HOST:-database} 6 | export DATABASE_NAME=${DATABASE_NAME:-ez} 7 | export DATABASE_USER=${DATABASE_USER:-ez} 8 | export DATABASE_PASSWORD=${DATABASE_PASSWORD:-PleaseChangeMeToBeASecurePassword} 9 | export SYMFONY_SECRET=${SYMFONY_SECRET:-PleaseChangeMeToBeASecureSecretString} 10 | -------------------------------------------------------------------------------- /ezplatform/usr/local/share/ez/ez_functions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_ez_setup() { 4 | do_ez_web_server_web_directory_writable 5 | do_ez_install 6 | do_ez_migrate 7 | do_ez_web_server_web_directory_non_writable 8 | } 9 | 10 | function do_ez_web_server_web_directory_writable() { 11 | mkdir -p /app/web/ 12 | if [ "${IS_CHOWN_FORBIDDEN}" != 'true' ]; then 13 | chown -R "${CODE_OWNER}:${APP_GROUP}" /app/web/ 14 | chmod -R ug+rw,o-w /app/web/ 15 | else 16 | chmod -R a+rw /app/web/ 17 | fi 18 | } 19 | 20 | function do_ez_web_server_web_directory_non_writable() { 21 | mkdir -p /app/web/ 22 | if [ "${IS_CHOWN_FORBIDDEN}" != 'true' ]; then 23 | chown -R "${CODE_OWNER}:${APP_GROUP}" /app/web/ 24 | chmod -R u+rw,og-w /app/web/ 25 | else 26 | chmod -R a+rw /app/web/ 27 | fi 28 | } 29 | 30 | function do_ez_install() { 31 | do_symfony_console ezplatform:install "${EZPLATFORM_INSTALL_PROFILE}" 32 | } 33 | 34 | function do_ez_migrate() { 35 | do_symfony_console kaliop:migration:migrate 36 | } 37 | 38 | alias_function do_ez_app_permissions do_symfony_app_permissions 39 | function do_ez_app_permissions() { 40 | mkdir -p /app/web/var/site/storage 41 | if [ "${IS_CHOWN_FORBIDDEN}" != 'true' ]; then 42 | chown -R "$APP_USER:$CODE_GROUP" /app/web/var/site/storage 43 | chmod -R ug+rw,o-w /app/web/var/site/storage 44 | else 45 | chmod -R a+rw /app/web/var/site/storage 46 | fi 47 | do_symfony_app_permissions 48 | } 49 | -------------------------------------------------------------------------------- /hem/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG FROM_TAG=latest 2 | FROM quay.io/continuouspipe/ubuntu16.04:${FROM_TAG} 3 | 4 | RUN curl -q https://dx6pc3giz7k1r.cloudfront.net/GPG-KEY-inviqa-tools | apt-key add - \ 5 | && echo "deb https://dx6pc3giz7k1r.cloudfront.net/repos/debian jessie main" | tee /etc/apt/sources.list.d/inviqa-tools.list \ 6 | && apt-get update -qq \ 7 | && apt-get -qq -y --no-install-recommends install \ 8 | build-essential \ 9 | hem \ 10 | \ 11 | # Clean the image \ 12 | && apt-get auto-remove -qq -y \ 13 | && apt-get clean \ 14 | && rm -rf /var/lib/apt/lists/* 15 | -------------------------------------------------------------------------------- /hem/README.md: -------------------------------------------------------------------------------- 1 | # Hem, for Ruby and Existing Helper Tasks 2 | 3 | In a docker-compose.yml: 4 | ```yml 5 | version: '3' 6 | services: 7 | hem: 8 | image: quay.io/continuouspipe/hem1:latest 9 | environment: 10 | AWS_ACCESS_KEY_ID: "An AWS User ID that should remain secret!" 11 | AWS_SECRET_ACCESS_KEY: "An AWS Secret Key that should remain secret!" 12 | ``` 13 | 14 | In a Dockerfile: 15 | ```Dockerfile 16 | FROM quay.io/continuouspipe/hem:latest 17 | 18 | ARG AWS_ACCESS_KEY_ID= 19 | ARG AWS_SECRET_ACCESS_KEY= 20 | 21 | RUN container build 22 | ``` 23 | 24 | ## How to build 25 | ```bash 26 | docker-compose build hem 27 | docker-compose push hem 28 | ``` 29 | 30 | ## About 31 | 32 | This is a Docker image to provide the Inviqa tool, "hem", which was originally used to manage 33 | Vagrant VMs and run installation steps on a started VM. 34 | 35 | Now, hem can be used fetch database dumps and assets from AWS and run the custom tasks that have built up over the years. 36 | 37 | ## How to use 38 | 39 | As for all images based on the ubuntu base image, see 40 | [the base image README](../../ubuntu/16.04/README.md) 41 | -------------------------------------------------------------------------------- /magento1/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG FROM_IMAGE 2 | ARG FROM_TAG=latest 3 | FROM quay.io/continuouspipe/${FROM_IMAGE}:${FROM_TAG} 4 | 5 | ARG WEB_SERVER 6 | 7 | # Install npm 8 | RUN curl -sL https://deb.nodesource.com/setup_6.x > /tmp/install-node.sh \ 9 | && bash /tmp/install-node.sh \ 10 | && apt-get update -qq -y \ 11 | && DEBIAN_FRONTEND=noninteractive apt-get -qq -y --no-install-recommends install \ 12 | nodejs \ 13 | rsyslog \ 14 | sudo \ 15 | \ 16 | # Configure Node dependencies \ 17 | && npm config set --global loglevel warn \ 18 | && npm install --global marked \ 19 | && npm install --global node-gyp \ 20 | && npm install --global gulp \ 21 | \ 22 | # Install node-sass's linux bindings \ 23 | && npm rebuild node-sass \ 24 | \ 25 | # Clean the image \ 26 | && apt-get auto-remove -qq -y \ 27 | && apt-get clean \ 28 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 29 | 30 | WORKDIR /app 31 | 32 | COPY ./etc/ ./${WEB_SERVER}/etc/ /etc/ 33 | COPY ./usr/ /usr/ 34 | -------------------------------------------------------------------------------- /magento1/apache/etc/confd/conf.d/apache2_site_magento.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/site_magento.conf.tmpl" 3 | dest = "/etc/apache2/sites-available/000-default-05-magento.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /magento1/apache/etc/confd/templates/apache/site_magento.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if eq "developer" (getenv "MAGENTO_MODE") }} 2 | SetEnv MAGE_IS_DEVELOPER_MODE 1 3 | {{ end }} 4 | 5 | RewriteEngine On 6 | 7 | RewriteRule ^/api/rest /api.php?type=rest [QSA,L] 8 | -------------------------------------------------------------------------------- /magento1/etc/confd/conf.d/magento_cron.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "magento/cron.tmpl" 3 | dest = "/etc/cron.d/magento" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /magento1/etc/confd/conf.d/magento_local.xml.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "magento/local.xml.tmpl" 3 | dest = "/app/public/app/etc/local.xml" 4 | mode = "0640" 5 | uid = 999 6 | gid = 33 7 | keys = [ 8 | ] 9 | -------------------------------------------------------------------------------- /magento1/etc/confd/conf.d/supervisor_magento_cron.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "supervisor/magento_cron.conf.tmpl" 3 | dest = "/etc/supervisor/conf.d/magento_cron.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /magento1/etc/confd/templates/magento/cron.tmpl: -------------------------------------------------------------------------------- 1 | # don't send any mail 2 | MAILTO="" 3 | SUPERVISORCTL="supervisorctl -c /etc/supervisor/supervisord.conf -u supervisor -p supervisor" 4 | 5 | * * * * * root $SUPERVISORCTL start magento-cron 6 | -------------------------------------------------------------------------------- /magento1/etc/confd/templates/supervisor/magento_cron.conf.tmpl: -------------------------------------------------------------------------------- 1 | [program:magento-cron] 2 | command = /bin/bash /app/public/cron.sh 3 | startsecs = 0 4 | startretries = 0 5 | stdout_logfile=/dev/stdout 6 | stdout_logfile_maxbytes=0 7 | stderr_logfile=/dev/stderr 8 | stderr_logfile_maxbytes=0 9 | user = {{ getenv "APP_USER"}} 10 | autostart = false 11 | autorestart = false 12 | priority = 5 13 | -------------------------------------------------------------------------------- /magento1/nginx/etc/confd/conf.d/nginx_site_magento.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_magento.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-05-site_magento.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /magento1/nginx/etc/confd/templates/nginx/site_magento.conf.tmpl: -------------------------------------------------------------------------------- 1 | rewrite ^/api/rest /api.php?type=rest last; 2 | -------------------------------------------------------------------------------- /magento1/nginx/etc/confd/templates/nginx/site_phpfpm.conf.tmpl: -------------------------------------------------------------------------------- 1 | location ~ \.php(/|$) { 2 | fastcgi_pass unix:/run/php5.6-fpm.sock; 3 | fastcgi_split_path_info ^(.+\.php)(/.*)$; 4 | include fastcgi_params; 5 | fastcgi_param HTTPS $custom_https if_not_empty; 6 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 7 | 8 | fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; 9 | fastcgi_param PATH_INFO $fastcgi_path_info; 10 | fastcgi_param HTTP_PROXY ""; 11 | 12 | {{ if eq "developer" (getenv "MAGENTO_MODE") }} 13 | fastcgi_param MAGE_IS_DEVELOPER_MODE 1; 14 | {{ end }} 15 | } 16 | -------------------------------------------------------------------------------- /magento1/nginx/etc/nginx/sites-available/default-05_site_deny.conf: -------------------------------------------------------------------------------- 1 | location ~ ^/errors/.*\.(xml|phtml)$ { 2 | deny all; 3 | } 4 | location ~ ^/var(/|$) { 5 | deny all; 6 | } 7 | location ~ ^/skin(/|$) { } 8 | location ~ ^/shell(/|$) { 9 | deny all; 10 | } 11 | location ~ ^/report/config\.xml(/|$) { 12 | deny all; 13 | } 14 | location ~ ^(/index\.php)?/?(.+/)?rss/(catalog/(notifystock|review)|order/new)(/|$) { 15 | deny all; 16 | } 17 | location ~ ^/pkginfo(/|$) { 18 | deny all; 19 | } 20 | location ~ ^/php\.ini\.sample(/|$) { 21 | deny all; 22 | } 23 | location ~ ^/media/downloadable(/|$) { 24 | deny all; 25 | } 26 | location ~ ^/media/customer(/|$) { 27 | deny all; 28 | } 29 | location ~ ^/media/custom_options(/|$) { 30 | deny all; 31 | } 32 | location ~ ^/media(/|$) { } 33 | location ~ ^/mage(/|$) { 34 | deny all; 35 | } 36 | location ~ ^/lib(/|$) { 37 | deny all; 38 | } 39 | location ~ ^/install\.php(/|$) { 40 | deny all; 41 | } 42 | location ~ ^/index\.php\.sample(/|$) { 43 | deny all; 44 | } 45 | location ~ ^/includes(/|$) { 46 | deny all; 47 | } 48 | location ~ ^/downloader(/|$) { 49 | deny all; 50 | } 51 | location ~ ^/dev(/|$) { 52 | deny all; 53 | } 54 | location ~ ^/cron\.sh(/|$) { 55 | deny all; 56 | } 57 | location ~ ^/cron\.php(/|$) { 58 | deny all; 59 | } 60 | location ~ ^/composer\.json(/|$) { 61 | deny all; 62 | } 63 | location ~ ^/app(/|$) { 64 | deny all; 65 | } 66 | location ~ /\.ht[^/]*$ { 67 | deny all; 68 | } 69 | location ~ ^/RELEASE_NOTES\.txt(/|$) { 70 | deny all; 71 | } 72 | location ~ ^/\.gitignore(/|$) { 73 | deny all; 74 | } 75 | -------------------------------------------------------------------------------- /magento1/usr/local/share/container/baseimage-30.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source /usr/local/share/magento1/magento_functions.sh 4 | 5 | alias_function do_build do_magento_build_inner 6 | do_build() { 7 | do_magento_build_inner 8 | do_magento_build 9 | } 10 | 11 | alias_function do_assets_apply_file_permissions do_magento_assets_apply_file_permissions_inner 12 | do_assets_apply_file_permissions() { 13 | do_magento_assets_apply_file_permissions_inner 14 | if [ "${TASK}" == "start" ] && [ "${DEVELOPMENT_MODE}" == "false" ]; then 15 | # do_magento_build runs this, but if applied during do_start in non-dev, 16 | # this needs to be run 17 | do_magento_directory_permissions 18 | fi 19 | } 20 | 21 | alias_function do_development_start do_magento_development_start_inner 22 | do_development_start() { 23 | do_magento_development_start_inner 24 | do_magento_development_start 25 | } 26 | 27 | alias_function do_templating do_magento_templating_inner 28 | do_templating() { 29 | do_magento_templating 30 | do_magento_templating_inner 31 | } 32 | 33 | do_magento_development_start() { 34 | do_magento_build 35 | do_magento_development_build 36 | } 37 | 38 | alias_function do_setup do_magento_setup_inner 39 | do_setup() { 40 | do_magento_setup_inner 41 | do_templating 42 | do_magento_setup 43 | } 44 | -------------------------------------------------------------------------------- /magento1/usr/local/share/env/60-framework: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Relative MAGE_ROOT converted to absolute path 4 | if ! [[ "$MAGE_ROOT" =~ ^/ ]]; then 5 | export MAGE_ROOT=${WORK_DIRECTORY}/${MAGE_ROOT} 6 | fi 7 | 8 | if [ "$WEB_HTTPS_ONLY" == "true" ]; then 9 | PUBLIC_ADDRESS_UNSECURE_SCHEME=https 10 | else 11 | PUBLIC_ADDRESS_UNSECURE_SCHEME=http 12 | fi 13 | 14 | if [ "$WEB_HTTPS" == "true" ] || [ "$WEB_HTTPS_OFFLOADED" == "true" ] || [ "$WEB_REVERSE_PROXIED" == "true" ]; then 15 | PUBLIC_ADDRESS_SECURE_SCHEME=https 16 | else 17 | PUBLIC_ADDRESS_SECURE_SCHEME=http 18 | fi 19 | 20 | if [ -n "${PUBLIC_ADDRESS:-}" ]; then 21 | echo 'deprecated: PUBLIC_ADDRESS is deprecated, please set WEB_HOST or PUBLIC_ADDRESS_UNSECURE/PUBLIC_ADDRESS_SECURE instead' >&2 22 | 23 | export PUBLIC_ADDRESS_UNSECURE=${PUBLIC_ADDRESS_UNSECURE:-$PUBLIC_ADDRESS} 24 | export PUBLIC_ADDRESS_SECURE=${PUBLIC_ADDRESS_SECURE:-$PUBLIC_ADDRESS} 25 | else 26 | export PUBLIC_ADDRESS_UNSECURE=${PUBLIC_ADDRESS_UNSECURE:-$PUBLIC_ADDRESS_UNSECURE_SCHEME://$WEB_HOST/} 27 | export PUBLIC_ADDRESS_SECURE=${PUBLIC_ADDRESS_SECURE:-$PUBLIC_ADDRESS_SECURE_SCHEME://$WEB_HOST/} 28 | 29 | # for deprecated BC 30 | export PUBLIC_ADDRESS=${PUBLIC_ADDRESS_SECURE} 31 | fi 32 | -------------------------------------------------------------------------------- /magento2-varnish/4.0/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG FROM_TAG=latest 2 | FROM quay.io/continuouspipe/varnish4:${FROM_TAG} 3 | 4 | COPY ./etc/ /etc/ 5 | COPY ./usr/ /usr/ 6 | -------------------------------------------------------------------------------- /magento2-varnish/4.0/etc/confd/conf.d/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/continuouspipe/dockerfiles/f89d6857af09999f928ca022d131298f474adb7d/magento2-varnish/4.0/etc/confd/conf.d/.gitkeep -------------------------------------------------------------------------------- /magento2-varnish/4.0/etc/supervisor/conf.d/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/continuouspipe/dockerfiles/f89d6857af09999f928ca022d131298f474adb7d/magento2-varnish/4.0/etc/supervisor/conf.d/.gitkeep -------------------------------------------------------------------------------- /magento2-varnish/4.0/usr/local/share/env/30-framework: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export MAGENTO_MODE=${MAGENTO_MODE:-production} 4 | export PURGE_IPS=${PURGE_IPS:-\"172.0.0.0\"/8,\"10.0.0.0\"/8} 5 | 6 | MAGENTO_USE_SEPARATE_ADMIN_CONTAINER=${MAGENTO_USE_SEPARATE_ADMIN_CONTAINER:-false} 7 | MAGENTO_USE_SEPARATE_ADMIN_CONTAINER="$(convert_to_boolean_string "$MAGENTO_USE_SEPARATE_ADMIN_CONTAINER")" 8 | export MAGENTO_USE_SEPARATE_ADMIN_CONTAINER 9 | 10 | export MAGENTO_ADMIN_FRONTNAME_REGEX_ESCAPED=${MAGENTO_ADMIN_FRONTNAME_REGEX_ESCAPED:-admin} 11 | 12 | export MAGENTO_ADMIN_BACKEND_HOST=${MAGENTO_ADMIN_BACKEND_HOST:-admin} 13 | export MAGENTO_ADMIN_BACKEND_PORT=${MAGENTO_ADMIN_BACKEND_PORT:-80} 14 | 15 | MAGENTO_USE_ADMIN_CONTAINER_FOR_MEDIA=${MAGENTO_USE_ADMIN_CONTAINER_FOR_MEDIA:-false} 16 | MAGENTO_USE_ADMIN_CONTAINER_FOR_MEDIA="$(convert_to_boolean_string "$MAGENTO_USE_ADMIN_CONTAINER_FOR_MEDIA")" 17 | export MAGENTO_USE_ADMIN_CONTAINER_FOR_MEDIA 18 | 19 | export MAGENTO_MAX_EXECUTION_TIME=${MAGENTO_MAX_EXECUTION_TIME:-61} 20 | export MAGENTO_ADMIN_MAX_EXECUTION_TIME=${MAGENTO_ADMIN_MAX_EXECUTION_TIME:-61} 21 | -------------------------------------------------------------------------------- /magento2/etc/confd/conf.d/hem-config.yaml.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "hem/config.yaml.tmpl" 3 | dest = "/home/build/.hem/config.yaml" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /magento2/etc/confd/conf.d/magento_config.php.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "magento/config.php.tmpl" 3 | dest = "/app/app/etc/config.php" 4 | mode = "0640" 5 | uid = 999 6 | gid = 33 7 | keys = [ 8 | ] 9 | -------------------------------------------------------------------------------- /magento2/etc/confd/conf.d/magento_cron.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "magento/cron.tmpl" 3 | dest = "/etc/cron.d/magento" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /magento2/etc/confd/conf.d/magento_echo_reports_cron.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "magento/echo_reports_cron.tmpl" 3 | dest = "/etc/cron.d/echo_reports" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /magento2/etc/confd/conf.d/magento_env.php.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "magento/env.php.tmpl" 3 | dest = "/app/app/etc/env.php" 4 | mode = "0660" 5 | uid = 999 6 | gid = 33 7 | keys = [ 8 | ] 9 | -------------------------------------------------------------------------------- /magento2/etc/confd/conf.d/nginx_admin_htpasswd.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/admin_htpasswd.tmpl" 3 | dest = "/etc/nginx/admin_htpasswd" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /magento2/etc/confd/conf.d/nginx_php_upstream.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/php_upstream.conf.tmpl" 3 | dest = "/etc/nginx/conf.d/php_upstream.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /magento2/etc/confd/conf.d/nginx_protect_admin.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_protect_admin.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-10-protect_admin.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /magento2/etc/confd/conf.d/nginx_run_code_mapping.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/run_code_mapping.conf.tmpl" 3 | dest = "/etc/nginx/conf.d/run_code_mapping.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /magento2/etc/confd/conf.d/nginx_site_media.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_media.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-16-media.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /magento2/etc/confd/conf.d/nginx_site_pub.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_pub.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-14-pub.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /magento2/etc/confd/conf.d/nginx_site_root.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_root.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-13-root.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /magento2/etc/confd/conf.d/nginx_site_setup.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_setup.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-11-setup.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /magento2/etc/confd/conf.d/nginx_site_static.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_static.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-15-static.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /magento2/etc/confd/conf.d/nginx_site_update.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_update.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-12-update.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /magento2/etc/confd/conf.d/supervisor_echo_magento_reports.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "supervisor/echo_magento_reports.conf.tmpl" 3 | dest = "/etc/supervisor/conf.d/echo_magento_reports.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /magento2/etc/confd/conf.d/supervisor_magento_cron.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "supervisor/magento_cron.conf.tmpl" 3 | dest = "/etc/supervisor/conf.d/magento_cron.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /magento2/etc/confd/templates/hem/config.yaml.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | :aws: 3 | access_key_id: {{ getenv "AWS_ACCESS_KEY_ID" }} 4 | secret_access_key: {{ getenv "AWS_SECRET_ACCESS_KEY" }} 5 | -------------------------------------------------------------------------------- /magento2/etc/confd/templates/magento/cron.tmpl: -------------------------------------------------------------------------------- 1 | # don't send any mail 2 | MAILTO="" 3 | SUPERVISORCTL="supervisorctl -c /etc/supervisor/supervisord.conf -u supervisor -p supervisor" 4 | 5 | {{ if eq "true" (getenv "RUN_MAGENTO_CRON") }} 6 | * * * * * root $SUPERVISORCTL start magento-cron 7 | {{ end }} 8 | -------------------------------------------------------------------------------- /magento2/etc/confd/templates/magento/echo_reports_cron.tmpl: -------------------------------------------------------------------------------- 1 | # don't send any mail 2 | MAILTO="" 3 | SUPERVISORCTL="supervisorctl -c /etc/supervisor/supervisord.conf -u supervisor -p supervisor" 4 | 5 | {{ if eq "true" (getenv "RUN_REPORTS_CRON") }} 6 | * * * * * root $SUPERVISORCTL start echo_magento_reports 7 | {{ end }} 8 | -------------------------------------------------------------------------------- /magento2/etc/confd/templates/nginx/admin_htpasswd.tmpl: -------------------------------------------------------------------------------- 1 | {{ if getenv "MAGENTO_ADMIN_HTPASSWD" }} 2 | {{ getenv "MAGENTO_ADMIN_HTPASSWD" }} 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /magento2/etc/confd/templates/nginx/php_upstream.conf.tmpl: -------------------------------------------------------------------------------- 1 | upstream php-fpm { 2 | server unix:///var/run/php{{ getenv "PHP_VERSION" }}-fpm.sock; 3 | } 4 | -------------------------------------------------------------------------------- /magento2/etc/confd/templates/nginx/run_code_mapping.conf.tmpl: -------------------------------------------------------------------------------- 1 | map $http_host $MAGE_RUN_CODE { 2 | {{ getenv "MAGENTO_RUN_CODE_MAPPING" }} 3 | } 4 | -------------------------------------------------------------------------------- /magento2/etc/confd/templates/nginx/site_base.conf.tmpl: -------------------------------------------------------------------------------- 1 | set $MAGE_ROOT /app; 2 | set $MAGE_MODE {{ getenv "MAGENTO_MODE" }}; 3 | set $MAGE_RUN_TYPE {{ getenv "MAGENTO_RUN_TYPE" }}; 4 | 5 | root $MAGE_ROOT/pub; 6 | 7 | index index.php; 8 | autoindex off; 9 | charset UTF-8; 10 | error_page 404 403 = /errors/404.php; 11 | #add_header "X-UA-Compatible" "IE=Edge"; 12 | -------------------------------------------------------------------------------- /magento2/etc/confd/templates/nginx/site_media.conf.tmpl: -------------------------------------------------------------------------------- 1 | location /media/ { 2 | try_files $uri $uri/ /get.php$is_args$args; 3 | 4 | location ~ ^/media/theme_customization/.*\.xml { 5 | deny all; 6 | } 7 | 8 | location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ { 9 | add_header Cache-Control "public"; 10 | add_header X-Frame-Options "SAMEORIGIN"; 11 | expires +1y; 12 | try_files $uri $uri/ /get.php$is_args$args; 13 | } 14 | location ~* \.(zip|gz|gzip|bz2|csv|xml)$ { 15 | add_header Cache-Control "no-store"; 16 | add_header X-Frame-Options "SAMEORIGIN"; 17 | expires off; 18 | try_files $uri $uri/ /get.php$is_args$args; 19 | } 20 | add_header X-Frame-Options "SAMEORIGIN"; 21 | } 22 | -------------------------------------------------------------------------------- /magento2/etc/confd/templates/nginx/site_phpfpm.conf.tmpl: -------------------------------------------------------------------------------- 1 | # PHP entry point for main application 2 | location ~ ^/(index|get|static|errors/report|errors/404|errors/503|health_check)\.php$ { 3 | try_files $uri =404; 4 | fastcgi_pass php-fpm; 5 | 6 | fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off"; 7 | fastcgi_param PHP_VALUE "memory_limit={{ getenv "PHP_MEMORY_LIMIT" }} \n max_execution_time={{ getenv "PHP_MAX_EXECUTION_TIME" }}"; 8 | 9 | fastcgi_connect_timeout {{ getenv "PHP_MAX_EXECUTION_TIME" }}s; 10 | fastcgi_send_timeout {{ getenv "PHP_MAX_EXECUTION_TIME" }}; 11 | fastcgi_read_timeout {{ getenv "PHP_MAX_EXECUTION_TIME" }}; 12 | fastcgi_buffer_size 128k; 13 | fastcgi_buffers 1024 4k; 14 | fastcgi_busy_buffers_size 1024k; 15 | fastcgi_temp_file_write_size 1024k; 16 | fastcgi_param MAGE_MODE $MAGE_MODE; 17 | 18 | fastcgi_index index.php; 19 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 20 | fastcgi_param HTTPS $custom_https if_not_empty; 21 | include fastcgi_params; 22 | 23 | # Set Mage run Type and Code dynamically 24 | fastcgi_param MAGE_RUN_TYPE $MAGE_RUN_TYPE; 25 | fastcgi_param MAGE_RUN_CODE $MAGE_RUN_CODE; 26 | } 27 | -------------------------------------------------------------------------------- /magento2/etc/confd/templates/nginx/site_protect_admin.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if eq "true" (getenv "MAGENTO_PROTECT_ADMIN") }} 2 | # Admin location 3 | location ~ ^/(index\.php/)?{{ getenv "MAGENTO_ADMIN_FRONTNAME_REGEX_ESCAPED" }}($|/) { 4 | 5 | {{ if getenv "MAGENTO_ADMIN_IP_WHITELIST" }} 6 | {{ $ips := split (replace (replace (getenv "MAGENTO_ADMIN_IP_WHITELIST") "," " " -1) "\n" " " -1) " " }} 7 | {{ range $ips }}{{ if . }} 8 | allow {{ . }}; 9 | {{ end }}{{ end }} 10 | {{ end }} 11 | 12 | {{ if getenv "MAGENTO_ADMIN_HTPASSWD" }} 13 | satisfy any; 14 | auth_basic "Protected System"; 15 | auth_basic_user_file /etc/nginx/admin_htpasswd; 16 | {{ end }} 17 | 18 | deny all; 19 | 20 | # Rewrite to /index.php now that we are authenticated 21 | try_files $uri $uri/ /index.php?$args; 22 | } 23 | {{ end }} 24 | -------------------------------------------------------------------------------- /magento2/etc/confd/templates/nginx/site_pub.conf.tmpl: -------------------------------------------------------------------------------- 1 | location /pub/ { 2 | location ~ ^/pub/media/(downloadable|customer|import|theme_customization/.*\.xml) { 3 | deny all; 4 | } 5 | alias $MAGE_ROOT/pub/; 6 | add_header X-Frame-Options "SAMEORIGIN"; 7 | } 8 | -------------------------------------------------------------------------------- /magento2/etc/confd/templates/nginx/site_rewriteapp.conf.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/continuouspipe/dockerfiles/f89d6857af09999f928ca022d131298f474adb7d/magento2/etc/confd/templates/nginx/site_rewriteapp.conf.tmpl -------------------------------------------------------------------------------- /magento2/etc/confd/templates/nginx/site_root.conf.tmpl: -------------------------------------------------------------------------------- 1 | location / { 2 | try_files $uri $uri/ /index.php$is_args$args; 3 | } 4 | -------------------------------------------------------------------------------- /magento2/etc/confd/templates/nginx/site_setup.conf.tmpl: -------------------------------------------------------------------------------- 1 | # PHP entry point for setup application 2 | location ~* ^/setup($|/) { 3 | {{ if eq "true" (getenv "MAGENTO_ALLOW_ACCESS_TO_SETUP") }} 4 | root $MAGE_ROOT; 5 | location ~ ^/setup/index.php { 6 | fastcgi_pass php-fpm; 7 | 8 | fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off"; 9 | fastcgi_param PHP_VALUE "memory_limit=756M \n max_execution_time=600"; 10 | fastcgi_read_timeout 600s; 11 | fastcgi_connect_timeout 600s; 12 | 13 | fastcgi_index index.php; 14 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 15 | fastcgi_param HTTPS $custom_https if_not_empty; 16 | include fastcgi_params; 17 | } 18 | 19 | location ~ ^/setup/(?!pub/). { 20 | deny all; 21 | } 22 | 23 | location ~ ^/setup/pub/ { 24 | add_header X-Frame-Options "SAMEORIGIN"; 25 | } 26 | {{ else }} 27 | deny all; 28 | {{ end }} 29 | } 30 | -------------------------------------------------------------------------------- /magento2/etc/confd/templates/nginx/site_static.conf.tmpl: -------------------------------------------------------------------------------- 1 | location /static/ { 2 | {{ if eq "true" (getenv "MAGENTO_CACHE_STATIC_ASSETS") }} 3 | expires max; 4 | {{ end }} 5 | 6 | # Remove signature of the static files that is used to overcome the browser cache 7 | location ~ ^/static/version { 8 | rewrite ^/static/(version[^/]+/)?(.*)$ /static/$2 last; 9 | } 10 | 11 | location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2|json)$ { 12 | add_header Cache-Control "public"; 13 | add_header X-Frame-Options "SAMEORIGIN"; 14 | expires +1y; 15 | 16 | if (!-f $request_filename) { 17 | rewrite ^/static/?(version[^/]+/)?(.*)$ /static.php?resource=$2 last; 18 | } 19 | } 20 | location ~* \.(zip|gz|gzip|bz2|csv|xml)$ { 21 | add_header Cache-Control "no-store"; 22 | add_header X-Frame-Options "SAMEORIGIN"; 23 | expires off; 24 | 25 | if (!-f $request_filename) { 26 | rewrite ^/static/?(version[^/]+/)?(.*)$ /static.php?resource=$2 last; 27 | } 28 | } 29 | if (!-f $request_filename) { 30 | rewrite ^/static/?(version[^/]+/)?(.*)$ /static.php?resource=$2 last; 31 | } 32 | add_header X-Frame-Options "SAMEORIGIN"; 33 | } 34 | -------------------------------------------------------------------------------- /magento2/etc/confd/templates/nginx/site_update.conf.tmpl: -------------------------------------------------------------------------------- 1 | # PHP entry point for update application 2 | location ~* ^/update($|/) { 3 | {{ if eq "true" (getenv "MAGENTO_ALLOW_ACCESS_TO_UPDATE") }} 4 | root $MAGE_ROOT; 5 | 6 | location ~ ^/update/index.php { 7 | fastcgi_split_path_info ^(/update/index.php)(/.+)$; 8 | fastcgi_pass php-fpm; 9 | fastcgi_index index.php; 10 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 11 | fastcgi_param PATH_INFO $fastcgi_path_info; 12 | fastcgi_param HTTPS $custom_https if_not_empty; 13 | include fastcgi_params; 14 | } 15 | 16 | # Deny everything but index.php 17 | location ~ ^/update/(?!pub/). { 18 | deny all; 19 | } 20 | 21 | location ~ ^/update/pub/ { 22 | add_header X-Frame-Options "SAMEORIGIN"; 23 | } 24 | {{ else }} 25 | deny all; 26 | {{ end }} 27 | } 28 | -------------------------------------------------------------------------------- /magento2/etc/confd/templates/supervisor/echo_magento_reports.conf.tmpl: -------------------------------------------------------------------------------- 1 | [program:echo_magento_reports] 2 | command = /usr/local/bin/container magento_echo_last_minute_reports 3 | startsecs = 0 4 | startretries = 0 5 | stdout_logfile=/dev/stdout 6 | stdout_logfile_maxbytes=0 7 | stderr_logfile=/dev/stderr 8 | stderr_logfile_maxbytes=0 9 | user = {{ getenv "APP_USER" }} 10 | autostart = false 11 | autorestart = false 12 | priority = 5 13 | -------------------------------------------------------------------------------- /magento2/etc/confd/templates/supervisor/magento_cron.conf.tmpl: -------------------------------------------------------------------------------- 1 | [program:magento-cron] 2 | command = /bin/bash -c "cd /app/ && php bin/magento cron:run" 3 | startsecs = 0 4 | startretries = 0 5 | stdout_logfile=/dev/stdout 6 | stdout_logfile_maxbytes=0 7 | stderr_logfile=/dev/stderr 8 | stderr_logfile_maxbytes=0 9 | user = {{ getenv "APP_USER"}} 10 | autostart = false 11 | autorestart = false 12 | priority = 5 13 | -------------------------------------------------------------------------------- /magento2/etc/nginx/sites-available/default-05_site_deny.conf: -------------------------------------------------------------------------------- 1 | location /media/customer/ { 2 | deny all; 3 | } 4 | 5 | location /media/downloadable/ { 6 | deny all; 7 | } 8 | 9 | location /media/import/ { 10 | deny all; 11 | } 12 | 13 | location ~* ^/.user.ini { 14 | deny all; 15 | } 16 | 17 | location /swagger { 18 | deny all; 19 | } 20 | 21 | location /magento_version { 22 | deny all; 23 | } 24 | -------------------------------------------------------------------------------- /magento2/etc/nginx/sites-available/default-50_site_final_match.conf: -------------------------------------------------------------------------------- 1 | # Banned locations (only reached if the earlier PHP entry point regexes don't match) 2 | location ~* (/|^)([^/]*\.php|\.(ht|git)[^/]*)(/|$) { 3 | deny all; 4 | } 5 | -------------------------------------------------------------------------------- /magento2/etc/supervisor/conf.d/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/continuouspipe/dockerfiles/f89d6857af09999f928ca022d131298f474adb7d/magento2/etc/supervisor/conf.d/.gitkeep -------------------------------------------------------------------------------- /magento2/usr/local/share/magento2/development/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | mkdir -p /home/build/.hem/gems/ && chown -R build:build /home/build/.hem/ 5 | 6 | # Ensure the hem settings files exists by running confd before continuing 7 | source /usr/local/share/bootstrap/bootstrap.sh 8 | source /usr/local/share/bootstrap/run_confd.sh 9 | 10 | # install DB and assets 11 | if [ -L "$0" ] ; then 12 | DIR="$(dirname "$(readlink -f "$0")")" ; 13 | else 14 | DIR="$(dirname "$0")" ; 15 | fi 16 | 17 | source /usr/local/share/bootstrap/common_functions.sh 18 | # shellcheck source=./replace_core_config_values.sh 19 | source "$DIR/replace_core_config_values.sh" 20 | 21 | # Install composer and npm dependencies 22 | # shellcheck source=../install_magento.sh 23 | bash "$DIR/../install_magento.sh"; 24 | 25 | set -x 26 | if is_hem_project; then 27 | # Run HEM 28 | export HEM_RUN_ENV="${HEM_RUN_ENV:-local}" 29 | for asset_env in $ASSET_DOWNLOAD_ENVIRONMENTS; do 30 | as_build "hem --non-interactive --skip-host-checks assets download -e $asset_env" 31 | done 32 | fi 33 | 34 | bash "$DIR/install_database.sh" 35 | 36 | replace_core_config_values 37 | 38 | bash "$DIR/install_assets.sh" 39 | 40 | if [ -f "$DIR/install_custom.sh" ]; then 41 | # shellcheck source=./install_custom.sh 42 | source "$DIR/install_custom.sh" 43 | fi 44 | 45 | -------------------------------------------------------------------------------- /magento2/usr/local/share/magento2/development/install_assets.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | source /usr/local/share/bootstrap/common_functions.sh 6 | source /usr/local/share/bootstrap/bootstrap.sh 7 | 8 | set -x 9 | 10 | cd /app || exit 1 11 | 12 | if [ -f "$ASSET_ARCHIVE_PATH" ]; then 13 | IS_CHOWN_FORBIDDEN="$(run_return_boolean is_chown_forbidden)" 14 | 15 | if [ "$IS_CHOWN_FORBIDDEN" != 'true' ]; then 16 | chown -R "${CODE_OWNER}:${CODE_GROUP}" pub/media 17 | else 18 | chmod -R a+rw pub/media 19 | fi 20 | 21 | echo 'extracting media files' 22 | as_code_owner "tar --no-same-owner --extract --strip-components=2 --touch --overwrite --gzip --file=$ASSET_ARCHIVE_PATH || exit 1" pub/media 23 | 24 | if [ "$IS_CHOWN_FORBIDDEN" != 'true' ]; then 25 | chown -R "${APP_USER}:${APP_GROUP}" pub/media 26 | chmod -R u+rw,o-rw pub/media 27 | else 28 | chmod -R a+rw pub/media 29 | fi 30 | fi 31 | -------------------------------------------------------------------------------- /magento2/usr/local/share/magento2/development/install_custom.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | -------------------------------------------------------------------------------- /magento2/usr/local/share/magento2/development/replace_core_config_values.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function replace_core_config_values() { 4 | echo "DELETE from core_config_data WHERE path LIKE 'web/%base_url'; 5 | DELETE from core_config_data WHERE path LIKE 'system/full_page_cache/varnish%'; 6 | INSERT INTO core_config_data VALUES (NULL, 'default', '0', 'web/unsecure/base_url', '$PUBLIC_ADDRESS'); 7 | INSERT INTO core_config_data VALUES (NULL, 'default', '0', 'web/secure/base_url', '$PUBLIC_ADDRESS'); 8 | INSERT INTO core_config_data VALUES (NULL, 'default', '0', 'system/full_page_cache/varnish/access_list', 'varnish'); 9 | INSERT INTO core_config_data VALUES (NULL, 'default', '0', 'system/full_page_cache/varnish/backend_host', 'varnish'); 10 | INSERT INTO core_config_data VALUES (NULL, 'default', '0', 'system/full_page_cache/varnish/backend_port', '80'); 11 | $ADDITIONAL_SETUP_SQL" | mysql -h"$DATABASE_HOST" -u"$DATABASE_USER" -p"$DATABASE_PASSWORD" "$DATABASE_NAME" 12 | } 13 | -------------------------------------------------------------------------------- /magento2/usr/local/share/magento2/format_env.php: -------------------------------------------------------------------------------- 1 | format($config); 9 | if ($formattedConfig) { 10 | file_put_contents('/app/app/etc/env.php', $formattedConfig); 11 | } 12 | -------------------------------------------------------------------------------- /magento2/usr/local/share/magento2/install_magento_custom.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | -------------------------------------------------------------------------------- /magento2/usr/local/share/magento2/install_magento_finalise_custom.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | -------------------------------------------------------------------------------- /mailcatcher/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG FROM_TAG=latest 2 | FROM quay.io/continuouspipe/ubuntu16.04:${FROM_TAG} 3 | 4 | RUN apt-get update -qq \ 5 | && DEBIAN_FRONTEND=noninteractive apt-get -qq -y --no-install-recommends install \ 6 | ruby ruby-dev build-essential libsqlite3-dev \ 7 | \ 8 | && {\ 9 | echo 'install: --no-document'; \ 10 | echo 'update: --no-document'; \ 11 | } >> /etc/gemrc \ 12 | && gem install mailcatcher \ 13 | \ 14 | # Clean the image \ 15 | && DEBIAN_FRONTEND=noninteractive apt-get -qq -y remove ruby-dev build-essential libsqlite3-dev \ 16 | && apt-get auto-remove -qq -y \ 17 | && apt-get clean \ 18 | && rm -rf /var/lib/apt/lists/* \ 19 | && useradd --create-home mailcatcher 20 | 21 | COPY ./etc/ /etc/ 22 | COPY ./usr/ /usr/ 23 | 24 | # smtp port 25 | EXPOSE 1025 26 | 27 | # webserver port 28 | EXPOSE 1080 29 | -------------------------------------------------------------------------------- /mailcatcher/README.md: -------------------------------------------------------------------------------- 1 | # Mailcatcher 2 | 3 | In a docker-compose.yml: 4 | ``` 5 | version: '3' 6 | services: 7 | mailcatcher: 8 | image: quay.io/continuouspipe/mailcatcher:latest 9 | extra_hosts: 10 | - "mailcatcher:127.0.0.1" 11 | expose: 12 | - 1025 13 | ports: 14 | - "1080:1080" 15 | ``` 16 | 17 | In a Dockerfile: 18 | ```Dockerfile 19 | FROM quay.io/continuouspipe/mailcatcher:latest 20 | ``` 21 | 22 | ## How to build: 23 | 24 | ```bash 25 | docker-compose build mailcatcher 26 | docker-compose push mailcatcher 27 | ``` 28 | 29 | ## About 30 | 31 | This is a Docker image that provides the Mailcatcher service, which can catch outgoing mail before 32 | it hits the external network. It also provides a useful web interface for reviewing caught mail. 33 | 34 | ## How to use 35 | 36 | - Port 1025 is where mail should be relayed to (SMTP). 37 | - Port 1080 is where you can visit the UI. 38 | 39 | In the case of Symfony application place the following configuration in `parameters.yml`: 40 | 41 | ``` 42 | mailer_transport: smtp 43 | mailer_host: mailcatcher 44 | mailer_user: null 45 | mailer_password: null 46 | mailer_sender_mail: some@example.com 47 | mailer_port: 1025 48 | mailer_encryption: null 49 | ``` 50 | 51 | The following variables are supported: 52 | 53 | Variable | Description | Expected values | Default 54 | --- | --- | --- | ---- 55 | HTTP_HOST_PORT | The port to make the Mailcatcher UI available on | 1-65535 | 1080 56 | SMTP_HOST_PORT | The port to make the SMTP server available on. | 1-65535 | 1025 57 | -------------------------------------------------------------------------------- /mailcatcher/etc/supervisor/conf.d/mailcatcher.conf: -------------------------------------------------------------------------------- 1 | [program:mailcatcher] 2 | command = /usr/local/bin/mailcatcher.sh 3 | stdout_logfile=/dev/stdout 4 | stdout_logfile_maxbytes=0 5 | stderr_logfile=/dev/stderr 6 | stderr_logfile_maxbytes=0 7 | user = mailcatcher 8 | autostart = true 9 | autorestart = true 10 | priority = 5 11 | -------------------------------------------------------------------------------- /mailcatcher/usr/local/bin/mailcatcher.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Work around where if there is a service named "http" or "smtp", the HTTP_PORT/SMTP_PORT will be "tcp://:" 4 | # rather than just the port number 5 | if [[ "$HTTP_PORT" =~ "tcp://" ]]; then 6 | HTTP_PORT="1080" 7 | fi 8 | 9 | if [[ "$SMTP_PORT" =~ "tcp://" ]]; then 10 | SMTP_PORT="1025" 11 | fi 12 | 13 | HTTP_HOST_PORT=${HTTP_HOST_PORT:-${HTTP_PORT:-1080}} 14 | SMTP_HOST_PORT=${SMTP_HOST_PORT:-${SMTP_PORT:-1025}} 15 | 16 | function check_valid_port() { 17 | local VAR_NAME="$1" 18 | local PORT="${!VAR_NAME}" 19 | if [[ "$PORT" =~ [^0-9] ]] || [[ "$PORT" -lt 1 ]] || [[ "$PORT" -gt 65535 ]]; then 20 | echo "Invalid Port specified for $VAR_NAME: '$PORT'" 21 | exit 1 22 | fi 23 | } 24 | 25 | check_valid_port "HTTP_HOST_PORT" 26 | check_valid_port "SMTP_HOST_PORT" 27 | export HTTP_HOST_PORT 28 | export SMTP_HOST_PORT 29 | 30 | exec mailcatcher --foreground --ip=0.0.0.0 "--smtp-port=$SMTP_HOST_PORT" "--http-port=$HTTP_HOST_PORT" --no-quit 31 | -------------------------------------------------------------------------------- /memcached/1.4/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG FROM_TAG=latest 2 | FROM quay.io/continuouspipe/ubuntu16.04:${FROM_TAG} 3 | 4 | RUN apt-get update -qq \ 5 | && apt-get -qq -y --no-install-recommends install \ 6 | memcached \ 7 | \ 8 | # Clean the image \ 9 | && apt-get auto-remove -qq -y \ 10 | && apt-get clean \ 11 | && rm -rf /var/lib/apt/lists/* 12 | 13 | COPY ./etc /etc 14 | -------------------------------------------------------------------------------- /memcached/1.4/README.md: -------------------------------------------------------------------------------- 1 | # Memcached 2 | 3 | In a docker-compose.yml: 4 | ```yml 5 | version: '3' 6 | services: 7 | memcached: 8 | image: quay.io/continuouspipe/memcached1.4:latest 9 | ``` 10 | 11 | In a Dockerfile 12 | ```Dockerfile 13 | FROM quay.io/continuouspipe/memcached1.4:latest 14 | ``` 15 | 16 | ## How to build 17 | ```bash 18 | docker-compose build memcached 19 | docker-compose push memcached 20 | ``` 21 | 22 | ## About 23 | 24 | This is a Docker image to provide the Memcached daemon for volatile but fast storage and retrieval of data. 25 | 26 | ## How to use 27 | 28 | As for all images based on the ubuntu base image, see 29 | [the base image README](../../ubuntu/16.04/README.md) 30 | -------------------------------------------------------------------------------- /memcached/1.4/etc/confd/conf.d/supervisor_memcached.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "supervisor/memcached.conf.tmpl" 3 | dest = "/etc/supervisor/conf.d/memcached.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /memcached/1.4/etc/confd/templates/supervisor/memcached.conf.tmpl: -------------------------------------------------------------------------------- 1 | [program:memcached] 2 | command = /usr/bin/memcached -m 64 -U 11211 -p 11211 -u memcache -l 0.0.0.0 -c 1024 -I 1m 3 | stdout_logfile=/dev/stdout 4 | stdout_logfile_maxbytes=0 5 | stderr_logfile=/dev/stderr 6 | stderr_logfile_maxbytes=0 7 | loglevel = warn 8 | user = memcache 9 | autostart = true 10 | autorestart = true 11 | priority = 5 12 | -------------------------------------------------------------------------------- /memcached/1.4/etc/supervisor/conf.d/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/continuouspipe/dockerfiles/f89d6857af09999f928ca022d131298f474adb7d/memcached/1.4/etc/supervisor/conf.d/.gitkeep -------------------------------------------------------------------------------- /mongodb/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG FROM_TAG 2 | FROM mongo:${FROM_TAG} 3 | 4 | RUN apt-get update -qq \ 5 | && DEBIAN_FRONTEND=noninteractive apt-get -s dist-upgrade | grep "^Inst" | \ 6 | grep -i securi | awk -F " " '{print $2}' | \ 7 | xargs apt-get -qq -y --no-install-recommends install \ 8 | \ 9 | # Clean the image \ 10 | && apt-get autoremove -qq \ 11 | && apt-get clean \ 12 | && rm -rf /var/lib/apt/lists/* 13 | 14 | COPY ./usr/ /usr 15 | 16 | CMD ["/usr/local/bin/mongo-init.sh"] 17 | -------------------------------------------------------------------------------- /mongodb/usr/local/bin/mongo-init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | MONGODB_AUTH_ENABLED=${MONGODB_AUTH_ENABLED:-0} 6 | MONGODB_BIND_IP=${MONGODB_BIND_IP:-0.0.0.0} 7 | 8 | if [ -n "$MONGODB_ADMIN_USER" ] || [ -n "$MONGODB_USERS" ]; then 9 | mongod --bind_ip 127.0.0.1 & 10 | MONGO_PID=$! 11 | 12 | pushd /usr/local/share/mongodb 13 | # script to wait for server to be started 14 | mongo --nodb mongo-startup.js 15 | 16 | echo 'var env = {};' > env.js 17 | export | sed -e 's/declare -x /env./;' | grep '^env.MONGODB' >> env.js 18 | 19 | mongo mongo-set-auth.js 20 | 21 | rm env.js 22 | popd 23 | 24 | kill "${MONGO_PID}" 25 | flock /data/db/mongod.lock true 26 | fi 27 | 28 | if [ "$MONGODB_AUTH_ENABLED" -eq 1 ]; then 29 | exec mongod --auth --bind_ip "$MONGODB_BIND_IP" 30 | else 31 | exec mongod --bind_ip "$MONGODB_BIND_IP" 32 | fi 33 | -------------------------------------------------------------------------------- /mongodb/usr/local/share/mongodb/mongo-set-auth.js: -------------------------------------------------------------------------------- 1 | load('env.js'); 2 | db = db.getSiblingDB('admin'); 3 | 4 | var users = []; 5 | 6 | if (env.hasOwnProperty('MONGODB_USERS')) { 7 | users = JSON.parse(env.MONGODB_USERS); 8 | } 9 | 10 | if (env.hasOwnProperty('MONGODB_ADMIN_USER')) { 11 | users.unshift( 12 | { 13 | user: env.MONGODB_ADMIN_USER, 14 | pwd: env.MONGODB_ADMIN_PWD, 15 | roles: ["userAdminAnyDatabase"] 16 | } 17 | ); 18 | } 19 | 20 | users.forEach(function (user) { 21 | var userDb = db; 22 | var userName = user.user; 23 | 24 | if (user.hasOwnProperty('database')) { 25 | userDb = db.getSiblingDB(user.database); 26 | delete user.database; 27 | } 28 | 29 | if (userDb.getUser(userName) === null) { 30 | userDb.createUser(user); 31 | } else { 32 | delete user.user; 33 | userDb.updateUser(userName, user); 34 | } 35 | }); 36 | -------------------------------------------------------------------------------- /mongodb/usr/local/share/mongodb/mongo-startup.js: -------------------------------------------------------------------------------- 1 | var conn; 2 | var attempts = 0; 3 | 4 | do { 5 | try { 6 | attempts++; 7 | conn = new Mongo("localhost:27017"); 8 | } catch (e) { 9 | sleep(100); 10 | 11 | if (attempts > 100) { 12 | throw e; 13 | } 14 | } 15 | } while (conn === undefined) 16 | -------------------------------------------------------------------------------- /mysql/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG FROM_TAG 2 | FROM mysql:${FROM_TAG} 3 | 4 | COPY ./docker-entrypoint-initdb.d/ /docker-entrypoint-initdb.d/ 5 | -------------------------------------------------------------------------------- /mysql/docker-entrypoint-initdb.d/mysql_grants.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$MYSQL_USER" ] && [ "$MYSQL_PASSWORD" ]; then 4 | if [ "$MYSQL_DATABASE_GRANT" ]; then 5 | # shellcheck disable=SC2154 6 | echo "GRANT ALL ON \`$MYSQL_DATABASE_GRANT\`.* TO '$MYSQL_USER'@'%' ;" | "${mysql[@]}" 7 | fi 8 | fi 9 | -------------------------------------------------------------------------------- /nginx-ingress-controller/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM gcr.io/google-containers/nginx-ingress-controller:0.9.0-beta.5 2 | 3 | COPY ./etc/ /etc/ 4 | COPY ./usr/ /usr/ 5 | 6 | ENV SSL_CERT="" \ 7 | SSL_KEY="" 8 | 9 | CMD ["/usr/local/bin/boot.sh"] 10 | -------------------------------------------------------------------------------- /nginx-ingress-controller/usr/local/bin/boot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "$SSL_CERT" | base64 -d > /etc/nginx/default-certificate.pem 4 | echo >> /etc/nginx/default-certificate.pem 5 | echo "$SSL_KEY" | base64 -d >> /etc/nginx/default-certificate.pem 6 | 7 | SSL_SHA1SUM="$(sha1sum /etc/nginx/default-certificate.pem)" 8 | export SSL_SHA1SUM 9 | 10 | exec /nginx-ingress-controller "$@" 11 | -------------------------------------------------------------------------------- /nginx-reverse-proxy/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG FROM_TAG=latest 2 | FROM quay.io/continuouspipe/nginx:${FROM_TAG} 3 | 4 | COPY ./etc/ /etc/ 5 | -------------------------------------------------------------------------------- /nginx-reverse-proxy/etc/confd/conf.d/upstreams.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/upstreams.conf.tmpl" 3 | dest = "/etc/nginx/conf.d/upstreams.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /nginx-reverse-proxy/etc/confd/templates/nginx/site_base.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ $locations := jsonArray (getenv "PROXY_LOCATIONS")}} 2 | {{ range $key, $value := $locations }} 3 | location {{ .location }} { 4 | {{ if .backend_servers }} 5 | proxy_pass {{ .backend_scheme }}://stream{{ $key }}; 6 | {{ else }} 7 | proxy_pass {{ .backend }}; 8 | {{ end }} 9 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 10 | {{ if .hide_edge_headers }} 11 | proxy_set_header X-Forwarded-Proto ""; 12 | proxy_set_header X-Forwarded-Host ""; 13 | proxy_set_header X-Forwarded-Port ""; 14 | {{ else }} 15 | {{ if not .use_downstream_edge_headers }} 16 | proxy_set_header X-Forwarded-Proto $custom_scheme; 17 | proxy_set_header X-Forwarded-Host $host; 18 | proxy_set_header X-Forwarded-Port $server_port; 19 | {{ end }} 20 | {{ end }} 21 | {{ if .preserve_host }} 22 | proxy_set_header Host $host;{{ end }} 23 | {{ range $key, $value := .server_params }} 24 | {{ $key }} {{ $value }};{{ end }} 25 | } 26 | {{ end }} 27 | 28 | -------------------------------------------------------------------------------- /nginx-reverse-proxy/etc/confd/templates/nginx/upstreams.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ $locations := jsonArray (getenv "PROXY_LOCATIONS")}} 2 | {{ range $key, $value := $locations }} 3 | {{ if .backend_servers }} 4 | upstream stream{{ $key }} { 5 | {{ range .backend_servers }} 6 | server {{ . }}; 7 | {{ end }} 8 | } 9 | {{ end }} 10 | {{ end }} 11 | -------------------------------------------------------------------------------- /nginx/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG FROM_TAG=latest 2 | FROM quay.io/continuouspipe/ubuntu16.04:${FROM_TAG} 3 | 4 | RUN apt-get update -qq \ 5 | && DEBIAN_FRONTEND=noninteractive apt-get -qq -y --no-install-recommends install \ 6 | nginx \ 7 | \ 8 | # Clean the image \ 9 | && apt-get auto-remove -qq -y \ 10 | && apt-get clean \ 11 | && rm -rf /var/lib/apt/lists/* 12 | 13 | COPY ./etc/ /etc/ 14 | COPY ./usr/ /usr/ 15 | -------------------------------------------------------------------------------- /nginx/etc/confd/conf.d/crond_dhparam_regenerate.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "crond/dhparam_regenerate.tmpl" 3 | dest = "/etc/cron.d/dhparam_regenerate" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /nginx/etc/confd/conf.d/nginx.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/nginx.conf.tmpl" 3 | dest = "/etc/nginx/nginx.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /nginx/etc/confd/conf.d/nginx_basic_auth.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/nginx_basic_auth.conf.tmpl" 3 | dest = "/etc/nginx/conf.d/nginx_basic_auth.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /nginx/etc/confd/conf.d/nginx_core.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/nginx_core.conf.tmpl" 3 | dest = "/etc/nginx/conf.d/nginx_core.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /nginx/etc/confd/conf.d/nginx_htpasswd.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/nginx_htpasswd.tmpl" 3 | dest = "/etc/nginx/htpasswd" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /nginx/etc/confd/conf.d/nginx_ip_whitelist.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/nginx_ip_whitelist.conf.tmpl" 3 | dest = "/etc/nginx/conf.d/nginx_ip_whitelist.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /nginx/etc/confd/conf.d/nginx_log_format.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/nginx_log_format.conf.tmpl" 3 | dest = "/etc/nginx/conf.d/nginx_log_format.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /nginx/etc/confd/conf.d/nginx_realip.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/nginx_realip.conf.tmpl" 3 | dest = "/etc/nginx/conf.d/nginx_realip.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /nginx/etc/confd/conf.d/nginx_server_name_bucket_size.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/nginx_server_name_bucket_size.conf.tmpl" 3 | dest = "/etc/nginx/conf.d/nginx_server_name_bucket_size.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /nginx/etc/confd/conf.d/nginx_site.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /nginx/etc/confd/conf.d/nginx_site_base.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_base.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-10-base.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /nginx/etc/confd/conf.d/nginx_site_custom_scheme_flags.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_custom_scheme_flags.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-05-custom_scheme_flags.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /nginx/etc/confd/conf.d/nginx_site_healthcheck.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_healthcheck.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-05-site_healthcheck.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /nginx/etc/confd/conf.d/nginx_site_redirect_to_https.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_redirect_to_https.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-06-site_redirect_to_https.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /nginx/etc/confd/conf.d/nginx_site_ssl.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_ssl.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-01-site_ssl.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /nginx/etc/confd/conf.d/supervisor_dhparam_regenerate.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "supervisor/dhparam_regenerate.conf.tmpl" 3 | dest = "/etc/supervisor/conf.d/dhparam_regenerate.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /nginx/etc/confd/conf.d/supervisor_nginx.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "supervisor/nginx.conf.tmpl" 3 | dest = "/etc/supervisor/conf.d/nginx.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /nginx/etc/confd/templates/crond/dhparam_regenerate.tmpl: -------------------------------------------------------------------------------- 1 | {{ if and (eq "true" (getenv "WEB_SSL_DHPARAM_ENABLE")) (ne "false" (getenv "WEB_SSL_DHPARAM_CRON")) }} 2 | MAILTO="" 3 | {{ getenv "WEB_SSL_DHPARAM_CRON" }} root supervisorctl --user supervisor --password supervisor start dhparam-regenerate 4 | {{ end }} 5 | -------------------------------------------------------------------------------- /nginx/etc/confd/templates/nginx/nginx.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if not (eq "true" (getenv "NON_PRIVILEGED_USER")) }} 2 | user www-data; 3 | {{ end }} 4 | worker_processes auto; 5 | pid /run/nginx.pid; 6 | 7 | events { 8 | worker_connections 4096; 9 | # multi_accept on; 10 | } 11 | 12 | http { 13 | 14 | ## 15 | # Basic Settings 16 | ## 17 | 18 | sendfile on; 19 | tcp_nopush on; 20 | tcp_nodelay on; 21 | keepalive_timeout 65; 22 | types_hash_max_size 2048; 23 | server_tokens off; 24 | 25 | # server_name_in_redirect off; 26 | 27 | include /etc/nginx/mime.types; 28 | default_type application/octet-stream; 29 | 30 | ## 31 | # SSL Settings 32 | ## 33 | 34 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE 35 | ssl_prefer_server_ciphers on; 36 | 37 | ## 38 | # Logging Settings 39 | ## 40 | 41 | access_log /dev/stdout; 42 | error_log /dev/stderr info; 43 | 44 | ## 45 | # Gzip Settings 46 | ## 47 | 48 | gzip on; 49 | gzip_disable "msie6"; 50 | 51 | # gzip_vary on; 52 | # gzip_proxied any; 53 | # gzip_comp_level 6; 54 | # gzip_buffers 16 8k; 55 | # gzip_http_version 1.1; 56 | # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; 57 | 58 | ## 59 | # Virtual Host Configs 60 | ## 61 | 62 | include /etc/nginx/conf.d/*.conf; 63 | include /etc/nginx/sites-enabled/*; 64 | } 65 | -------------------------------------------------------------------------------- /nginx/etc/confd/templates/nginx/nginx_basic_auth.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if eq "true" (getenv "AUTH_HTTP_ENABLED") }} 2 | satisfy any; 3 | 4 | {{ if getenv "AUTH_HTTP_REMOTE_URL" }} 5 | auth_request "{{ getenv "AUTH_HTTP_REMOTE_URL" }}"; 6 | {{ else }} 7 | auth_basic "{{ getenv "AUTH_HTTP_REALM" }}"; 8 | auth_basic_user_file "{{ getenv "AUTH_HTTP_FILE" }}"; 9 | {{ end }} 10 | {{ end }} 11 | -------------------------------------------------------------------------------- /nginx/etc/confd/templates/nginx/nginx_core.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if getenv "WEB_RESOLVER" }} 2 | resolver {{ getenv "WEB_RESOLVER" }}; 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /nginx/etc/confd/templates/nginx/nginx_htpasswd.tmpl: -------------------------------------------------------------------------------- 1 | {{ if getenv "AUTH_HTTP_HTPASSWD" }} 2 | {{ getenv "AUTH_HTTP_HTPASSWD" }} 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /nginx/etc/confd/templates/nginx/nginx_ip_whitelist.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if eq "true" (getenv "AUTH_IP_WHITELIST_ENABLED") }} 2 | {{ $ips := split (replace (replace (getenv "AUTH_IP_WHITELIST") "," " " -1) "\n" " " -1) " " }} 3 | {{ range $ips }}{{ if . }} 4 | allow {{ . }}; 5 | {{ end }}{{ end }} 6 | deny all; 7 | {{ end }} 8 | -------------------------------------------------------------------------------- /nginx/etc/confd/templates/nginx/nginx_log_format.conf.tmpl: -------------------------------------------------------------------------------- 1 | log_format combined_with_x_forwarded_for '$remote_addr - $remote_user [$time_local] ' 2 | '"$request" $status $body_bytes_sent ' 3 | '"$http_referer" "$http_user_agent" - "$http_x_forwarded_for"'; 4 | -------------------------------------------------------------------------------- /nginx/etc/confd/templates/nginx/nginx_realip.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if (or (getenv "EXTERNAL_LOAD_BALANCER_HOST_IPS") (getenv "TRUSTED_REVERSE_PROXIES")) }} 2 | {{ if (getenv "TRUSTED_REVERSE_PROXIES") }}{{ $nodes := split (getenv "TRUSTED_REVERSE_PROXIES") "," }}{{ range $nodes }} 3 | set_real_ip_from {{ . }};{{ end }}{{ end }} 4 | {{ if (getenv "EXTERNAL_LOAD_BALANCER_HOST_IPS") }}{{ $nodes := split (getenv "EXTERNAL_LOAD_BALANCER_HOST_IPS") "\n" }}{{ range $nodes }} 5 | set_real_ip_from {{ . }};{{ end }}{{ end }} 6 | real_ip_header X-Forwarded-For; 7 | real_ip_recursive on; 8 | {{ end }} 9 | -------------------------------------------------------------------------------- /nginx/etc/confd/templates/nginx/nginx_server_name_bucket_size.conf.tmpl: -------------------------------------------------------------------------------- 1 | server_names_hash_max_size 16; 2 | server_names_hash_bucket_size 128; 3 | map_hash_bucket_size 128; 4 | -------------------------------------------------------------------------------- /nginx/etc/confd/templates/nginx/site.conf.tmpl: -------------------------------------------------------------------------------- 1 | server { 2 | server_name {{ getenv "WEB_SERVER_NAME" }}; 3 | {{ if ne "false" (getenv "WEB_HTTP") }} 4 | listen {{ getenv "WEB_HTTP_PORT" }} {{ if eq "true" (getenv "WEB_DEFAULT_SERVER") }} default_server{{ end }}; 5 | {{ if and (eq "true" (getenv "WEB_HTTPS_ONLY")) (ne "true" (getenv "WEB_REVERSE_PROXIED")) }} 6 | 7 | access_log off; 8 | rewrite ^ https://$host$request_uri? permanent; 9 | } 10 | 11 | server { 12 | server_name {{ getenv "WEB_SERVER_NAME" }}; 13 | {{ end }}{{ end }} 14 | {{ if eq "true" (getenv "WEB_HTTPS") }} 15 | {{ if eq "true" (getenv "WEB_HTTPS_OFFLOADED") }} 16 | listen {{ getenv "WEB_HTTPS_PORT" }}{{ if eq "true" (getenv "WEB_DEFAULT_SERVER") }} default_server{{ end }};{{ else }} 17 | listen {{ getenv "WEB_HTTPS_PORT" }} {{ if eq "true" (getenv "WEB_DEFAULT_SERVER") }} default_server{{ end }} ssl http2; 18 | ssl_certificate {{ getenv "WEB_SSL_FULLCHAIN" }}; 19 | ssl_certificate_key {{ getenv "WEB_SSL_PRIVKEY" }};{{ end }}{{ end }} 20 | 21 | set $access_log_enabled 1; 22 | 23 | {{ $includes := split (replace (replace (getenv "WEB_INCLUDES") "," " " -1) "\n" " " -1) " " }} 24 | {{ range $includes }}{{ if . }} 25 | include /etc/nginx/sites-available/{{ . }}.conf; 26 | {{ end }} 27 | {{ end }} 28 | 29 | error_log /dev/stderr notice; 30 | access_log /dev/stdout {{ getenv "NGINX_LOG_FORMAT_NAME" }} if=$access_log_enabled; 31 | } 32 | -------------------------------------------------------------------------------- /nginx/etc/confd/templates/nginx/site_base.conf.tmpl: -------------------------------------------------------------------------------- 1 | root {{ getenv "WEB_DIRECTORY" }}; 2 | -------------------------------------------------------------------------------- /nginx/etc/confd/templates/nginx/site_custom_scheme_flags.conf.tmpl: -------------------------------------------------------------------------------- 1 | set $custom_https $https; 2 | set $custom_scheme $scheme; 3 | 4 | {{ if eq "true" (getenv "WEB_HTTPS_OFFLOADED") }} 5 | if ($server_port = {{ getenv "WEB_HTTPS_PORT" }} ) { 6 | set $custom_https on; 7 | set $custom_scheme https; 8 | }{{ end }} 9 | 10 | {{ if eq "true" (getenv "WEB_REVERSE_PROXIED") }} 11 | if ($http_x_forwarded_proto) { 12 | set $custom_scheme $http_x_forwarded_proto; 13 | } 14 | 15 | if ($http_x_forwarded_proto = https) { 16 | set $custom_https on; 17 | }{{ end }} 18 | -------------------------------------------------------------------------------- /nginx/etc/confd/templates/nginx/site_healthcheck.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if getenv "AUTH_HTTP_HEALTHCHECK_USER_AGENT" }} 2 | if ($http_user_agent ~ {{ getenv "AUTH_HTTP_HEALTHCHECK_USER_AGENT" }}) { 3 | set $do_https_redirect 0; 4 | set $access_log_enabled 0; 5 | return 200; 6 | } 7 | {{ end }} 8 | {{ if getenv "AUTH_HTTP_HEALTHCHECK_LOCATION" }} 9 | if ($request_uri = "{{ getenv "AUTH_HTTP_HEALTHCHECK_LOCATION" }}") { 10 | set $do_https_redirect 0; 11 | } 12 | 13 | location = {{ getenv "AUTH_HTTP_HEALTHCHECK_LOCATION" }} { 14 | set $do_https_redirect 0; 15 | set $access_log_enabled 0; 16 | return 200; 17 | } 18 | {{ end }} 19 | -------------------------------------------------------------------------------- /nginx/etc/confd/templates/nginx/site_redirect_to_https.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if eq "true" (getenv "WEB_HTTPS_ONLY") }} 2 | if ($custom_scheme = 'https') { 3 | set $do_https_redirect 0; 4 | } 5 | 6 | if ($do_https_redirect != 0) { 7 | rewrite ^ https://$host$request_uri? permanent; 8 | } 9 | {{ end }} 10 | -------------------------------------------------------------------------------- /nginx/etc/confd/templates/nginx/site_ssl.conf.tmpl: -------------------------------------------------------------------------------- 1 | ssl_ciphers {{ getenv "WEB_SSL_CIPHERS" }}; 2 | ssl_protocols {{ getenv "WEB_SSL_PROTOCOLS" }}; 3 | ssl_prefer_server_ciphers on; 4 | ssl_session_cache {{ getenv "WEB_SSL_SESSION_CACHE" }}; 5 | ssl_session_timeout {{ getenv "WEB_SSL_SESSION_TIMEOUT" }}; 6 | 7 | {{ if getenv "WEB_SSL_TRUSTED_CERTIFICATES" }} 8 | ssl_trusted_certificates {{ getenv "WEB_SSL_TRUSTED_CERTIFICATES" }}; 9 | {{ end }} 10 | 11 | {{ if eq (getenv "WEB_SSL_OCSP_STAPLING") "true" }} 12 | ssl_stapling on; 13 | {{ if getenv "WEB_SSL_TRUSTED_CERTIFICATES" }} 14 | ssl_stapling_verify on 15 | {{ end }} 16 | {{ end }} 17 | 18 | {{ if eq (getenv "WEB_SSL_DHPARAM_ENABLE") "true" }} 19 | ssl_dhparam {{ getenv "WEB_SSL_DHPARAM_FILE" }}; 20 | {{ end }} 21 | -------------------------------------------------------------------------------- /nginx/etc/confd/templates/supervisor/dhparam_regenerate.conf.tmpl: -------------------------------------------------------------------------------- 1 | [program:dhparam-regenerate] 2 | command = container --no-debug dhparam_regenerate 3 | startsecs = 0 4 | autostart = no 5 | autorestart = false -------------------------------------------------------------------------------- /nginx/etc/confd/templates/supervisor/nginx.conf.tmpl: -------------------------------------------------------------------------------- 1 | [program:nginx] 2 | command = /usr/sbin/nginx -c /etc/nginx/nginx.conf -g 'daemon off;' 3 | stdout_logfile=/dev/stdout 4 | stdout_logfile_maxbytes=0 5 | stderr_logfile=/dev/stderr 6 | stderr_logfile_maxbytes=0 7 | loglevel = warn 8 | user = root 9 | autostart = {{ getenv "START_NGINX" }} 10 | autorestart = true 11 | priority = 5 12 | -------------------------------------------------------------------------------- /nginx/etc/supervisor/conf.d/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/continuouspipe/dockerfiles/f89d6857af09999f928ca022d131298f474adb7d/nginx/etc/supervisor/conf.d/.gitkeep -------------------------------------------------------------------------------- /nginx/usr/local/share/container/baseimage-20.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source /usr/local/share/nginx/nginx_functions.sh 4 | 5 | alias_function do_start do_nginx_start_inner 6 | do_start() { 7 | do_nginx 8 | do_nginx_start_inner 9 | } 10 | -------------------------------------------------------------------------------- /nginx/usr/local/share/env/20-heroku: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # If running inside Heroku, exposed port is in `$PORT` 4 | IN_HEROKU="$(convert_to_boolean_string "${IN_HEROKU:-false}")" 5 | if [ "true" = "$IN_HEROKU" ]; then 6 | export WEB_HTTPS="false" 7 | export WEB_HTTP_PORT=$PORT 8 | 9 | export NON_PRIVILEGED_USER="true" 10 | fi 11 | -------------------------------------------------------------------------------- /nginx/usr/local/share/env/55-stack: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Relative WEB_DIRECTORY converted to absolute path 4 | if ! [[ "$WEB_DIRECTORY" =~ ^/ ]]; then 5 | export WEB_DIRECTORY=${WORK_DIRECTORY}/${WEB_DIRECTORY} 6 | fi 7 | 8 | if [ "${WEB_HTTP}" == "true" ]; then 9 | export WEB_HTTPS_ONLY=false 10 | else 11 | export WEB_HTTPS_ONLY=${WEB_HTTPS_ONLY:-$WEB_HTTPS} 12 | fi 13 | -------------------------------------------------------------------------------- /nodejs/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG FROM_TAG=latest 2 | FROM quay.io/continuouspipe/ubuntu16.04:${FROM_TAG} 3 | 4 | # Install node 5 | ARG NODE_VERSION 6 | ENV NODE_VERSION ${NODE_VERSION:-7.x} 7 | ARG INSTALL_COMMON_PACKAGES 8 | ENV INSTALL_COMMON_PACKAGES ${INSTALL_COMMON_PACKAGES:-true} 9 | RUN curl -sL "https://deb.nodesource.com/setup_$NODE_VERSION" > /tmp/install-node.sh \ 10 | && bash /tmp/install-node.sh \ 11 | && apt-get update -qq \ 12 | && DEBIAN_FRONTEND=noninteractive apt-get -qq -y --no-install-recommends install \ 13 | nodejs \ 14 | \ 15 | # Set up common NPM packages \ 16 | && if [ "$INSTALL_COMMON_PACKAGES" = "true" ]; then \ 17 | npm config set --global loglevel warn \ 18 | && npm install --global \ 19 | marked \ 20 | node-gyp \ 21 | gulp \ 22 | \ 23 | # Install node-sass's linux bindings \ 24 | && npm rebuild node-sass; \ 25 | fi \ 26 | \ 27 | # Clean the image \ 28 | && apt-get auto-remove -qq -y \ 29 | && apt-get clean \ 30 | && rm -rf /var/lib/apt/lists/* 31 | -------------------------------------------------------------------------------- /phantomjs/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG FROM_TAG=latest 2 | FROM quay.io/continuouspipe/ubuntu16.04:${FROM_TAG} 3 | 4 | ARG PHANTOMJS_VERSION=2.1.1 5 | 6 | RUN apt-get update -qq \ 7 | && DEBIAN_FRONTEND=noninteractive apt-get -qq -y --no-install-recommends install \ 8 | bzip2 \ 9 | fontconfig \ 10 | \ 11 | # Clean the image \ 12 | && apt-get auto-remove -qq -y \ 13 | && apt-get clean \ 14 | && rm -rf /var/lib/apt/lists/* \ 15 | \ 16 | && PHANTOM_JS=phantomjs-${PHANTOMJS_VERSION}-linux-x86_64 \ 17 | && wget --directory-prefix=/usr/local/src "https://bitbucket.org/ariya/phantomjs/downloads/${PHANTOM_JS}.tar.bz2" \ 18 | && tar -jxvf "/usr/local/src/${PHANTOM_JS}.tar.bz2" --directory /usr/local/src \ 19 | && mv "/usr/local/src/${PHANTOM_JS}/bin/phantomjs" /usr/local/bin/ \ 20 | && rm -rf "/usr/local/src/${PHANTOMJS}*" \ 21 | && useradd phantomjs 22 | 23 | COPY ./etc/ /etc/ 24 | 25 | EXPOSE 4444 26 | -------------------------------------------------------------------------------- /phantomjs/README.md: -------------------------------------------------------------------------------- 1 | # PhantomJS 2 2 | 3 | In a docker-compose.yml: 4 | ```yml 5 | version: '3' 6 | services: 7 | phantomjs: 8 | image: quay.io/continuouspipe/phantomjs2:latest 9 | ``` 10 | 11 | In a Dockerfile: 12 | ```Dockerfile 13 | FROM quay.io/continuouspipe/phantomjs2:latest 14 | ``` 15 | 16 | ## How to build 17 | ```bash 18 | docker-compose build phantomjs2 19 | docker-compose push phantomjs2 20 | ``` 21 | 22 | ## About 23 | 24 | This is a Docker image that provides the PhantomJS headless browser. 25 | 26 | ## How to use 27 | 28 | By default this will create a service running phantomjs with webdriver port 4444 29 | 30 | Run this as a service, and expose port 4444. 31 | -------------------------------------------------------------------------------- /phantomjs/etc/supervisor/conf.d/phantomjs.conf: -------------------------------------------------------------------------------- 1 | [program:phantomjs] 2 | command = /usr/local/bin/phantomjs --webdriver=4444 3 | stdout_logfile=/dev/stdout 4 | stdout_logfile_maxbytes=0 5 | stderr_logfile=/dev/stderr 6 | stderr_logfile_maxbytes=0 7 | loglevel = warn 8 | user = phantomjs 9 | autostart = true 10 | autorestart = true 11 | priority = 5 12 | -------------------------------------------------------------------------------- /php/Dockerfile-apache: -------------------------------------------------------------------------------- 1 | ARG PHP_IMAGE_VERSION 2 | ARG FROM_TAG=latest 3 | FROM quay.io/continuouspipe/php${PHP_IMAGE_VERSION}:${FROM_TAG} 4 | 5 | RUN apt-get update -qq \ 6 | && DEBIAN_FRONTEND=noninteractive apt-get -qq -y --no-install-recommends install \ 7 | apache2 \ 8 | apache2-utils \ 9 | "libapache2-mod-php$PHP_VERSION" \ 10 | && echo -e '; priority=25\nextension=redis.so' > "/etc/php/${PHP_VERSION}/apache2/conf.d/25-redis.ini" \ 11 | && ln -s "/etc/php/${PHP_VERSION}/mods-available/tideways.ini" "/etc/php/${PHP_VERSION}/apache2/conf.d/20-tideways.ini" \ 12 | \ 13 | # Clean the image \ 14 | && apt-get auto-remove -qq -y \ 15 | && apt-get clean \ 16 | && rm -rf /var/lib/apt/lists/* \ 17 | \ 18 | # Enable the correct config for most sites \ 19 | && a2disconf other-vhosts-access-log \ 20 | && a2enmod remoteip \ 21 | && a2enmod rewrite \ 22 | && a2enmod ssl 23 | 24 | # Add configuration 25 | COPY ./apache/etc/ /etc/ 26 | COPY ./apache/usr/ /usr/ 27 | 28 | RUN find /etc/confd/conf.d/ -name "*.toml" -type f -exec sed -i'' "s/\$PHP_VERSION/$PHP_VERSION/" {} \; 29 | -------------------------------------------------------------------------------- /php/Dockerfile-nginx: -------------------------------------------------------------------------------- 1 | ARG PHP_IMAGE_VERSION 2 | ARG FROM_TAG=latest 3 | FROM quay.io/continuouspipe/php${PHP_IMAGE_VERSION}:${FROM_TAG} 4 | 5 | RUN apt-get update -qq \ 6 | && DEBIAN_FRONTEND=noninteractive apt-get -qq -y --no-install-recommends install \ 7 | nginx \ 8 | "php$PHP_VERSION-fpm" \ 9 | \ 10 | && echo -e '; priority=25\nextension=redis.so' > "/etc/php/${PHP_VERSION}/fpm/conf.d/25-redis.ini" \ 11 | && ln -s "/etc/php/${PHP_VERSION}/mods-available/tideways.ini" "/etc/php/${PHP_VERSION}/fpm/conf.d/20-tideways.ini" \ 12 | \ 13 | # Clean the image \ 14 | && apt-get auto-remove -qq -y \ 15 | && apt-get clean \ 16 | && rm -rf /var/lib/apt/lists/* 17 | 18 | COPY ./nginx/etc/ /etc/ 19 | COPY ./nginx/usr/ /usr/ 20 | 21 | RUN find /etc/confd/conf.d/ -name "*.toml" -type f -exec sed -i'' "s/\$PHP_VERSION/$PHP_VERSION/" {} \; 22 | -------------------------------------------------------------------------------- /php/apache/etc/confd/conf.d/apache2-security.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/apache2-security.conf.tmpl" 3 | dest = "/etc/apache2/conf-available/security.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/apache/etc/confd/conf.d/apache2.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/apache2.conf.tmpl" 3 | dest = "/etc/apache2/apache2.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/apache/etc/confd/conf.d/apache2_auth.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/apache2_auth.conf.tmpl" 3 | dest = "/etc/apache2/conf-enabled/apache2_auth.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/apache/etc/confd/conf.d/apache2_htpasswd.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/apache2_htpasswd.tmpl" 3 | dest = "/etc/apache2/htpasswd" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/apache/etc/confd/conf.d/apache2_remoteip.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/apache2_remoteip.conf.tmpl" 3 | dest = "/etc/apache2/conf-enabled/apache2_remoteip.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/apache/etc/confd/conf.d/apache2_site_base.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/site_base.conf.tmpl" 3 | dest = "/etc/apache2/sites-available/000-default-10-base.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/apache/etc/confd/conf.d/apache2_site_custom_scheme_flags.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/site_custom_scheme_flags.conf.tmpl" 3 | dest = "/etc/apache2/sites-available/000-default-05-custom_scheme_flags.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/apache/etc/confd/conf.d/apache2_site_healthcheck.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/site_healthcheck.conf.tmpl" 3 | dest = "/etc/apache2/sites-available/000-default-05-site_healthcheck.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/apache/etc/confd/conf.d/apache2_site_redirect_to_https.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/site_redirect_to_https.conf.tmpl" 3 | dest = "/etc/apache2/sites-available/000-default-05-redirect_to_https.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/apache/etc/confd/conf.d/apache2_site_rewriteapp.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/site_rewriteapp.conf.tmpl" 3 | dest = "/etc/apache2/sites-available/000-default-20-rewriteapp.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/apache/etc/confd/conf.d/apache2_site_ssl.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/site_ssl.conf.tmpl" 3 | dest = "/etc/apache2/sites-available/000-default-01-ssl.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/apache/etc/confd/conf.d/apache2_ssl.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/apache2_ssl.conf.tmpl" 3 | dest = "/etc/apache2/conf-enabled/apache2_ssl.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/apache/etc/confd/conf.d/php_env_apache.ini.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "php/env.ini.tmpl" 3 | dest = "/etc/php/$PHP_VERSION/apache2/conf.d/05-env.ini" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/apache/etc/confd/conf.d/site_php.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/site_php.conf.tmpl" 3 | dest = "/etc/apache2/sites-available/000-default-05-php.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/apache/etc/confd/conf.d/supervisor_apache.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "supervisor/apache.conf.tmpl" 3 | dest = "/etc/supervisor/conf.d/apache.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/apache/etc/confd/conf.d/virtual-host.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/virtual-host.conf.tmpl" 3 | dest = "/etc/apache2/sites-available/000-default.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/apache/etc/confd/templates/apache/apache2_auth.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if or (eq "true" (getenv "AUTH_HTTP_ENABLED")) (eq "true" (getenv "AUTH_IP_WHITELIST_ENABLED")) }} 2 | 3 | {{ if eq "true" (getenv "AUTH_HTTP_ENABLED") }} 4 | AuthUserFile {{ getenv "AUTH_HTTP_FILE" }} 5 | AuthType {{ getenv "AUTH_HTTP_TYPE" }} 6 | AuthName "{{ getenv "AUTH_HTTP_REALM" }}" 7 | Require valid-user 8 | {{ end }} 9 | 10 | {{ if eq "true" (getenv "AUTH_IP_WHITELIST_ENABLED") }} 11 | {{ $ips := split (replace (replace (getenv "AUTH_IP_WHITELIST") "," " " -1) "\n" " " -1) " " }} 12 | {{ range $ips }}{{ if . }} 13 | Require ip {{ . }} 14 | {{ end }}{{ end }} 15 | {{ end }} 16 | 17 | {{ end }} 18 | -------------------------------------------------------------------------------- /php/apache/etc/confd/templates/apache/apache2_htpasswd.tmpl: -------------------------------------------------------------------------------- 1 | {{ if getenv "AUTH_HTTP_HTPASSWD" }} 2 | {{ getenv "AUTH_HTTP_HTPASSWD" }} 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /php/apache/etc/confd/templates/apache/apache2_remoteip.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if (or (getenv "EXTERNAL_LOAD_BALANCER_HOST_IPS") (getenv "TRUSTED_REVERSE_PROXIES")) }} 2 | {{ if (getenv "TRUSTED_REVERSE_PROXIES") }}{{ $nodes := split (getenv "TRUSTED_REVERSE_PROXIES") "," }}{{ range $nodes }} 3 | RemoteIPInternalProxy {{ . }}{{ end }}{{ end }} 4 | {{ if (getenv "EXTERNAL_LOAD_BALANCER_HOST_IPS") }}{{ $nodes := split (getenv "EXTERNAL_LOAD_BALANCER_HOST_IPS") "\n" }}{{ range $nodes }} 5 | RemoteIPInternalProxy {{ . }}{{ end }}{{ end }} 6 | RemoteIPHeader X-Forwarded-For 7 | {{ end }} 8 | -------------------------------------------------------------------------------- /php/apache/etc/confd/templates/apache/apache2_ssl.conf.tmpl: -------------------------------------------------------------------------------- 1 | SSLSessionCache {{ getenv "WEB_SSL_SESSION_CACHE" }} 2 | {{ if getenv "WEB_SSL_OSCP_STAPLING_CACHE" }} 3 | SSLStaplingCache {{ getenv "WEB_SSL_OSCP_STAPLING_CACHE" }} 4 | {{ end }} 5 | -------------------------------------------------------------------------------- /php/apache/etc/confd/templates/apache/site_base.conf.tmpl: -------------------------------------------------------------------------------- 1 | DocumentRoot {{ getenv "WEB_DIRECTORY" }} 2 | 3 | 4 | Options FollowSymLinks 5 | AllowOverride None 6 | Require all granted 7 | -------------------------------------------------------------------------------- /php/apache/etc/confd/templates/apache/site_custom_scheme_flags.conf.tmpl: -------------------------------------------------------------------------------- 1 | RewriteEngine on 2 | 3 | RewriteRule ^ - [env=CUSTOM_SCHEME:%{REQUEST_SCHEME}] 4 | 5 | {{ if eq "true" (getenv "WEB_HTTPS_OFFLOADED") }} 6 | RewriteCond %{SERVER_PORT} ={{ getenv "WEB_HTTPS_PORT" }} 7 | RewriteRule ^ - [env=CUSTOM_SCHEME:https] 8 | {{ end }} 9 | 10 | {{ if eq "true" (getenv "WEB_REVERSE_PROXIED") }} 11 | RewriteCond %{HTTP:X-Forwarded-Proto} ^.+ 12 | RewriteRule ^ - [env=CUSTOM_SCHEME:%{HTTP:X-Forwarded-Proto}] 13 | {{ end }} 14 | 15 | # Note this only fools CGI-based modules (like mod_php) into thinking it's HTTPS 16 | RewriteCond %{ENV:CUSTOM_SCHEME} =https 17 | RewriteRule ^ - [env=HTTPS:on] 18 | RewriteCond %{ENV:CUSTOM_SCHEME} !=https 19 | RewriteRule ^ - [env=HTTPS] # empty value = not HTTPS 20 | -------------------------------------------------------------------------------- /php/apache/etc/confd/templates/apache/site_healthcheck.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if getenv "AUTH_HTTP_HEALTHCHECK_USER_AGENT" }} 2 | RewriteCond %{HTTP_USER_AGENT} {{ getenv "AUTH_HTTP_HEALTHCHECK_USER_AGENT" }} 3 | RewriteRule ^ - [L,R=200] 4 | {{ end }} 5 | 6 | {{ if getenv "AUTH_HTTP_HEALTHCHECK_LOCATION" }} 7 | RewriteRule ^{{ getenv "AUTH_HTTP_HEALTHCHECK_LOCATION" }}$ - [L,R=200] 8 | {{ end }} 9 | -------------------------------------------------------------------------------- /php/apache/etc/confd/templates/apache/site_php.conf.tmpl: -------------------------------------------------------------------------------- 1 | php_value memory_limit {{ getenv "PHP_MEMORY_LIMIT" }} 2 | -------------------------------------------------------------------------------- /php/apache/etc/confd/templates/apache/site_redirect_to_https.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if eq "true" (getenv "WEB_HTTPS_ONLY") }} 2 | RewriteEngine on 3 | 4 | RewriteCond %{ENV:HTTPS} !=on 5 | RewriteRule ^.* https://%{HTTP_HOST}%{REQUEST_URI} [L,QSA,R=301] 6 | {{ end }} 7 | -------------------------------------------------------------------------------- /php/apache/etc/confd/templates/apache/site_rewriteapp.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if eq (getenv "APP_ENDPOINT_REWRITE") "true" }} 2 | {{ if eq (getenv "APP_ENDPOINT_STRICT") "true" }} 3 | DirectoryIndex index.html 4 | {{ end }} 5 | 6 | RewriteEngine On 7 | 8 | RewriteCond %{CONTEXT_DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f 9 | RewriteCond %{CONTEXT_DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d 10 | RewriteCond %{CONTEXT_DOCUMENT_ROOT}%{REQUEST_FILENAME} !-l 11 | 12 | RewriteRule .* {{ getenv "APP_ENDPOINT" }} [QSA,L] 13 | {{ end }} 14 | -------------------------------------------------------------------------------- /php/apache/etc/confd/templates/apache/site_ssl.conf.tmpl: -------------------------------------------------------------------------------- 1 | SSLCipherSuite {{ getenv "WEB_SSL_CIPHERS" }} 2 | SSLHonorCipherOrder on 3 | SSLProtocol {{ getenv "WEB_SSL_PROTOCOLS" }} 4 | SSLSessionCacheTimeout {{ getenv "WEB_SSL_SESSION_TIMEOUT" }} 5 | 6 | {{ if getenv "WEB_SSL_TRUSTED_CERTIFICATES" }} 7 | SSLCACertificateFile {{ getenv "WEB_SSL_TRUSTED_CERTIFICATES" }} 8 | {{ end }} 9 | 10 | {{ if eq (getenv "WEB_SSL_OCSP_STAPLING") "true" }} 11 | SSLUseStapling on 12 | {{ end }} 13 | 14 | {{ if eq (getenv "WEB_SSL_DHPARAM_ENABLE") "true" }} 15 | SSLOpenSSLConfCmd DHParameters "{{ getenv "WEB_SSL_DHPARAM_FILE" }}" 16 | {{ end }} 17 | -------------------------------------------------------------------------------- /php/apache/etc/confd/templates/apache/virtual-host.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if ne "false" (getenv "WEB_HTTP") }} 2 | 3 | {{ if getenv "WEB_SERVER_NAME" }}ServerName {{ getenv "WEB_SERVER_NAME" }}{{ end }} 4 | {{ if getenv "WEB_SERVER_ALIAS" }}ServerAlias {{ getenv "WEB_SERVER_ALIAS" }}{{ end }} 5 | {{ if or (ne "true" (getenv "WEB_HTTPS_ONLY")) (eq "true" (getenv "WEB_REVERSE_PROXIED")) }} 6 | {{ $includes := split (replace (replace (getenv "WEB_INCLUDES") "," " " -1) "\n" " " -1) " " }} 7 | {{ range $includes }}{{ if . }} 8 | IncludeOptional /etc/apache2/sites-available/{{ . }}.conf 9 | {{ end }} 10 | {{ end }} 11 | {{ else }} 12 | RewriteEngine on 13 | RewriteRule ^.* https://%{HTTP_HOST}$0 [L,R=301] 14 | {{ end }} 15 | 16 | {{ end }} 17 | 18 | {{ if eq "true" (getenv "WEB_HTTPS") }} 19 | 20 | {{ if getenv "WEB_SERVER_NAME" }}ServerName {{ getenv "WEB_SERVER_NAME" }}{{ end }} 21 | {{ if getenv "WEB_SERVER_ALIAS" }}ServerAlias {{ getenv "WEB_SERVER_ALIAS" }}{{ end }} 22 | 23 | {{ if ne "true" (getenv "WEB_HTTPS_OFFLOADED") }} 24 | SSLEngine on 25 | SSLCertificateFile {{ getenv "WEB_SSL_FULLCHAIN" }} 26 | SSLCertificateKeyFile {{ getenv "WEB_SSL_PRIVKEY" }} 27 | {{ end }} 28 | 29 | {{ $includes := split (replace (replace (getenv "WEB_INCLUDES") "," " " -1) "\n" " " -1) " " }} 30 | {{ range $includes }}{{ if . }} 31 | IncludeOptional /etc/apache2/sites-available/{{ . }}.conf 32 | {{ end }} 33 | {{ end }} 34 | 35 | {{ end }} -------------------------------------------------------------------------------- /php/apache/etc/confd/templates/supervisor/apache.conf.tmpl: -------------------------------------------------------------------------------- 1 | [program:apache] 2 | command = /usr/sbin/apache2 -DFOREGROUND 3 | stdout_logfile=/dev/stdout 4 | stdout_logfile_maxbytes=0 5 | stderr_logfile=/dev/stderr 6 | stderr_logfile_maxbytes=0 7 | loglevel = warn 8 | user = root 9 | autostart = {{ getenv "START_APACHE" }} 10 | autorestart = true 11 | priority = 5 12 | -------------------------------------------------------------------------------- /php/apache/usr/local/share/container/baseimage-21.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # BC for if a sub-image extends do_apache 4 | alias_function do_webserver do_apache 5 | do_webserver() { 6 | do_apache 7 | } 8 | 9 | do_webserver_reload() { 10 | supervisor_signal USR1 apache 11 | } 12 | -------------------------------------------------------------------------------- /php/apache/usr/local/share/env/40-webserver: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export PHP_MEMORY_LIMIT_CLI=${PHP_MEMORY_LIMIT_CLI:-${PHP_MEMORY_LIMIT}} 4 | 5 | START_APACHE="$(convert_to_boolean_string "${START_APACHE:-${START_MODE_WEB:-false}}")" 6 | export START_APACHE 7 | 8 | export WEB_INCLUDES=${WEB_INCLUDES:-000-default-*} 9 | 10 | export WEB_SSL_PROTOCOLS=${WEB_SSL_PROTOCOLS:-All -SSLv2 -SSLv3} 11 | 12 | export AUTH_HTTP_FILE=${AUTH_HTTP_FILE:-/etc/apache2/htpasswd} 13 | export AUTH_HTTP_TYPE=${AUTH_HTTP_TYPE:-Basic} 14 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/nginx.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/nginx.conf.tmpl" 3 | dest = "/etc/nginx/nginx.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/nginx_basic_auth.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/nginx_basic_auth.conf.tmpl" 3 | dest = "/etc/nginx/conf.d/nginx_basic_auth.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/nginx_htpasswd.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/nginx_htpasswd.tmpl" 3 | dest = "/etc/nginx/htpasswd" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/nginx_ip_whitelist.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/nginx_ip_whitelist.conf.tmpl" 3 | dest = "/etc/nginx/conf.d/nginx_ip_whitelist.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/nginx_log_format.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/nginx_log_format.conf.tmpl" 3 | dest = "/etc/nginx/conf.d/nginx_log_format.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/nginx_realip.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/nginx_realip.conf.tmpl" 3 | dest = "/etc/nginx/conf.d/nginx_realip.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/nginx_server_name_bucket_size.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/nginx_server_name_bucket_size.conf.tmpl" 3 | dest = "/etc/nginx/conf.d/nginx_server_name_bucket_size.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/nginx_site.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/nginx_site_base.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_base.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-10-base.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/nginx_site_custom_scheme_flags.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_custom_scheme_flags.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-05-custom_scheme_flags.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/nginx_site_disable_further_php.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_disable_further_php.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-50-disable_further_php.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/nginx_site_healthcheck.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_healthcheck.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-05-site_healthcheck.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/nginx_site_phpfpm.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_phpfpm.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-30-phpfpm.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/nginx_site_redirect_to_https.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_redirect_to_https.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-06-site_redirect_to_https.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/nginx_site_rewriteapp.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_rewriteapp.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-20-rewriteapp.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/nginx_site_ssl.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_ssl.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/default-01-site_ssl.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/php-fpm-pool.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "php-fpm/pool.conf.tmpl" 3 | dest = "/etc/php/$PHP_VERSION/fpm/pool.d/www.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/php-fpm.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "php-fpm/php-fpm.conf.tmpl" 3 | dest = "/etc/php/$PHP_VERSION/fpm/php-fpm.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/php_env_fpm.ini.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "php/env.ini.tmpl" 3 | dest = "/etc/php/$PHP_VERSION/fpm/conf.d/05-env.ini" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/supervisor_fpm.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "supervisor/php-fpm.conf.tmpl" 3 | dest = "/etc/supervisor/conf.d/php-fpm.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/conf.d/supervisor_nginx.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "supervisor/nginx.conf.tmpl" 3 | dest = "/etc/supervisor/conf.d/nginx.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/templates/nginx/nginx.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if not (eq "true" (getenv "NON_PRIVILEGED_USER")) }} 2 | user www-data; 3 | {{ end }} 4 | worker_processes auto; 5 | pid /run/nginx.pid; 6 | 7 | events { 8 | worker_connections 4096; 9 | # multi_accept on; 10 | } 11 | 12 | http { 13 | 14 | ## 15 | # Basic Settings 16 | ## 17 | 18 | sendfile on; 19 | tcp_nopush on; 20 | tcp_nodelay on; 21 | keepalive_timeout 65; 22 | types_hash_max_size 2048; 23 | server_tokens off; 24 | 25 | # server_name_in_redirect off; 26 | 27 | include /etc/nginx/mime.types; 28 | default_type application/octet-stream; 29 | 30 | ## 31 | # SSL Settings 32 | ## 33 | 34 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE 35 | ssl_prefer_server_ciphers on; 36 | 37 | ## 38 | # Logging Settings 39 | ## 40 | 41 | access_log /dev/stdout; 42 | error_log /dev/stderr info; 43 | 44 | ## 45 | # Gzip Settings 46 | ## 47 | 48 | gzip on; 49 | gzip_disable "msie6"; 50 | 51 | # gzip_vary on; 52 | # gzip_proxied any; 53 | # gzip_comp_level 6; 54 | # gzip_buffers 16 8k; 55 | # gzip_http_version 1.1; 56 | # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; 57 | 58 | ## 59 | # Virtual Host Configs 60 | ## 61 | 62 | include /etc/nginx/conf.d/*.conf; 63 | include /etc/nginx/sites-enabled/*; 64 | } 65 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/templates/nginx/nginx_basic_auth.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if eq "true" (getenv "AUTH_HTTP_ENABLED") }} 2 | satisfy any; 3 | 4 | {{ if getenv "AUTH_HTTP_REMOTE_URL" }} 5 | auth_request "{{ getenv "AUTH_HTTP_REMOTE_URL" }}"; 6 | {{ else }} 7 | auth_basic "{{ getenv "AUTH_HTTP_REALM" }}"; 8 | auth_basic_user_file "{{ getenv "AUTH_HTTP_FILE" }}"; 9 | {{ end }} 10 | {{ end }} 11 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/templates/nginx/nginx_htpasswd.tmpl: -------------------------------------------------------------------------------- 1 | {{ if getenv "AUTH_HTTP_HTPASSWD" }} 2 | {{ getenv "AUTH_HTTP_HTPASSWD" }} 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/templates/nginx/nginx_ip_whitelist.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if eq "true" (getenv "AUTH_IP_WHITELIST_ENABLED") }} 2 | {{ $ips := split (replace (replace (getenv "AUTH_IP_WHITELIST") "," " " -1) "\n" " " -1) " " }} 3 | {{ range $ips }}{{ if . }} 4 | allow {{ . }}; 5 | {{ end }}{{ end }} 6 | deny all; 7 | {{ end }} 8 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/templates/nginx/nginx_log_format.conf.tmpl: -------------------------------------------------------------------------------- 1 | log_format combined_with_x_forwarded_for '$remote_addr - $remote_user [$time_local] ' 2 | '"$request" $status $body_bytes_sent ' 3 | '"$http_referer" "$http_user_agent" - "$http_x_forwarded_for"'; 4 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/templates/nginx/nginx_realip.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if (or (getenv "EXTERNAL_LOAD_BALANCER_HOST_IPS") (getenv "TRUSTED_REVERSE_PROXIES")) }} 2 | {{ if (getenv "TRUSTED_REVERSE_PROXIES") }}{{ $nodes := split (getenv "TRUSTED_REVERSE_PROXIES") "," }}{{ range $nodes }} 3 | set_real_ip_from {{ . }};{{ end }}{{ end }} 4 | {{ if (getenv "EXTERNAL_LOAD_BALANCER_HOST_IPS") }}{{ $nodes := split (getenv "EXTERNAL_LOAD_BALANCER_HOST_IPS") "\n" }}{{ range $nodes }} 5 | set_real_ip_from {{ . }};{{ end }}{{ end }} 6 | real_ip_header X-Forwarded-For; 7 | real_ip_recursive on; 8 | {{ end }} 9 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/templates/nginx/nginx_server_name_bucket_size.conf.tmpl: -------------------------------------------------------------------------------- 1 | server_names_hash_max_size 16; 2 | server_names_hash_bucket_size 128; 3 | map_hash_bucket_size 128; 4 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/templates/nginx/site.conf.tmpl: -------------------------------------------------------------------------------- 1 | server { 2 | server_name {{ getenv "WEB_SERVER_NAME" }}; 3 | {{ if ne "false" (getenv "WEB_HTTP") }} 4 | listen {{ getenv "WEB_HTTP_PORT" }} {{ if eq "true" (getenv "WEB_DEFAULT_SERVER") }} default_server{{ end }}{{ if eq "true" (getenv "WEB_HTTP2_PLAINTEXT_NONBC") }} http2{{ end }}; 5 | {{ if and (eq "true" (getenv "WEB_HTTPS_ONLY")) (ne "true" (getenv "WEB_REVERSE_PROXIED")) }} 6 | 7 | access_log off; 8 | rewrite ^ https://$host$request_uri? permanent; 9 | } 10 | 11 | server { 12 | server_name {{ getenv "WEB_SERVER_NAME" }}; 13 | {{ end }}{{ end }} 14 | {{ if eq "true" (getenv "WEB_HTTPS") }} 15 | {{ if eq "true" (getenv "WEB_HTTPS_OFFLOADED") }} 16 | listen {{ getenv "WEB_HTTPS_PORT" }}{{ if eq "true" (getenv "WEB_DEFAULT_SERVER") }} default_server{{ end }}{{ if eq "true" (getenv "WEB_HTTP2_PLAINTEXT_NONBC") }} http2{{ end }};{{ else }} 17 | listen {{ getenv "WEB_HTTPS_PORT" }}{{ if eq "true" (getenv "WEB_DEFAULT_SERVER") }} default_server{{ end }} ssl{{ if eq "true" (getenv "WEB_HTTP2_TLS") }} http2{{ end }}; 18 | ssl_certificate {{ getenv "WEB_SSL_FULLCHAIN" }}; 19 | ssl_certificate_key {{ getenv "WEB_SSL_PRIVKEY" }};{{ end }}{{ end }} 20 | 21 | set $access_log_enabled 1; 22 | 23 | {{ $includes := split (replace (replace (getenv "WEB_INCLUDES") "," " " -1) "\n" " " -1) " " }} 24 | {{ range $includes }}{{ if . }} 25 | include /etc/nginx/sites-available/{{ . }}.conf; 26 | {{ end }} 27 | {{ end }} 28 | 29 | error_log /dev/stderr notice; 30 | access_log /dev/stdout {{ getenv "NGINX_LOG_FORMAT_NAME" }} if=$access_log_enabled; 31 | } 32 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/templates/nginx/site_base.conf.tmpl: -------------------------------------------------------------------------------- 1 | root {{ getenv "WEB_DIRECTORY" }}; 2 | 3 | location / { 4 | try_files $uri @rewriteapp; 5 | } 6 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/templates/nginx/site_custom_scheme_flags.conf.tmpl: -------------------------------------------------------------------------------- 1 | set $custom_https $https; 2 | set $custom_scheme $scheme; 3 | 4 | {{ if eq "true" (getenv "WEB_HTTPS_OFFLOADED") }} 5 | if ($server_port = {{ getenv "WEB_HTTPS_PORT" }} ) { 6 | set $custom_https on; 7 | set $custom_scheme https; 8 | }{{ end }} 9 | 10 | {{ if eq "true" (getenv "WEB_REVERSE_PROXIED") }} 11 | if ($http_x_forwarded_proto) { 12 | set $custom_scheme $http_x_forwarded_proto; 13 | } 14 | 15 | if ($http_x_forwarded_proto = https) { 16 | set $custom_https on; 17 | }{{ end }} 18 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/templates/nginx/site_disable_further_php.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if eq (getenv "APP_ENDPOINT_STRICT") "true" }} 2 | location ~ ^.*\.php(/|$) { 3 | {{ if eq (getenv "APP_ENDPOINT_REWRITE") "true" }} 4 | rewrite ^(.*)$ {{ getenv "APP_ENDPOINT"}}/$1 last; 5 | {{ else }} 6 | return 404; 7 | {{ end }} 8 | } 9 | {{ end }} 10 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/templates/nginx/site_healthcheck.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if getenv "AUTH_HTTP_HEALTHCHECK_USER_AGENT" }} 2 | if ($http_user_agent ~ {{ getenv "AUTH_HTTP_HEALTHCHECK_USER_AGENT" }}) { 3 | set $do_https_redirect 0; 4 | set $access_log_enabled 0; 5 | return 200; 6 | } 7 | {{ end }} 8 | {{ if getenv "AUTH_HTTP_HEALTHCHECK_LOCATION" }} 9 | if ($request_uri = "{{ getenv "AUTH_HTTP_HEALTHCHECK_LOCATION" }}") { 10 | set $do_https_redirect 0; 11 | } 12 | 13 | location = {{ getenv "AUTH_HTTP_HEALTHCHECK_LOCATION" }} { 14 | set $do_https_redirect 0; 15 | set $access_log_enabled 0; 16 | return 200; 17 | } 18 | {{ end }} 19 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/templates/nginx/site_phpfpm.conf.tmpl: -------------------------------------------------------------------------------- 1 | location ~ ^{{ getenv "APP_ENDPOINT_REGEX" }}(/|$) { 2 | fastcgi_pass unix:/run/php{{ getenv "PHP_VERSION" }}-fpm.sock; 3 | fastcgi_split_path_info ^(.+\.php)(/.*)$; 4 | include fastcgi_params; 5 | fastcgi_param HTTPS $custom_https if_not_empty; 6 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 7 | } 8 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/templates/nginx/site_redirect_to_https.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if eq "true" (getenv "WEB_HTTPS_ONLY") }} 2 | if ($custom_scheme = 'https') { 3 | set $do_https_redirect 0; 4 | } 5 | 6 | if ($do_https_redirect != 0) { 7 | rewrite ^ https://$host$request_uri? permanent; 8 | } 9 | {{ end }} 10 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/templates/nginx/site_rewriteapp.conf.tmpl: -------------------------------------------------------------------------------- 1 | location @rewriteapp { 2 | {{ if eq (getenv "APP_ENDPOINT_REWRITE") "true" }} 3 | rewrite ^(.*)$ {{ getenv "APP_ENDPOINT"}}/$1 last; 4 | {{ end }} 5 | } 6 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/templates/nginx/site_ssl.conf.tmpl: -------------------------------------------------------------------------------- 1 | ssl_ciphers {{ getenv "WEB_SSL_CIPHERS" }}; 2 | ssl_protocols {{ getenv "WEB_SSL_PROTOCOLS" }}; 3 | ssl_prefer_server_ciphers on; 4 | ssl_session_cache {{ getenv "WEB_SSL_SESSION_CACHE" }}; 5 | ssl_session_timeout {{ getenv "WEB_SSL_SESSION_TIMEOUT" }}; 6 | 7 | {{ if getenv "WEB_SSL_TRUSTED_CERTIFICATES" }} 8 | ssl_trusted_certificates {{ getenv "WEB_SSL_TRUSTED_CERTIFICATES" }}; 9 | {{ end }} 10 | 11 | {{ if eq (getenv "WEB_SSL_OCSP_STAPLING") "true" }} 12 | ssl_stapling on; 13 | {{ if getenv "WEB_SSL_TRUSTED_CERTIFICATES" }} 14 | ssl_stapling_verify on 15 | {{ end }} 16 | {{ end }} 17 | 18 | {{ if eq (getenv "WEB_SSL_DHPARAM_ENABLE") "true" }} 19 | ssl_dhparam {{ getenv "WEB_SSL_DHPARAM_FILE" }}; 20 | {{ end }} 21 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/templates/php-fpm/php-fpm.conf.tmpl: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;; 2 | ; FPM Configuration ; 3 | ;;;;;;;;;;;;;;;;;;;;; 4 | 5 | ;;;;;;;;;;;;;;;;;; 6 | ; Global Options ; 7 | ;;;;;;;;;;;;;;;;;; 8 | 9 | [global] 10 | pid = /run/php{{ getenv "PHP_VERSION" }}-fpm.pid 11 | error_log = /dev/stderr 12 | daemonize = no 13 | 14 | ;;;;;;;;;;;;;;;;;;;; 15 | ; Pool Definitions ; 16 | ;;;;;;;;;;;;;;;;;;;; 17 | 18 | include=/etc/php/{{ getenv "PHP_VERSION" }}/fpm/pool.d/*.conf 19 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/templates/php-fpm/pool.conf.tmpl: -------------------------------------------------------------------------------- 1 | [www] 2 | user = {{ getenv "APP_USER" }} 3 | group = {{ getenv "APP_GROUP" }} 4 | 5 | catch_workers_output = yes 6 | clear_env = no 7 | 8 | listen = /run/php{{ getenv "PHP_VERSION" }}-fpm.sock 9 | 10 | {{ if not (eq "true" (getenv "NON_PRIVILEGED_USER")) }} 11 | listen.owner = www-data 12 | listen.group = www-data 13 | {{ end }} 14 | 15 | pm = dynamic 16 | 17 | pm.max_children = {{ getenv "PHPFPM_MAX_CHILDREN" }} 18 | pm.start_servers = {{ getenv "PHPFPM_START_SERVERS" }} 19 | pm.min_spare_servers = {{ getenv "PHPFPM_MIN_SPARE_SERVERS" }} 20 | pm.max_spare_servers = {{ getenv "PHPFPM_MAX_SPARE_SERVERS" }} 21 | 22 | php_value[date.timezone] = {{ getenv "PHP_TIMEZONE" }} 23 | php_value[memory_limit] = {{ getenv "PHP_MEMORY_LIMIT" }} 24 | 25 | php_admin_value[display_errors] = Off 26 | php_admin_value[error_log] = /var/log/php-fpm/stdout 27 | php_admin_flag[log_errors] = on 28 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/templates/supervisor/nginx.conf.tmpl: -------------------------------------------------------------------------------- 1 | [program:nginx] 2 | command = /usr/sbin/nginx -c /etc/nginx/nginx.conf -g 'daemon off;' 3 | stdout_logfile=/dev/stdout 4 | stdout_logfile_maxbytes=0 5 | stderr_logfile=/dev/stderr 6 | stderr_logfile_maxbytes=0 7 | loglevel = warn 8 | {{ if not (eq "true" (getenv "NON_PRIVILEGED_USER")) }} 9 | user = root 10 | {{ end }} 11 | autostart = {{ getenv "START_NGINX" }} 12 | autorestart = true 13 | priority = 5 14 | -------------------------------------------------------------------------------- /php/nginx/etc/confd/templates/supervisor/php-fpm.conf.tmpl: -------------------------------------------------------------------------------- 1 | [program:php-fpm] 2 | command = /usr/sbin/php-fpm{{ getenv "PHP_VERSION" }} -F 3 | stdout_logfile=/dev/stdout 4 | stdout_logfile_maxbytes=0 5 | stderr_logfile=/dev/stderr 6 | stderr_logfile_maxbytes=0 7 | {{ if not (eq "true" (getenv "NON_PRIVILEGED_USER")) }} 8 | user = root 9 | {{ end }} 10 | autostart = {{ getenv "START_PHP_FPM" }} 11 | autorestart = true 12 | priority = 5 13 | 14 | [program:php-fpm-logs] 15 | command = /usr/local/bin/container --no-debug tail_phpfpm_logs 16 | stdout_logfile=/dev/stdout 17 | stdout_logfile_maxbytes=0 18 | stderr_logfile=/dev/stderr 19 | stderr_logfile_maxbytes=0 20 | {{ if not (eq "true" (getenv "NON_PRIVILEGED_USER")) }} 21 | user = {{ getenv "APP_USER" }} 22 | {{ end }} 23 | autostart = {{ getenv "START_PHP_FPM" }} 24 | autorestart = true 25 | priority = 5 26 | -------------------------------------------------------------------------------- /php/nginx/usr/local/share/container/baseimage-21.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # BC for if a sub-image extends do_nginx 4 | alias_function do_webserver do_nginx 5 | do_webserver() { 6 | do_nginx 7 | } 8 | 9 | do_webserver_reload() { 10 | supervisor_signal HUP nginx 11 | } 12 | 13 | alias_function do_build do_nginx_build_inner 14 | do_build() { 15 | do_phpfpm_named_pipe 16 | do_nginx_build_inner 17 | } 18 | 19 | alias_function do_start do_nginx_start_inner 20 | do_start() { 21 | do_nginx_start_inner 22 | do_phpfpm_named_pipe 23 | } 24 | 25 | do_phpfpm_named_pipe() { 26 | if [ ! -p /var/log/php-fpm/stdout ]; then 27 | if [ -e /var/log/php-fpm/stdout ]; then 28 | rm -f /var/log/php-fpm/stdout 29 | fi 30 | mkdir -p /var/log/php-fpm/ 31 | mkfifo -m 0660 /var/log/php-fpm/stdout 32 | fi 33 | chown -R "$APP_USER:$APP_GROUP" /var/log/php-fpm/ 34 | } 35 | 36 | do_tail_phpfpm_logs() 37 | { 38 | cat 0<> /var/log/php-fpm/stdout 39 | } 40 | -------------------------------------------------------------------------------- /php/nginx/usr/local/share/env/40-webserver: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export PHP_MEMORY_LIMIT_CLI=${PHP_MEMORY_LIMIT_CLI:--1} 4 | 5 | export PHPFPM_MAX_CHILDREN=${PHPFPM_MAX_CHILDREN:-5} 6 | export PHPFPM_START_SERVERS=${PHPFPM_START_SERVERS:-2} 7 | export PHPFPM_MIN_SPARE_SERVERS=${PHPFPM_MIN_SPARE_SERVERS:-1} 8 | export PHPFPM_MAX_SPARE_SERVERS=${PHPFPM_MAX_SPARE_SERVERS:-3} 9 | 10 | START_NGINX="$(convert_to_boolean_string "${START_NGINX:-${START_WEB:-false}}")" 11 | export START_NGINX 12 | START_PHP_FPM="$(convert_to_boolean_string "${START_PHP_FPM:-${START_WEB:-false}}")" 13 | export START_PHP_FPM 14 | 15 | WEB_HTTP2_TLS="$(convert_to_boolean_string "${WEB_HTTP2_TLS:-true}")" 16 | export WEB_HTTP2_TLS 17 | WEB_HTTP2_PLAINTEXT_NONBC="$(convert_to_boolean_string "${WEB_HTTP2_PLAINTEXT_NONBC:-false}")" 18 | export WEB_HTTP2_PLAINTEXT_NONBC 19 | 20 | export WEB_INCLUDES=${WEB_INCLUDES:-default-*} 21 | WEB_DEFAULT_SERVER="$(convert_to_boolean_string "${WEB_DEFAULT_SERVER:-true}")" 22 | export WEB_DEFAULT_SERVER 23 | 24 | export WEB_SERVER_NAME=${WEB_SERVER_NAME:-_} 25 | export WEB_SSL_PROTOCOLS=${WEB_SSL_PROTOCOLS:-TLSv1 TLSv1.1 TLSv1.2} 26 | 27 | export AUTH_HTTP_FILE=${AUTH_HTTP_FILE:-/etc/nginx/htpasswd} 28 | 29 | export NGINX_LOG_FORMAT_NAME=${NGINX_LOG_FORMAT_NAME:-combined} 30 | -------------------------------------------------------------------------------- /php/shared/etc/confd/conf.d/crond_dhparam_regenerate.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "crond/dhparam_regenerate.tmpl" 3 | dest = "/etc/cron.d/dhparam_regenerate" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/shared/etc/confd/conf.d/php_env_cli.ini.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "php/env.ini.tmpl" 3 | dest = "/etc/php/$PHP_VERSION/cli/conf.d/05-env.ini" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/shared/etc/confd/conf.d/postfix_main.cf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "postfix/main.cf.tmpl" 3 | dest = "/etc/postfix/main.cf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/shared/etc/confd/conf.d/postfix_sasl_passwd.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "postfix/sasl_passwd.tmpl" 3 | dest = "/etc/postfix/sasl_passwd" 4 | mode = "0600" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/shared/etc/confd/conf.d/supervisor_dhparam_regenerate.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "supervisor/dhparam_regenerate.conf.tmpl" 3 | dest = "/etc/supervisor/conf.d/dhparam_regenerate.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/shared/etc/confd/conf.d/supervisor_postfix.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "supervisor/postfix.conf.tmpl" 3 | dest = "/etc/supervisor/conf.d/postfix.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | 8 | -------------------------------------------------------------------------------- /php/shared/etc/confd/conf.d/tideways.ini.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "tideways/tideways.ini.tmpl" 3 | dest = "/etc/php/$PHP_VERSION/mods-available/tideways.ini" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/shared/etc/confd/conf.d/xdebug.ini.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "xdebug/xdebug.ini.tmpl" 3 | dest = "/etc/php/$PHP_VERSION/mods-available/xdebug.ini" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /php/shared/etc/confd/templates/crond/dhparam_regenerate.tmpl: -------------------------------------------------------------------------------- 1 | {{ if and (eq "true" (getenv "WEB_SSL_DHPARAM_ENABLE")) (ne "false" (getenv "WEB_SSL_DHPARAM_CRON")) }} 2 | MAILTO="" 3 | {{ getenv "WEB_SSL_DHPARAM_CRON" }} root supervisorctl --user supervisor --password supervisor start dhparam-regenerate 4 | {{ end }} 5 | -------------------------------------------------------------------------------- /php/shared/etc/confd/templates/php/env.ini.tmpl: -------------------------------------------------------------------------------- 1 | ; configuration for php common settings 2 | ; priority=05 3 | date.timezone = {{ getenv "PHP_TIMEZONE" }} 4 | memory_limit = {{ getenv "PHP_MEMORY_LIMIT_CLI" }} 5 | opcache.interned_strings_buffer = {{ getenv "PHP_OPCACHE_INTERNED_STRINGS_BUFFER" }} 6 | opcache.max_accelerated_files = {{ getenv "PHP_OPCACHE_MAX_ACCELERATED_FILES" }} 7 | opcache.memory_consumption = {{ getenv "PHP_OPCACHE_MEMORY_CONSUMPTION" }} 8 | opcache.validate_timestamps = {{ getenv "PHP_OPCACHE_VALIDATE_TIMESTAMPS" }} 9 | opcache.enable_cli = {{ getenv "PHP_OPCACHE_ENABLE_CLI" }} 10 | realpath_cache_size = {{ getenv "PHP_REALPATH_CACHE_SIZE" }} 11 | realpath_cache_ttl={{ getenv "PHP_REALPATH_CACHE_TTL" }} 12 | expose_php = Off 13 | 14 | error_log = /dev/stdout 15 | -------------------------------------------------------------------------------- /php/shared/etc/confd/templates/postfix/main.cf.tmpl: -------------------------------------------------------------------------------- 1 | append_dot_mydomain = no 2 | biff = no 3 | header_size_limit = 4096000 4 | inet_interfaces = loopback-only 5 | inet_protocols = ipv4 6 | mydestination = {{ getenv "WEB_HOST" }}, localhost.localdomain, localhost 7 | mydomain = {{ getenv "WEB_HOST" }} 8 | myhostname = {{ getenv "WEB_HOST" }} 9 | myorigin = $myhostname 10 | {{ if getenv "SENDMAIL_RELAY_HOST" }} 11 | relayhost = [{{ getenv "SENDMAIL_RELAY_HOST" }}]:{{ getenv "SENDMAIL_RELAY_PORT" }} 12 | {{ end }} 13 | {{ if getenv "SENDMAIL_RELAY_USER" }} 14 | smtp_sasl_auth_enable = yes 15 | smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd 16 | smtp_sasl_security_options = noanonymous 17 | {{ end }} 18 | smtp_tls_CAfile = /etc/ssl/certs/ssl-cert-snakeoil.pem 19 | smtp_tls_security_level = {{ getenv "SENDMAIL_RELAY_TLS_SECURITY_LEVEL" }} 20 | smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache 21 | smtpd_tls_CAfile = /etc/ssl/certs/ssl-cert-snakeoil.pem 22 | smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem 23 | smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key 24 | smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache 25 | smtpd_use_tls = yes 26 | -------------------------------------------------------------------------------- /php/shared/etc/confd/templates/postfix/sasl_passwd.tmpl: -------------------------------------------------------------------------------- 1 | [{{ getenv "SENDMAIL_RELAY_HOST"}}]:{{ getenv "SENDMAIL_RELAY_PORT" }} {{ getenv "SENDMAIL_RELAY_USER" }}:{{ getenv "SENDMAIL_RELAY_PASSWORD" }} 2 | -------------------------------------------------------------------------------- /php/shared/etc/confd/templates/supervisor/dhparam_regenerate.conf.tmpl: -------------------------------------------------------------------------------- 1 | [program:dhparam-regenerate] 2 | command = container --no-debug dhparam_regenerate 3 | startsecs = 0 4 | autostart = no 5 | autorestart = false -------------------------------------------------------------------------------- /php/shared/etc/confd/templates/supervisor/postfix.conf.tmpl: -------------------------------------------------------------------------------- 1 | [program:postfix] 2 | process_name = master 3 | directory = /etc/postfix 4 | command = /usr/local/sbin/postfix.sh 5 | startsecs = 0 6 | autostart = {{ if getenv "SENDMAIL_RELAY_HOST" }}yes{{ else }}no{{ end }} 7 | autorestart = false -------------------------------------------------------------------------------- /php/shared/etc/confd/templates/tideways/tideways.ini.tmpl: -------------------------------------------------------------------------------- 1 | ; Configuration for Tideways Profiler Extension 2 | ; priority=40 3 | {{if eq "true" (getenv "TIDEWAYS_ENABLED")}} 4 | extension=tideways.so 5 | {{end}} 6 | 7 | ; Tideways Application API-Key to configure when using just one application on 8 | ; this php installation. 9 | {{if getenv "TIDEWAYS_API_KEY"}} 10 | tideways.api_key = {{ getenv "TIDEWAYS_API_KEY" }} 11 | tideways.connection = {{ getenv "TIDEWAYS_CONNECTION" }} 12 | {{end}} 13 | 14 | ; Configure the profiling sample rate for this PHP server globally. The given 15 | ; number is an integer representing percent between 0 and 100 16 | tideways.sample_rate={{getenv "TIDEWAYS_SAMPLE_RATE"}} 17 | 18 | {{if getenv "TIDEWAYS_COLLECT"}} 19 | tideways.collect={{getenv "TIDEWAYS_COLLECT"}} 20 | {{end}} 21 | 22 | ; Automatically detect transactions and exceptions of a given framework The 23 | ; following frameworks are currently supported: 24 | ; 25 | ; symfony2, symfony2c, shopware, oxid, magento, zend1, zend2, laravel, 26 | ; wordpress 27 | {{if getenv "TIDEWAYS_FRAMEWORK"}} 28 | tideways.framework={{ getenv "TIDEWAYS_FRAMEWORK" }} 29 | {{end}} 30 | 31 | {{if getenv "TIDEWAYS_SERVICE"}} 32 | tideways.service={{ getenv "TIDEWAYS_SERVICE" }} 33 | {{end}} 34 | -------------------------------------------------------------------------------- /php/shared/etc/confd/templates/xdebug/xdebug.ini.tmpl: -------------------------------------------------------------------------------- 1 | {{ if eq "true" (getenv "XDEBUG_REMOTE_ENABLED") }} 2 | zend_extension=xdebug.so 3 | xdebug.remote_enable={{ getenv "XDEBUG_REMOTE_ENABLED" }} 4 | xdebug.remote_host={{ getenv "XDEBUG_REMOTE_HOST" }} 5 | xdebug.remote_port={{ getenv "XDEBUG_REMOTE_PORT" }} 6 | xdebug.remote_log= 7 | xdebug.remote_autostart={{ getenv "XDEBUG_REMOTE_AUTOSTART" }} 8 | {{ else }} 9 | ;zend_extension=xdebug.so 10 | {{ end }} 11 | -------------------------------------------------------------------------------- /php/shared/etc/supervisor/conf.d/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/continuouspipe/dockerfiles/f89d6857af09999f928ca022d131298f474adb7d/php/shared/etc/supervisor/conf.d/.gitkeep -------------------------------------------------------------------------------- /php/shared/usr/local/sbin/postfix.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # call "postfix stop" when exiting 3 | trap "{ echo Stopping Postfix; /usr/sbin/postfix stop; exit 0; }" EXIT 4 | 5 | source /etc/sysconfig/network 6 | 7 | /usr/libexec/postfix/aliasesdb 8 | /usr/libexec/postfix/chroot-update 9 | 10 | if [ -n "${SENDMAIL_RELAY_USER}" ]; then 11 | postmap /etc/postfix/sasl_passwd 12 | fi 13 | 14 | # fix postfix dns resolution 15 | cp /etc/resolv.conf /var/spool/postfix/etc/resolv.conf 16 | 17 | # start postfix 18 | /usr/sbin/postfix -c /etc/postfix start 19 | 20 | # avoid exiting 21 | sleep infinity 22 | -------------------------------------------------------------------------------- /php/shared/usr/local/share/container/baseimage-20.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source /usr/local/share/database/database_functions.sh 4 | source /usr/local/share/assets/assets_functions.sh 5 | source /usr/local/share/php/common_functions.sh 6 | source /usr/local/share/php/webserver_functions.sh 7 | 8 | alias_function do_build do_php_build_inner 9 | do_build() { 10 | do_php_build_inner 11 | do_build_permissions 12 | parallel --no-notice --line-buffer --tag --halt-on-error now,fail=1 ::: do_assets_all do_composer 13 | } 14 | 15 | alias_function do_start do_php_web_start_inner 16 | do_start() { 17 | if [ "${DEVELOPMENT_MODE}" == "false" ]; then 18 | do_assets_all 19 | fi 20 | do_webserver 21 | do_php_web_start_inner 22 | } 23 | 24 | alias_function do_development_start do_php_development_start_inner 25 | do_development_start() { 26 | do_php_development_start_inner 27 | do_build_permissions 28 | parallel --no-notice --line-buffer --tag --halt-on-error now,fail=1 ::: do_assets_all do_composer 29 | } 30 | 31 | alias_function do_setup do_php_setup_inner 32 | do_setup() { 33 | do_php_setup_inner 34 | ASSETS_FILES_ENABLED="false" do_assets_all 35 | } 36 | -------------------------------------------------------------------------------- /php/shared/usr/local/share/env/20-heroku: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # If running inside Heroku, exposed port is in `$PORT` 4 | IN_HEROKU="$(convert_to_boolean_string "${IN_HEROKU:-false}")" 5 | if [ "true" = "$IN_HEROKU" ]; then 6 | export WEB_HTTPS="false" 7 | export WEB_HTTP_PORT=$PORT 8 | 9 | export IS_CHOWN_FORBIDDEN="true" 10 | export NON_PRIVILEGED_USER="true" 11 | fi 12 | -------------------------------------------------------------------------------- /php/shared/usr/local/share/env/35-stack: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export WORK_DIRECTORY=${WORK_DIRECTORY:-/app} 4 | -------------------------------------------------------------------------------- /php/shared/usr/local/share/env/40-assets: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -n "${ASSETS_ENV:-}" ]; then 4 | export ASSETS_PATH="${ASSETS_PATH:-tools/assets/${ASSETS_ENV}}" 5 | 6 | if [ -n "${ASSETS_S3_BUCKET:-}" ]; then 7 | export ASSETS_S3_BUCKET_PATH="${ASSETS_S3_BUCKET_PATH:-s3://${ASSETS_S3_BUCKET}/${ASSETS_ENV}}" 8 | fi 9 | fi 10 | 11 | export DATABASE_PLATFORM=${DATABASE_PLATFORM:-mysql} 12 | 13 | case "${DATABASE_PLATFORM}" in 14 | mysql) 15 | DATABASE_DEFAULT_PORT=3306 16 | ;; 17 | postgres) 18 | DATABASE_DEFAULT_PORT=5432 19 | ;; 20 | esac 21 | 22 | DATABASE_PORT="$(canonical_port "${DATABASE_PORT:-${DATABASE_DEFAULT_PORT}}")" 23 | export DATABASE_PORT 24 | 25 | export ASSETS_S3_EXCLUDE_PATTERN=${ASSETS_S3_EXCLUDE_PATTERN:-} 26 | 27 | ASSETS_CLEANUP="$(convert_to_boolean_string "${ASSETS_CLEANUP:-true}")" 28 | export ASSETS_CLEANUP 29 | 30 | ASSETS_DATABASE_ENABLED="$(convert_to_boolean_string "${ASSETS_DATABASE_ENABLED:-true}")" 31 | export ASSETS_DATABASE_ENABLED 32 | 33 | export ASSETS_DATABASE_PATTERN="${ASSETS_DATABASE_PATTERN:-/([^/\.]+)(\.[^/]*)?\.sql(\.(gz|bz2))?$}" 34 | export ASSETS_DATABASE_NAME_CAPTURE_GROUP="${ASSETS_DATABASE_NAME_CAPTURE_GROUP:-1}" 35 | export ASSETS_DATABASE_WAIT_TIMEOUT="${ASSETS_DATABASE_WAIT_TIMEOUT:-10}" 36 | 37 | ASSETS_FILES_ENABLED="$(convert_to_boolean_string "${ASSETS_FILES_ENABLED:-true}")" 38 | export ASSETS_FILES_ENABLED 39 | 40 | export ASSETS_FILES_PATTERN="${ASSETS_FILES_PATTERN:-/([^/]*)\.files\.(tgz|tar|tar\.gz|tar\.bz2)$}" 41 | -------------------------------------------------------------------------------- /php/shared/usr/local/share/env/55-assets: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -n "${ASSETS_PATH:-}" ]; then 4 | ASSETS_PATH=$(resolve_path "${ASSETS_PATH}" "${WORK_DIRECTORY}") 5 | export ASSETS_PATH 6 | fi 7 | -------------------------------------------------------------------------------- /php/shared/usr/local/share/env/55-stack: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Relative WEB_DIRECTORY converted to absolute path 4 | if ! [[ "$WEB_DIRECTORY" =~ ^/ ]]; then 5 | export WEB_DIRECTORY=${WORK_DIRECTORY}/${WEB_DIRECTORY} 6 | fi 7 | 8 | if [ "${WEB_HTTP}" == "true" ]; then 9 | export WEB_HTTPS_ONLY=false 10 | else 11 | export WEB_HTTPS_ONLY=${WEB_HTTPS_ONLY:-$WEB_HTTPS} 12 | fi 13 | 14 | if [ -z "${APP_ENDPOINT_REGEX:-}" ]; then 15 | if [ "${APP_ENDPOINT_STRICT}" == "true" ]; then 16 | APP_ENDPOINT_REGEX=$(php -r 'echo preg_quote(getenv("APP_ENDPOINT"));') 17 | else 18 | APP_ENDPOINT_REGEX=".*\\.php" 19 | fi 20 | export APP_ENDPOINT_REGEX 21 | fi 22 | 23 | DEFAULT_COMPOSER_FLAGS="--no-interaction --optimize-autoloader" 24 | 25 | if [ -z "$DEVELOPMENT_MODE" ] || [ "$DEVELOPMENT_MODE" != 'true' ]; then 26 | DEFAULT_COMPOSER_FLAGS="${DEFAULT_COMPOSER_FLAGS} --no-dev" 27 | fi 28 | export COMPOSER_INSTALL_FLAGS=${COMPOSER_INSTALL_FLAGS:-$DEFAULT_COMPOSER_FLAGS} 29 | 30 | if [ "$DEVELOPMENT_MODE" != "true" ] && [ "$PHP_OPCACHE_VALIDATE_TIMESTAMPS_IS_DEFAULT" == "true" ]; then 31 | export PHP_OPCACHE_VALIDATE_TIMESTAMPS=${PHP_OPCACHE_VALIDATE_TIMESTAMPS:-0} 32 | fi 33 | -------------------------------------------------------------------------------- /php/tests/integration/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG IMAGE_NAME= 2 | FROM quay.io/continuouspipe/$IMAGE_NAME:latest 3 | 4 | COPY . /app 5 | 6 | RUN container build 7 | -------------------------------------------------------------------------------- /php/tests/integration/tests/plan.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | do_run_tests() 4 | { 5 | set -o pipefail 6 | local SERVICE_NAME 7 | for server in nginx apache; do 8 | for version in 7.3 7.2 7.1 5.6; do 9 | SERVICE_NAME="web_${version/./_}_${server}" 10 | wait_for_remote_ports 60 "$SERVICE_NAME:443" 11 | curl --insecure --fail "https://$SERVICE_NAME/" | grep PHP_VERSION | grep -q "$version" 12 | done 13 | 14 | # shellcheck disable=SC2043 15 | for version in 7; do 16 | SERVICE_NAME="web_${version}_0_${server}" 17 | wait_for_remote_ports 60 "$SERVICE_NAME:443" 18 | curl --insecure --fail "https://$SERVICE_NAME/" | grep PHP_VERSION | grep -q "${version}\.0" 19 | done 20 | done 21 | } 22 | -------------------------------------------------------------------------------- /php/tests/integration/web/index.php: -------------------------------------------------------------------------------- 1 | /etc/apt/sources.list \ 6 | && echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ 7 | && echo "deb http://archive.debian.org/debian/ jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list \ 8 | && echo "deb-src http://archive.debian.org/debian/ jessie-backports main" >> /etc/apt/sources.list.d/jessie-backports.list \ 9 | && echo "Acquire::Check-Valid-Until false;" >> /etc/apt/apt.conf.d/10-nocheckvalid \ 10 | && echo 'Package: *\nPin: origin "archive.debian.org"\nPin-Priority: 500' >> /etc/apt/preferences.d/10-archive-pin \ 11 | && apt-get update -qq \ 12 | && DEBIAN_FRONTEND=noninteractive apt-get -s dist-upgrade | grep "^Inst" | \ 13 | grep -i securi | awk -F " " '{print $2}' | \ 14 | xargs apt-get -qq -y --no-install-recommends install \ 15 | \ 16 | # Clean the image \ 17 | && apt-get autoremove -qq \ 18 | && apt-get clean \ 19 | && rm -rf /var/lib/apt/lists/* 20 | 21 | COPY ./usr/ /usr 22 | 23 | CMD ["/bin/bash", "-c", "/usr/local/share/solr/startup.sh"] 24 | -------------------------------------------------------------------------------- /solr/4.10/usr/local/share/solr/startup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Force bash job control on, to allow us to make solr be in the foreground later 4 | set -m 5 | 6 | set -xe 7 | 8 | SOLR_CORE_NAME=${SOLR_CORE_NAME:-maincore} 9 | 10 | mkdir -p "/usr/local/share/solr/$SOLR_CORE_NAME/data/tlog" \ 11 | && chown -R solr:solr "/usr/local/share/solr/$SOLR_CORE_NAME/data/" \ 12 | && chown solr:solr "/usr/local/share/solr/$SOLR_CORE_NAME/" 13 | 14 | # Run solr in the background, siphoning logs to /tmp/solr.log temporarily until booted. 15 | exec su -l solr -c "exec /opt/solr/bin/solr -f -s /usr/local/share/solr/ | tee /tmp/solr.log" & 16 | 17 | check_for_solr_started() 18 | { 19 | grep -q "Started SocketConnector@0.0.0.0:8983" /tmp/solr.log 20 | } 21 | 22 | set +e 23 | until check_for_solr_started; do 24 | sleep 1 25 | done 26 | 27 | # Clean up 28 | pkill -9 tee 29 | rm /tmp/solr.log 30 | 31 | # Check for existing core 32 | curl -s "http://localhost:8983/solr/admin/cores?action=STATUS&core=$SOLR_CORE_NAME" | grep -q "$SOLR_CORE_NAME" 33 | CORE_EXISTS=$? 34 | if [ "$CORE_EXISTS" -ne 0 ]; then 35 | curl -IX GET "http://localhost:8983/solr/admin/cores?action=CREATE&name=d8&instanceDir=$SOLR_CORE_NAME&config=solrconfig.xml&schema=schema.xml&dataDir=data" 36 | fi 37 | 38 | # Let solr force this bash process to continue, avoiding docker daemon thinking we have crashed. 39 | fg 40 | -------------------------------------------------------------------------------- /solr/6.2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM solr:6.2 2 | 3 | USER root 4 | 5 | RUN echo "deb http://deb.debian.org/debian/ jessie main" > /etc/apt/sources.list \ 6 | && echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ 7 | && echo "deb http://archive.debian.org/debian/ jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list \ 8 | && echo "deb-src http://archive.debian.org/debian/ jessie-backports main" >> /etc/apt/sources.list.d/jessie-backports.list \ 9 | && echo "Acquire::Check-Valid-Until false;" >> /etc/apt/apt.conf.d/10-nocheckvalid \ 10 | && echo 'Package: *\nPin: origin "archive.debian.org"\nPin-Priority: 500' >> /etc/apt/preferences.d/10-archive-pin \ 11 | && apt-get update -qq \ 12 | && DEBIAN_FRONTEND=noninteractive apt-get -s dist-upgrade | grep "^Inst" | \ 13 | grep -i securi | awk -F " " '{print $2}' | \ 14 | xargs apt-get -qq -y --no-install-recommends install \ 15 | \ 16 | # Clean the image \ 17 | && apt-get autoremove -qq \ 18 | && apt-get clean \ 19 | && rm -rf /var/lib/apt/lists/* 20 | 21 | USER solr 22 | 23 | COPY ./docker-entrypoint-initdb.d/ /docker-entrypoint-initdb.d 24 | -------------------------------------------------------------------------------- /solr/6.2/README.md: -------------------------------------------------------------------------------- 1 | # Solr 6 2 | 3 | In a docker-compose.yml: 4 | ```yml 5 | version: '3' 6 | services: 7 | solr: 8 | image: quay.io/continuouspipe/solr6:latest 9 | environment: 10 | SOLR_CORE_NAME: example_core 11 | volumes: 12 | - solr_data:/usr/local/share/solr/example_core/data/ 13 | 14 | volumes: 15 | solr_data: 16 | driver: local 17 | driver_opts: 18 | type: tmpfs 19 | device: tmpfs 20 | o: size=100m,uid=1000 21 | ``` 22 | 23 | In a Dockerfile: 24 | ```Dockerfile 25 | FROM quay.io/continuouspipe/solr6:latest 26 | ``` 27 | 28 | ## How to build 29 | ```bash 30 | docker-compose build --pull solr_6_2 31 | docker-compose push solr_6_2 32 | ``` 33 | 34 | ## About 35 | 36 | This is a Docker image that provides a Solr 6 search service that tracks the upstream library image. 37 | 38 | ## How to use 39 | 40 | As this is based off of an official solr image, please see their README, here: 41 | https://hub.docker.com/_/solr/ 42 | -------------------------------------------------------------------------------- /solr/6.2/docker-entrypoint-initdb.d/create-main-core.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -n "$IS_INNER_REQUEST" ]; then 4 | return 0 5 | fi 6 | SOLR_CORE_NAME=${SOLR_CORE_NAME:-maincore} 7 | IS_INNER_REQUEST="true" /opt/docker-solr/scripts/docker-entrypoint.sh solr-create -c "${SOLR_CORE_NAME}" -d /usr/local/share/solr/ 8 | -------------------------------------------------------------------------------- /solr/6.2/usr/local/share/solr/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/continuouspipe/dockerfiles/f89d6857af09999f928ca022d131298f474adb7d/solr/6.2/usr/local/share/solr/.gitkeep -------------------------------------------------------------------------------- /spryker/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG PHP_VERSION 2 | ARG WEB_SERVER 3 | ARG FROM_TAG=latest 4 | FROM quay.io/continuouspipe/php${PHP_VERSION}-${WEB_SERVER}:${FROM_TAG} 5 | 6 | ARG PHP_VERSION 7 | ARG WEB_SERVER 8 | 9 | RUN curl -sL https://deb.nodesource.com/setup_6.x > /tmp/install-node.sh \ 10 | && bash /tmp/install-node.sh \ 11 | && apt-get update -qq -y \ 12 | && DEBIAN_FRONTEND=noninteractive apt-get -qq -y --no-install-recommends install \ 13 | build-essential \ 14 | graphviz \ 15 | nodejs \ 16 | "php${PHP_VERSION}-gmp" \ 17 | redis-tools \ 18 | \ 19 | # Clean the image \ 20 | && apt-get auto-remove -qq -y \ 21 | && apt-get clean \ 22 | && rm -rf /var/lib/apt/lists/* 23 | 24 | COPY ./etc/ ./${WEB_SERVER}/etc/ /etc/ 25 | COPY ./usr/ ./${WEB_SERVER}/usr/ /usr/ 26 | -------------------------------------------------------------------------------- /spryker/apache/etc/apache2/sites-enabled/001-yves.conf: -------------------------------------------------------------------------------- 1 | /etc/apache2/sites-available/001-yves.conf -------------------------------------------------------------------------------- /spryker/apache/etc/apache2/sites-enabled/002-zed.conf: -------------------------------------------------------------------------------- 1 | /etc/apache2/sites-available/002-zed.conf -------------------------------------------------------------------------------- /spryker/apache/etc/confd/templates/apache/site_base.conf.tmpl: -------------------------------------------------------------------------------- 1 | # empty file to replace upstream configuration 2 | -------------------------------------------------------------------------------- /spryker/apache/etc/confd_yves/conf.d/apache2_site_yves.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/site_yves.conf.tmpl" 3 | dest = "/etc/apache2/sites-available/001-yves.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /spryker/apache/etc/confd_yves/conf.d/apache2_site_yves_webroot.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/site_yves_webroot.conf.tmpl" 3 | dest = "/etc/apache2/sites-available/001-yves-01-webroot.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /spryker/apache/etc/confd_yves/templates/apache/site_yves.conf.tmpl: -------------------------------------------------------------------------------- 1 | /etc/confd/templates/apache/virtual-host.conf.tmpl -------------------------------------------------------------------------------- /spryker/apache/etc/confd_yves/templates/apache/site_yves_webroot.conf.tmpl: -------------------------------------------------------------------------------- 1 | DocumentRoot {{ getenv "WEB_DIRECTORY" }}/Yves 2 | 3 | 4 | Options FollowSymLinks 5 | AllowOverride None 6 | Require all granted 7 | 8 | -------------------------------------------------------------------------------- /spryker/apache/etc/confd_zed/conf.d/apache2_site_zed.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/site_zed.conf.tmpl" 3 | dest = "/etc/apache2/sites-available/002-zed.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /spryker/apache/etc/confd_zed/conf.d/apache2_site_zed_webroot.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "apache/site_zed_webroot.conf.tmpl" 3 | dest = "/etc/apache2/sites-available/002-zed-01-webroot.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /spryker/apache/etc/confd_zed/templates/apache/site_zed.conf.tmpl: -------------------------------------------------------------------------------- 1 | /etc/confd/templates/apache/virtual-host.conf.tmpl -------------------------------------------------------------------------------- /spryker/apache/etc/confd_zed/templates/apache/site_zed_webroot.conf.tmpl: -------------------------------------------------------------------------------- 1 | DocumentRoot {{ getenv "WEB_DIRECTORY" }}/Zed 2 | 3 | 4 | Options FollowSymLinks 5 | AllowOverride None 6 | Require all granted 7 | 8 | -------------------------------------------------------------------------------- /spryker/apache/usr/local/share/env/31-framework-apache: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export YVES_WEB_INCLUDES=${YVES_WEB_INCLUDES:-000-default-* 001-yves-*} 4 | export ZED_WEB_INCLUDES=${ZED_WEB_INCLUDES:-000-default-* 002-zed-*} 5 | -------------------------------------------------------------------------------- /spryker/etc/confd/conf.d/cron_ofelia_spryker.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "cron/ofelia_spryker.ini.tmpl" 3 | dest = "/etc/ofelia/config.ini" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /spryker/etc/confd/conf.d/cron_spryker.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "cron/spryker.tmpl" 3 | dest = "/etc/cron.d/spryker" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /spryker/etc/confd/conf.d/supervisor_spryker_collectors_crons.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "supervisor/spryker_collectors_crons.conf.tmpl" 3 | dest = "/etc/supervisor/conf.d/spryker_collectors_crons.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /spryker/etc/confd/conf.d/supervisor_spryker_crons.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "supervisor/spryker_crons.conf.tmpl" 3 | dest = "/etc/supervisor/conf.d/spryker_crons.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] -------------------------------------------------------------------------------- /spryker/etc/confd/conf.d/supervisor_spryker_queue_worker.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "supervisor/spryker_queue_worker.conf.tmpl" 3 | dest = "/etc/supervisor/conf.d/spryker_queue_worker.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /spryker/etc/confd/templates/cron/ofelia_spryker.ini.tmpl: -------------------------------------------------------------------------------- 1 | [job-local "mailqueue-registration-send"] 2 | schedule = 0 */10 * * * * 3 | command = supervisorctl -c /etc/supervisor/supervisord.conf -u supervisor -p supervisor start mailqueue-registration-send 4 | 5 | [job-local "stores-collectors"] 6 | schedule = @every 1m 7 | command = supervisorctl -c /etc/supervisor/supervisord.conf -u supervisor -p supervisor start stores-collectors 8 | 9 | [job-local "oms-check-condition"] 10 | schedule = @every 1m 11 | command = supervisorctl -c /etc/supervisor/supervisord.conf -u supervisor -p supervisor start oms-check-condition 12 | 13 | [job-local "oms-check-timeout"] 14 | schedule = @every 1m 15 | command = supervisorctl -c /etc/supervisor/supervisord.conf -u supervisor -p supervisor start oms-check-timeout 16 | 17 | [job-local "oms-clear-locks"] 18 | schedule = 0 0 6 * * * 19 | command = supervisorctl -c /etc/supervisor/supervisord.conf -u supervisor -p supervisor start oms-clear-locks 20 | -------------------------------------------------------------------------------- /spryker/etc/confd/templates/cron/spryker.tmpl: -------------------------------------------------------------------------------- 1 | # don't send any mail 2 | MAILTO="" 3 | SUPERVISORCTL="supervisorctl -c /etc/supervisor/supervisord.conf -u supervisor -p supervisor" 4 | 5 | */10 * * * * root $SUPERVISORCTL start mailqueue-registration-send 6 | * * * * * root $SUPERVISORCTL start stores-collectors 7 | * * * * * root $SUPERVISORCTL start oms-check-condition 8 | * * * * * root $SUPERVISORCTL start oms-check-timeout 9 | 0 6 * * * root $SUPERVISORCTL start oms-clear-locks 10 | -------------------------------------------------------------------------------- /spryker/etc/confd/templates/supervisor/spryker_collectors_crons.conf.tmpl: -------------------------------------------------------------------------------- 1 | [program: stores-collectors] 2 | command = /usr/local/bin/container spryker_run_collectors 3 | startsecs = 0 4 | startretries = 0 5 | stdout_logfile=/dev/stdout 6 | stdout_logfile_maxbytes=0 7 | stderr_logfile=/dev/stderr 8 | stderr_logfile_maxbytes=0 9 | {{ if not (eq "true" (getenv "NON_PRIVILEGED_USER")) }} 10 | user = root 11 | {{ end }} 12 | autostart = false 13 | autorestart = false 14 | priority = 5 15 | -------------------------------------------------------------------------------- /spryker/etc/confd/templates/supervisor/spryker_crons.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ $nodes := split (getenv "SPRYKER_CRON_COMMANDS") "," }} 2 | {{ range $nodes }} 3 | [program: {{ replace ( . ) ":" "-" -1 }}] 4 | command = /app/vendor/bin/console {{ . }} 5 | startsecs = 0 6 | startretries = 0 7 | stdout_logfile=/dev/stdout 8 | stdout_logfile_maxbytes=0 9 | stderr_logfile=/dev/stderr 10 | stderr_logfile_maxbytes=0 11 | {{ if not (eq "true" (getenv "NON_PRIVILEGED_USER")) }} 12 | user = www-data 13 | {{ end }} 14 | autostart = false 15 | autorestart = false 16 | priority = 5 17 | {{ end }} 18 | -------------------------------------------------------------------------------- /spryker/etc/confd/templates/supervisor/spryker_queue_worker.conf.tmpl: -------------------------------------------------------------------------------- 1 | {{ if ne "1" (getenv "IMAGE_VERSION") }} 2 | [program:spryker_queue_worker] 3 | command = /app/vendor/bin/console queue:worker:start 4 | stdout_logfile=/dev/stdout 5 | stdout_logfile_maxbytes=0 6 | stderr_logfile=/dev/stderr 7 | stderr_logfile_maxbytes=0 8 | user = {{ getenv "APP_USER" }} 9 | autostart = {{ getenv "SPRYKER_START_QUEUE_WORKER" }} 10 | autorestart = true 11 | priority = 5 12 | {{ end }} 13 | -------------------------------------------------------------------------------- /spryker/etc/ofelia/.gitkeep: -------------------------------------------------------------------------------- 1 | # Folder is required for confd to successfully generate the configuration -------------------------------------------------------------------------------- /spryker/nginx/etc/confd/templates/nginx/site_base.conf.tmpl: -------------------------------------------------------------------------------- 1 | location / { 2 | try_files $uri @rewriteapp; 3 | } 4 | -------------------------------------------------------------------------------- /spryker/nginx/etc/confd_yves/conf.d/nginx_site_yves.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_yves.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/yves" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /spryker/nginx/etc/confd_yves/conf.d/nginx_site_yves_webroot.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_yves_webroot.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/yves-01-webroot.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /spryker/nginx/etc/confd_yves/templates/nginx/site_yves.conf.tmpl: -------------------------------------------------------------------------------- 1 | /etc/confd/templates/nginx/site.conf.tmpl -------------------------------------------------------------------------------- /spryker/nginx/etc/confd_yves/templates/nginx/site_yves_webroot.conf.tmpl: -------------------------------------------------------------------------------- 1 | root {{ getenv "WEB_DIRECTORY" }}/Yves; 2 | -------------------------------------------------------------------------------- /spryker/nginx/etc/confd_zed/conf.d/nginx_site_zed.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_zed.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/zed" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /spryker/nginx/etc/confd_zed/conf.d/nginx_site_zed_webroot.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "nginx/site_zed_webroot.conf.tmpl" 3 | dest = "/etc/nginx/sites-available/zed-01-webroot.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /spryker/nginx/etc/confd_zed/templates/nginx/site_zed.conf.tmpl: -------------------------------------------------------------------------------- 1 | /etc/confd/templates/nginx/site.conf.tmpl -------------------------------------------------------------------------------- /spryker/nginx/etc/confd_zed/templates/nginx/site_zed_webroot.conf.tmpl: -------------------------------------------------------------------------------- 1 | root {{ getenv "WEB_DIRECTORY" }}/Zed; 2 | -------------------------------------------------------------------------------- /spryker/nginx/etc/nginx/sites-enabled/yves: -------------------------------------------------------------------------------- 1 | /etc/nginx/sites-available/yves -------------------------------------------------------------------------------- /spryker/nginx/etc/nginx/sites-enabled/zed: -------------------------------------------------------------------------------- 1 | /etc/nginx/sites-available/zed -------------------------------------------------------------------------------- /spryker/nginx/usr/local/share/env/31-framework-nginx: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export YVES_WEB_INCLUDES=${YVES_WEB_INCLUDES:-default-* yves-*} 4 | export ZED_WEB_INCLUDES=${ZED_WEB_INCLUDES:-default-* zed-*} 5 | -------------------------------------------------------------------------------- /spryker/usr/local/share/container/baseimage-45.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source /usr/local/share/spryker/spryker_functions.sh 3 | 4 | alias_function do_build do_spryker_nginx_build_inner 5 | do_build() { 6 | do_spryker_nginx_build_inner 7 | do_templating 8 | do_spryker_build 9 | } 10 | 11 | alias_function do_templating do_spryker_templating_inner 12 | do_templating() { 13 | do_spryker_templating_inner 14 | do_spryker_vhosts 15 | } 16 | 17 | alias_function do_start do_spryker_start_inner 18 | do_start() { 19 | do_spryker_config_create 20 | do_spryker_start_inner 21 | } 22 | 23 | alias_function do_development_start do_spryker_development_start_inner 24 | do_development_start() { 25 | if is_true "$XDEBUG_REMOTE_ENABLED"; then 26 | XDEBUG_REMOTE_ENABLED=false do_templating 27 | fi 28 | do_spryker_development_start_inner 29 | do_spryker_build 30 | do_spryker_install 31 | do_spryker_app_permissions 32 | do_templating 33 | } 34 | 35 | alias_function do_setup do_spryker_setup_inner 36 | do_setup() { 37 | do_spryker_setup_inner 38 | do_templating 39 | do_spryker_build 40 | do_spryker_install 41 | do_spryker_migrate 42 | } 43 | -------------------------------------------------------------------------------- /spryker/usr/local/share/env/60-framework: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Support older configurations by setting original env vars 4 | export ELASTICSEARCH_HOST_PORT=${ELASTICSEARCH_PORT} 5 | export REDIS_HOST_PORT=${REDIS_PORT} 6 | export MAILCATCHER_HOST_PORT=${MAILCATCHER_PORT} 7 | -------------------------------------------------------------------------------- /ssh-forward/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG FROM_TAG=latest 2 | FROM quay.io/continuouspipe/ubuntu16.04:${FROM_TAG} 3 | 4 | RUN apt-get update -qq \ 5 | && DEBIAN_FRONTEND=noninteractive apt-get -qq -y --no-install-recommends install \ 6 | ssh \ 7 | \ 8 | # Clean the image \ 9 | && apt-get auto-remove -qq -y \ 10 | && apt-get clean \ 11 | && rm -rf /var/lib/apt/lists/* \ 12 | && mkdir /var/run/sshd \ 13 | && useradd --create-home forward \ 14 | && echo "ForceCommand echo 'This account can only be used for ssh port forwarding'" >> /etc/ssh/sshd_config \ 15 | && echo "GatewayPorts yes" >> /etc/ssh/sshd_config 16 | 17 | COPY ./etc/ /etc 18 | COPY ./usr/ /usr 19 | 20 | EXPOSE 22 21 | -------------------------------------------------------------------------------- /ssh-forward/etc/supervisor/conf.d/sshd.conf: -------------------------------------------------------------------------------- 1 | [program:sshd] 2 | command = /usr/sbin/sshd -D 3 | stdout_logfile=/dev/stdout 4 | stdout_logfile_maxbytes=0 5 | stderr_logfile=/dev/stderr 6 | stderr_logfile_maxbytes=0 7 | loglevel = warn 8 | user = root 9 | autorestart = true 10 | priority = 5 11 | -------------------------------------------------------------------------------- /ssh-forward/usr/local/share/container/baseimage-20.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | do_ssh_forward_set_credentials() { 4 | if [ -n "${SSH_FORWARD_PASSWORD}" ]; then 5 | echo "forward:${SSH_FORWARD_PASSWORD}" | chpasswd 6 | fi 7 | 8 | if [ -n "${SSH_FORWARD_AUTHORIZED_KEYS}" ]; then 9 | ( 10 | umask 0077 11 | mkdir /home/forward/.ssh 12 | echo "${SSH_FORWARD_AUTHORIZED_KEYS}" > /home/forward/.ssh/authorized_keys 13 | ) 14 | fi 15 | } 16 | 17 | alias_function do_start do_ssh_forward_start_inner 18 | do_start() { 19 | do_ssh_forward_set_credentials 20 | do_ssh_forward_start_inner 21 | } -------------------------------------------------------------------------------- /symfony-pack/README.md: -------------------------------------------------------------------------------- 1 | # Symfony Pack 2 | 3 | Based on [our Symfony with nginx and PHP 7.1 image](../symfony/), this Docker image is a curated Docker image for Symfony. 4 | Its focus is purely **Developer Experience** and includes a bunch of things useful for most recent Symfony applications. 5 | 6 | ## Usage 7 | 8 | ### With Docker Generator 9 | 10 | Checkout [ContinuousPipe's Docker Generator for Symfony](https://github.com/continuouspipe/flex). It's the easiest way 11 | to get your Docker configuration going for your Symfony project. 12 | 13 | ### Manually 14 | 15 | You can also the base image by creating the `Dockerfile` by yourself: 16 | 17 | ```Dockerfile 18 | # Dockerfile 19 | FROM quay.io/continuouspipe/symfony-pack:latest 20 | 21 | WORKDIR /app 22 | COPY . /app/ 23 | 24 | RUN container build 25 | ``` 26 | -------------------------------------------------------------------------------- /symfony-pack/usr/local/share/container/baseimage-30.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source /usr/local/share/symfony/symfony_pack_functions.sh 4 | 5 | alias_function do_build do_symfony_pack_build_inner 6 | do_build() { 7 | do_symfony_pack_build_inner 8 | do_symfony_pack_build 9 | } 10 | -------------------------------------------------------------------------------- /symfony-pack/usr/local/share/env/30-framework: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # By default, we allow HTTP 4 | export WEB_HTTP=${WEB_HTTP:-true} 5 | 6 | # Provide a BC-layer for Symfony 3.x 7 | export SYMFONY_ENV=${SYMFONY_ENV:-$APP_ENV} 8 | 9 | # By default, Composer install all the dependencies... 10 | COMPOSER_FLAGS="--no-interaction --optimize-autoloader" 11 | 12 | # ...except for APP_ENV=prod 13 | if [ "$APP_ENV" = "prod" ]; then 14 | COMPOSER_FLAGS="${DEFAULT_COMPOSER_FLAGS} --no-dev" 15 | fi 16 | 17 | export COMPOSER_INSTALL_FLAGS=${COMPOSER_INSTALL_FLAGS:-$COMPOSER_FLAGS} 18 | -------------------------------------------------------------------------------- /symfony-pack/usr/local/share/symfony/symfony_pack_functions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source /usr/local/share/symfony/symfony_functions.sh 4 | 5 | do_symfony_pack_build() { 6 | do_symfony_pack_encore_assets 7 | } 8 | 9 | do_symfony_pack_encore_assets() { 10 | if [ -f "yarn.lock" ]; then 11 | yarn install 12 | 13 | if grep -q "symfony/webpack-encore" yarn.lock; then 14 | npx encore production 15 | fi 16 | fi 17 | } 18 | -------------------------------------------------------------------------------- /symfony/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG PHP_VERSION 2 | ARG WEB_SERVER 3 | ARG FROM_TAG=latest 4 | FROM quay.io/continuouspipe/php${PHP_VERSION}-${WEB_SERVER}:${FROM_TAG} 5 | 6 | COPY ./usr/ /usr 7 | -------------------------------------------------------------------------------- /symfony/usr/local/share/container/baseimage-30.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source /usr/local/share/symfony/symfony_functions.sh 4 | 5 | alias_function do_build_permissions do_symfony_build_permissions_inner 6 | do_build_permissions() { 7 | do_symfony_build 8 | do_symfony_build_permissions_inner 9 | } 10 | 11 | alias_function do_composer do_symfony_composer_inner 12 | do_composer() { 13 | do_symfony_composer_inner 14 | do_symfony_app_permissions 15 | } 16 | 17 | alias_function do_development_start do_symfony_development_start_inner 18 | do_development_start() { 19 | do_symfony_development_start_inner 20 | do_database_build 21 | } 22 | 23 | do_migrate() { 24 | do_database_build 25 | } 26 | -------------------------------------------------------------------------------- /symfony/usr/local/share/env/30-framework: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-256M} 4 | export PHP_OPCACHE_MAX_ACCELERATED_FILES=${PHP_OPCACHE_MAX_ACCELERATED_FILES:-20000} 5 | export PHP_REALPATH_CACHE_SIZE=${PHP_REALPATH_CACHE_SIZE:-4096K} 6 | export PHP_REALPATH_CACHE_TTL=${PHP_REALPATH_CACHE_TTL:-600} 7 | export SYMFONY_DOCTRINE_MODE=${SYMFONY_DOCTRINE_MODE:-auto} 8 | export SYMFONY_DOCTRINE_WAIT_TIMEOUT="${SYMFONY_DOCTRINE_WAIT_TIMEOUT:-10}" 9 | SYMFONY_WEB_APP_ENV_REWRITE="$(convert_to_boolean_string "${SYMFONY_WEB_APP_ENV_REWRITE:-false}")" 10 | export SYMFONY_WEB_APP_ENV_REWRITE 11 | 12 | deprecate_env_var SYMFONY_APP_ENDPOINT APP_ENDPOINT 13 | 14 | export TIDEWAYS_FRAMEWORK=${TIDEWAYS_FRAMEWORK:-symfony} 15 | 16 | if [ "$DEVELOPMENT_MODE" == 'true' ]; then 17 | export SYMFONY_ENV=${SYMFONY_ENV:-dev} 18 | fi 19 | -------------------------------------------------------------------------------- /symfony/usr/local/share/env/56-framework: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # set deprecated env vars in case it is used in a sub-image 4 | export SYMFONY_APP_ENDPOINT="$APP_ENDPOINT" 5 | export SYMFONY_APP_ENDPOINT_REGEX="$APP_ENDPOINT_REGEX" 6 | -------------------------------------------------------------------------------- /tests/bats-mock/0001-Patch-for-similar-space-splits-as-the-execution-plan.patch: -------------------------------------------------------------------------------- 1 | From 68ea9d96be3a071be1484e21ce3a562b2be7f07a Mon Sep 17 00:00:00 2001 2 | From: Kieren Evans 3 | Date: Mon, 11 Sep 2017 22:38:26 +0000 4 | Subject: [PATCH] Patch for similar space splits for arguments as the execution 5 | plan. 6 | 7 | --- 8 | binstub | 2 +- 9 | 1 file changed, 1 insertions(+), 1 deletions(-) 10 | 11 | diff --git a/binstub b/binstub 12 | index d1169a2..9e2a0a2 100755 13 | --- a/binstub 14 | +++ b/binstub 15 | @@ -50,7 +50,7 @@ while IFS= read -r line; do 16 | set -f 17 | patterns=($patterns) 18 | set +f 19 | - arguments=("$@") 20 | + arguments=($@) 21 | 22 | # Match the expected argument patterns to actual 23 | # arguments. 24 | -- 25 | 2.7.4 26 | -------------------------------------------------------------------------------- /tests/bats/helper.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | load /usr/local/share/bats/bats-support/load.bash 3 | load /usr/local/share/bats/bats-assert/load.bash 4 | load /usr/local/share/bats/bats-mock/stub.bash 5 | -------------------------------------------------------------------------------- /tests/plan.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_run_tests() { 4 | find . -maxdepth 3 -type d -name "tests" -print -exec bats {} + 5 | } 6 | 7 | function do_watch_tests() ( 8 | set +e 9 | while true; do 10 | find /app ! -path "*/.git/*" | entr -d container run_tests 11 | done 12 | ) 13 | -------------------------------------------------------------------------------- /tideways/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG FROM_TAG=latest 2 | FROM quay.io/continuouspipe/ubuntu16.04:${FROM_TAG} 3 | 4 | RUN echo 'deb https://packages.tideways.com/apt-packages-main any-version main' > /etc/apt/sources.list.d/tideways.list \ 5 | && curl -L -sS https://packages.tideways.com/key.gpg | apt-key add - \ 6 | && apt-get update -qq \ 7 | && DEBIAN_FRONTEND=noninteractive apt-get -qq -y --no-install-recommends install \ 8 | tideways-daemon \ 9 | \ 10 | # Clean the image \ 11 | && apt-get auto-remove -qq -y \ 12 | && apt-get clean \ 13 | && rm -rf /var/lib/apt/lists/* 14 | 15 | COPY ./etc/ /etc/ 16 | COPY ./usr/ /usr/ 17 | -------------------------------------------------------------------------------- /tideways/README.md: -------------------------------------------------------------------------------- 1 | # Tideways Daemon 2 | 3 | In a Dockerfile: 4 | ```Dockerfile 5 | FROM quay.io/continuouspipe/tideways:latest 6 | ``` 7 | or in a docker-compose.yml: 8 | ```yml 9 | version: '3' 10 | services: 11 | web: 12 | image: quay.io/continuouspipe/php7.1-nginx:latest 13 | links: 14 | - tideways 15 | 16 | tideways: 17 | image: quay.io/continuouspipe/tideways:latest 18 | ``` 19 | 20 | ## How to build 21 | ```bash 22 | docker-compose build tideways 23 | docker-compose push tideways 24 | ``` 25 | 26 | ## About 27 | 28 | This is a Docker image for the Tideways Daemon process. It is talked to from php-nginx and php-apache images and this 29 | daemon will forward the generated PHP profile logs to the Tideways API. 30 | 31 | ## How to use 32 | 33 | As for all images based on the ubuntu base image, see 34 | [the base image README](../../ubuntu/16.04/README.md) 35 | 36 | 37 | #### Environment variables 38 | 39 | The following variables are supported 40 | 41 | Variable | Description | Expected values | Default 42 | --- | --- | --- | ---- 43 | TIDEWAYS_HOSTNAME | The domain of the website to help filter in the Tideways UI | a domain | tideways-daemon 44 | TIDEWAYS_ENVIRONMENT | The environment of the website to help filter in the Tideways UI, if your plan allows for more than one environment | string | production 45 | -------------------------------------------------------------------------------- /tideways/etc/confd/conf.d/supervisor_tideways_daemon.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "supervisor/tideways_daemon.conf.tmpl" 3 | dest = "/etc/supervisor/conf.d/tideways_daemon.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /tideways/etc/confd/templates/supervisor/tideways_daemon.conf.tmpl: -------------------------------------------------------------------------------- 1 | [program:tideways_daemon] 2 | command = /usr/bin/tideways-daemon --hostname="{{ getenv "TIDEWAYS_HOSTNAME" }}" --address=0.0.0.0:9135 --udp=0.0.0.0:9136 --env="{{ getenv "TIDEWAYS_ENVIRONMENT" }}" 3 | stdout_logfile=/dev/stdout 4 | stdout_logfile_maxbytes=0 5 | stderr_logfile=/dev/stderr 6 | stderr_logfile_maxbytes=0 7 | loglevel = warn 8 | user = tideways 9 | autostart = true 10 | autorestart = true 11 | priority = 5 12 | -------------------------------------------------------------------------------- /tideways/etc/supervisor/conf.d/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/continuouspipe/dockerfiles/f89d6857af09999f928ca022d131298f474adb7d/tideways/etc/supervisor/conf.d/.gitkeep -------------------------------------------------------------------------------- /tideways/usr/local/share/env/40-stack: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export TIDEWAYS_HOSTNAME=${TIDEWAYS_HOSTNAME:-tideways-daemon} 4 | export TIDEWAYS_ENVIRONMENT=${TIDEWAYS_ENVIRONMENT:-production} 5 | -------------------------------------------------------------------------------- /tools/compare/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM quay.io/continuouspipe/ubuntu16.04:stable 2 | 3 | RUN apt-get update -qq \ 4 | && DEBIAN_FRONTEND=noninteractive apt-get -qq -y --no-install-recommends install \ 5 | colordiff \ 6 | && apt-get auto-remove -qq -y \ 7 | && apt-get clean \ 8 | && rm -rf /var/lib/apt/lists/* 9 | 10 | COPY ./compare.sh /app/compare.sh 11 | COPY ./exclusions.txt /app/exclusions.txt 12 | -------------------------------------------------------------------------------- /tools/compare/README.md: -------------------------------------------------------------------------------- 1 | # Comparison Tool 2 | 3 | A tool to compare the :latest and :latest tags of each of the docker images, and tag 4 | the :latest image as :latest if the diff is agreeable. 5 | 6 | ## Usage 7 | 8 | From the root directory of this repository: 9 | ```bash 10 | bash tools/compare/pull_and_compare.sh LIST OF SERVICES 11 | ``` 12 | where the service names are listed in `docker-compose.yml`. 13 | 14 | For example: 15 | ```bash 16 | bash tools/compare/pull_and_compare.sh spryker_php70_nginx spryker_php71_nginx 17 | ``` 18 | -------------------------------------------------------------------------------- /tools/compare/exclusions.txt: -------------------------------------------------------------------------------- 1 | boot 2 | dev 3 | lib 4 | lib64 5 | proc 6 | run 7 | srv 8 | sys 9 | usr/share/doc 10 | usr/share/man 11 | tmp 12 | var/backups 13 | var/cache 14 | var/lib/dpkg 15 | var/lib/systemd 16 | var/lib/ucf 17 | var/lock 18 | var/log 19 | var/mail 20 | var/run 21 | var/spool 22 | var/tmp 23 | -------------------------------------------------------------------------------- /tools/generate_stable_docker_compose_file.rb: -------------------------------------------------------------------------------- 1 | require 'yaml' 2 | 3 | config = YAML.safe_load(File.read('docker-compose.yml')) 4 | 5 | config['services'].reject! do |service_name, _service| 6 | service_name =~ /^(external_|nginx_ingress_controller|.*php55.*)/ 7 | end 8 | 9 | config['services'].each do |_, service| 10 | service.select! do |key, _| 11 | key == 'image' 12 | end 13 | service['image'].sub!(':latest', ':stable') if service.key? 'image' 14 | service['build'] = '/dev/null' if service.key? 'image' 15 | end 16 | 17 | config['services'].reject! do |_, service| 18 | service == {} 19 | end 20 | 21 | new_keys = config['services'].keys.map do |service_name| 22 | service_name + '_stable' 23 | end 24 | config['services'] = new_keys.zip(config['services'].values).to_h 25 | 26 | File.write('docker-compose.stable.yml', YAML.dump(config)) 27 | -------------------------------------------------------------------------------- /ubuntu/16.04/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | RUN echo 'APT::Install-Recommends 0;' >> /etc/apt/apt.conf.d/01norecommends \ 4 | && echo 'APT::Install-Suggests 0;' >> /etc/apt/apt.conf.d/01norecommends \ 5 | && apt-get update -qq \ 6 | && DEBIAN_FRONTEND=noninteractive apt-get -s dist-upgrade | grep "^Inst" | \ 7 | grep -i securi | awk -F " " '{print $2}' | \ 8 | xargs apt-get -qq -y --no-install-recommends install \ 9 | \ 10 | # Install base packages \ 11 | && DEBIAN_FRONTEND=noninteractive apt-get -qq -y --no-install-recommends install \ 12 | acl \ 13 | apt-transport-https \ 14 | bash-completion \ 15 | bzip2 \ 16 | ca-certificates \ 17 | daemontools \ 18 | cron \ 19 | curl \ 20 | git \ 21 | make \ 22 | net-tools \ 23 | openssh-client \ 24 | parallel \ 25 | rsync \ 26 | sudo \ 27 | supervisor \ 28 | unzip \ 29 | vim.tiny \ 30 | wget \ 31 | \ 32 | # Clean the image \ 33 | && apt-get auto-remove -qq -y \ 34 | && apt-get clean \ 35 | && rm -rf /var/lib/apt/lists/* \ 36 | \ 37 | # Create the build user \ 38 | && useradd --create-home --system build \ 39 | \ 40 | # Install confd for templating \ 41 | && curl -sSL -o /usr/local/bin/confd \ 42 | https://github.com/kelseyhightower/confd/releases/download/v0.11.0/confd-0.11.0-linux-amd64 \ 43 | && chmod +x /usr/local/bin/confd 44 | 45 | COPY ./etc/ /etc/ 46 | COPY ./usr/ /usr/ 47 | 48 | CMD ["/usr/local/bin/container", "start_supervisord"] 49 | -------------------------------------------------------------------------------- /ubuntu/16.04/etc/bash_completion.d/container: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | _container() { 4 | local cur 5 | COMPREPLY=() 6 | cur="${COMP_WORDS[COMP_CWORD]}" 7 | 8 | case "$cur" in 9 | *) 10 | COMPREPLY=( $( compgen -W "$(container list_functions)" -- "$cur" ) );; 11 | esac 12 | 13 | return 0 14 | } 15 | 16 | complete -F _container -o filenames container 17 | -------------------------------------------------------------------------------- /ubuntu/16.04/etc/confd/conf.d/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/continuouspipe/dockerfiles/f89d6857af09999f928ca022d131298f474adb7d/ubuntu/16.04/etc/confd/conf.d/.gitkeep -------------------------------------------------------------------------------- /ubuntu/16.04/etc/confd/conf.d/supervisor_cron.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "supervisor/cron.conf.tmpl" 3 | dest = "/etc/supervisor/conf.d/cron.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /ubuntu/16.04/etc/confd/templates/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/continuouspipe/dockerfiles/f89d6857af09999f928ca022d131298f474adb7d/ubuntu/16.04/etc/confd/templates/.gitkeep -------------------------------------------------------------------------------- /ubuntu/16.04/etc/confd/templates/supervisor/cron.conf.tmpl: -------------------------------------------------------------------------------- 1 | [program:cron] 2 | command = {{ getenv "CRON_COMMAND" }} 3 | stdout_logfile=/dev/stdout 4 | stdout_logfile_maxbytes=0 5 | stderr_logfile=/dev/stderr 6 | stderr_logfile_maxbytes=0 7 | loglevel = warn 8 | {{ if not (eq "true" (getenv "NON_PRIVILEGED_USER")) }} 9 | user = root 10 | {{ end }} 11 | autostart = {{ getenv "START_CRON" }} 12 | autorestart = true 13 | priority = 5 14 | -------------------------------------------------------------------------------- /ubuntu/16.04/etc/supervisor/conf.d/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/continuouspipe/dockerfiles/f89d6857af09999f928ca022d131298f474adb7d/ubuntu/16.04/etc/supervisor/conf.d/.gitkeep -------------------------------------------------------------------------------- /ubuntu/16.04/etc/supervisor/conf.d/kill_supervisord_upon_fatal_process_state.conf: -------------------------------------------------------------------------------- 1 | [eventlistener:kill_supervisord_upon_fatal_process_state] 2 | command=/usr/local/share/supervisord/kill_supervisord_upon_fatal_process_state.py 3 | events=PROCESS_STATE_FATAL 4 | stderr_logfile=/dev/stderr 5 | stderr_logfile_maxbytes=0 6 | loglevel=warn 7 | -------------------------------------------------------------------------------- /ubuntu/16.04/etc/supervisor/supervisord.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | nodaemon = true 3 | logfile=/dev/stdout 4 | logfile_maxbytes=0 5 | pidfile = /var/run/supervisord.pid 6 | 7 | [include] 8 | files = /etc/supervisor/conf.d/*.conf 9 | 10 | [supervisorctl] 11 | serverurl = unix:///var/run/supervisor.sock 12 | 13 | [unix_http_server] 14 | file = /var/run/supervisor.sock 15 | chmod = 0700 16 | username = supervisor 17 | password = supervisor 18 | 19 | [rpcinterface:supervisor] 20 | supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface 21 | -------------------------------------------------------------------------------- /ubuntu/16.04/usr/local/bin/container: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | DEBUG=1 5 | 6 | while test $#; do 7 | case "$1" in 8 | --no-debug) 9 | DEBUG=0 10 | shift 11 | ;; 12 | *) 13 | break 14 | ;; 15 | esac 16 | done 17 | 18 | TASK=$1 19 | ARGS=( "$@" ) 20 | 21 | source /usr/local/share/bootstrap/bootstrap.sh 22 | 23 | if [ "$TASK" != "list_functions" ] && is_true "$DEBUG"; then 24 | set -x 25 | fi 26 | 27 | if [ "$TASK" == "start" ]; then 28 | source /usr/local/bin/supervisor_custom_start 29 | fi 30 | 31 | if [ "$TASK" == "build" ] && [ "$RUN_BUILD" == "false" ]; then 32 | exit 0 33 | fi 34 | 35 | set -- "${ARGS[@]}" 36 | shift 1 37 | 38 | "do_$TASK" "$@" 39 | -------------------------------------------------------------------------------- /ubuntu/16.04/usr/local/bin/supervisor_custom_start: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | -------------------------------------------------------------------------------- /ubuntu/16.04/usr/local/share/bootstrap/bootstrap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Initialisation - Declare variables and run pre-templating steps. 4 | source /usr/local/share/bootstrap/setup.sh 5 | 6 | # Initialisation - Runtime installation tasks 7 | shopt -s nullglob 8 | set -- /usr/local/share/container/baseimage-* 9 | if [ "$#" -gt 0 ]; then 10 | for file in "$@"; do 11 | # shellcheck source=/dev/null 12 | source "${file}" 13 | done 14 | fi 15 | 16 | load_env 17 | 18 | source /usr/local/share/container/plan.sh 19 | if [ -e "$WORK_DIRECTORY/plan.sh" ]; then 20 | # shellcheck source=/dev/null 21 | source "$WORK_DIRECTORY/plan.sh" 22 | fi 23 | if [ -e "$WORK_DIRECTORY/plan.override.sh" ]; then 24 | # shellcheck source=/dev/null 25 | source "$WORK_DIRECTORY/plan.override.sh" 26 | fi 27 | 28 | FUNCTIONS="$(compgen -A function)" 29 | for func in $FUNCTIONS; do 30 | # shellcheck disable=SC2163 31 | export -f "$func" 32 | done 33 | -------------------------------------------------------------------------------- /ubuntu/16.04/usr/local/share/bootstrap/parallel_shell_wrapper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | /bin/bash -ec "$@" 3 | -------------------------------------------------------------------------------- /ubuntu/16.04/usr/local/share/bootstrap/run_confd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | do_confd 4 | -------------------------------------------------------------------------------- /ubuntu/16.04/usr/local/share/bootstrap/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source /usr/local/share/bootstrap/common_functions.sh 4 | 5 | do_confd() { 6 | # Initialisation - Templating 7 | confd -onetime -backend env 8 | } 9 | 10 | do_templating() { 11 | do_confd 12 | } 13 | 14 | do_supervisord() { 15 | exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf 16 | } 17 | 18 | do_start_supervisord() { 19 | do_start 20 | do_supervisord 21 | } 22 | 23 | do_start_exec() { 24 | do_start 25 | exec "$@" 26 | } 27 | -------------------------------------------------------------------------------- /ubuntu/16.04/usr/local/share/bootstrap/trigger_update_permissions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "${APP_USER_LOCAL}" == "true" ]; then 4 | source /usr/local/share/bootstrap/update_permissions.sh 5 | update_permissions "${WORK_DIRECTORY}" 6 | fi 7 | -------------------------------------------------------------------------------- /ubuntu/16.04/usr/local/share/container/baseimage-10.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | do_update_permissions() 4 | { 5 | if [ "${APP_USER_LOCAL}" == "true" ]; then 6 | source /usr/local/share/bootstrap/update_permissions.sh 7 | update_permissions "${WORK_DIRECTORY}" 8 | fi 9 | } 10 | 11 | alias_function do_start do_ubuntu_start_inner 12 | do_start() { 13 | do_ubuntu_start_inner 14 | do_update_permissions 15 | do_templating 16 | check_development_start 17 | } 18 | 19 | alias_function do_build do_ubuntu_build_inner 20 | do_build() { 21 | do_build_user_ssh_keys 22 | do_ubuntu_build_inner 23 | } 24 | 25 | check_development_start() { 26 | if [ "$DEVELOPMENT_MODE" == 'true' ] && [ "$RUN_BUILD" == 'true' ]; then 27 | do_development_start 28 | fi 29 | } 30 | 31 | do_development_start() { 32 | : 33 | } 34 | 35 | do_build_user_ssh_keys() ( 36 | set +x 37 | do_user_ssh_keys "build" "id_rsa" "$BUILD_USER_SSH_PRIVATE_KEY" "$BUILD_USER_SSH_PUBLIC_KEY" "$BUILD_USER_SSH_KNOWN_HOSTS" 38 | unset BUILD_USER_SSH_PRIVATE_KEY 39 | unset BUILD_USER_SSH_PUBLIC_KEY 40 | unset BUILD_USER_SSH_KNOWN_HOSTS 41 | ) 42 | 43 | do_setup() { 44 | : 45 | } 46 | 47 | do_migrate() { 48 | : 49 | } 50 | -------------------------------------------------------------------------------- /ubuntu/16.04/usr/local/share/container/plan.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | -------------------------------------------------------------------------------- /ubuntu/16.04/usr/local/share/env/50-bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export WORK_DIRECTORY=${WORK_DIRECTORY:-/app} 4 | export CODE_OWNER=${CODE_OWNER:-build} 5 | export CODE_GROUP=${CODE_GROUP:-build} 6 | 7 | START_CRON=${START_CRON:-false} 8 | START_CRON="$(convert_to_boolean_string "$START_CRON")" 9 | export START_CRON 10 | 11 | if [[ "$CRON_MODE" = "ofelia" ]]; then 12 | CRON_COMMAND=${CRON_COMMAND:-/usr/bin/ofelia daemon --config /etc/ofelia/config.ini} 13 | fi 14 | export CRON_COMMAND=${CRON_COMMAND:-/usr/sbin/cron -f} 15 | 16 | IS_CHOWN_FORBIDDEN="$(run_return_boolean is_chown_forbidden)" 17 | export IS_CHOWN_FORBIDDEN 18 | 19 | IS_VBOXSF_MOUNTPOINT="$(run_return_boolean is_vboxsf_mountpoint)" 20 | export IS_VBOXSF_MOUNTPOINT 21 | 22 | IS_APP_MOUNTPOINT="$(run_return_boolean is_app_mountpoint)" 23 | export IS_APP_MOUNTPOINT 24 | 25 | DEVELOPMENT_MODE="$(convert_to_boolean_string_zero_is_true "${DEVELOPMENT_MODE:-${IS_APP_MOUNTPOINT}}")" 26 | export DEVELOPMENT_MODE 27 | 28 | RUN_BUILD="$(convert_to_boolean_string "${RUN_BUILD:-true}")" 29 | export RUN_BUILD 30 | 31 | APP_USER_LOCAL="$(convert_to_boolean_string "${APP_USER_LOCAL:-${IS_VBOXSF_MOUNTPOINT}}")" 32 | export APP_USER_LOCAL 33 | 34 | APP_USER_LOCAL_RANDOM="$(convert_to_boolean_string "${APP_USER_LOCAL_RANDOM:-false}")" 35 | export APP_USER_LOCAL_RANDOM 36 | 37 | export BUILD_USER_SSH_PRIVATE_KEY=${BUILD_USER_SSH_PRIVATE_KEY:-} 38 | export BUILD_USER_SSH_PUBLIC_KEY=${BUILD_USER_SSH_PUBLIC_KEY:-} 39 | export BUILD_USER_SSH_KNOWN_HOSTS=${BUILD_USER_SSH_KNOWN_HOSTS:-} 40 | 41 | export PARALLEL_SHELL="/usr/local/share/bootstrap/parallel_shell_wrapper.sh" 42 | -------------------------------------------------------------------------------- /ubuntu/16.04/usr/local/share/supervisord/kill_supervisord_upon_fatal_process_state.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | from subprocess import call 5 | 6 | def write_stdout(s): 7 | # only eventlistener protocol messages may be sent to stdout 8 | sys.stdout.write(s) 9 | sys.stdout.flush() 10 | 11 | def write_stderr(s): 12 | sys.stderr.write(s) 13 | sys.stderr.flush() 14 | 15 | def main(): 16 | while 1: 17 | # transition from ACKNOWLEDGED to READY 18 | write_stdout('READY\n') 19 | 20 | # read header line and print it to stderr 21 | line = sys.stdin.readline() 22 | write_stderr(line) 23 | 24 | # read event payload and print it to stderr 25 | headers = dict([ x.split(':') for x in line.split() ]) 26 | data = sys.stdin.read(int(headers['len'])) 27 | write_stderr(data) 28 | 29 | call(["pkill", "--signal", "SIGTERM", "supervisord"]) 30 | 31 | # transition from READY to ACKNOWLEDGED 32 | write_stdout('RESULT 2\nOK') 33 | 34 | if __name__ == '__main__': 35 | main() 36 | -------------------------------------------------------------------------------- /varnish/4.0/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG FROM_TAG=latest 2 | FROM quay.io/continuouspipe/ubuntu16.04:${FROM_TAG} 3 | 4 | # Install Varnish 5 | RUN apt-get update -qq \ 6 | && DEBIAN_FRONTEND=noninteractive apt-get -qq -y --no-install-recommends install \ 7 | varnish \ 8 | \ 9 | # Clean the image \ 10 | && apt-get auto-remove -qq -y \ 11 | && apt-get clean \ 12 | && rm -rf /var/lib/apt/lists/* 13 | 14 | COPY ./etc/ /etc/ 15 | COPY ./usr/ /usr/ 16 | -------------------------------------------------------------------------------- /varnish/4.0/etc/confd/conf.d/default.vcl.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "varnish/default.vcl.tmpl" 3 | dest = "/etc/varnish/default.vcl" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /varnish/4.0/etc/confd/conf.d/secret.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "varnish/secret.tmpl" 3 | dest = "/etc/varnish/secret" 4 | mode = "0600" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /varnish/4.0/etc/confd/conf.d/supervisor_varnish.conf.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "supervisor/varnish.conf.tmpl" 3 | dest = "/etc/supervisor/conf.d/varnish.conf" 4 | mode = "0644" 5 | keys = [ 6 | ] 7 | -------------------------------------------------------------------------------- /varnish/4.0/etc/confd/templates/supervisor/varnish.conf.tmpl: -------------------------------------------------------------------------------- 1 | [program:varnish] 2 | command = /usr/sbin/varnishd -j unix,user=varnish -F -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,{{ getenv "VARNISH_CACHE_SIZE" }} {{ getenv "VARNISH_START_PARAMS" }} 3 | stdout_logfile=/dev/stdout 4 | stdout_logfile_maxbytes=0 5 | stderr_logfile=/dev/stderr 6 | stderr_logfile_maxbytes=0 7 | loglevel = warn 8 | user = root 9 | autostart = true 10 | autorestart = true 11 | priority = 5 12 | -------------------------------------------------------------------------------- /varnish/4.0/etc/confd/templates/varnish/default.vcl.tmpl: -------------------------------------------------------------------------------- 1 | # 2 | # This is an example VCL file for Varnish. 3 | # 4 | # It does not do anything by default, delegating control to the 5 | # builtin VCL. The builtin VCL is called when there is no explicit 6 | # return statement. 7 | # 8 | # See the VCL chapters in the Users Guide at https://www.varnish-cache.org/docs/ 9 | # and https://www.varnish-cache.org/trac/wiki/VCLExamples for more examples. 10 | 11 | # Marker to tell the VCL compiler that this VCL has been adapted to the 12 | # new 4.0 format. 13 | vcl 4.0; 14 | 15 | # Default backend definition. Set this to point to your content server. 16 | backend default { 17 | .host = "{{ getenv "VARNISH_BACKEND_HOST" }}"; 18 | .port = "{{ getenv "VARNISH_BACKEND_PORT" }}"; 19 | } 20 | 21 | sub vcl_recv { 22 | # Happens before we check if we have this in cache already. 23 | # 24 | # Typically you clean up the request here, removing cookies you don't need, 25 | # rewriting the request, etc. 26 | } 27 | 28 | sub vcl_backend_response { 29 | # Happens after we have read the response headers from the backend. 30 | # 31 | # Here you clean the response headers, removing silly Set-Cookie headers 32 | # and other mistakes your backend does. 33 | } 34 | 35 | sub vcl_deliver { 36 | # Happens when we have all the pieces we need, and are about to send the 37 | # response to the client. 38 | # 39 | # 40 | } 41 | -------------------------------------------------------------------------------- /varnish/4.0/etc/confd/templates/varnish/secret.tmpl: -------------------------------------------------------------------------------- 1 | {{ getenv "VARNISH_SECRET" }} 2 | -------------------------------------------------------------------------------- /varnish/4.0/etc/supervisor/conf.d/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/continuouspipe/dockerfiles/f89d6857af09999f928ca022d131298f474adb7d/varnish/4.0/etc/supervisor/conf.d/.gitkeep -------------------------------------------------------------------------------- /varnish/4.0/usr/local/share/env/40-stack: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export VARNISH_CACHE_SIZE=${VARNISH_CACHE_SIZE:-1g} 4 | export VARNISH_START_PARAMS=${VARNISH_START_PARAMS:-} 5 | export VARNISH_BACKEND_HOST=${VARNISH_BACKEND_HOST:-web} 6 | export VARNISH_BACKEND_PORT=${VARNISH_BACKEND_PORT:-80} 7 | 8 | export VARNISH_SECRET=${VARNISH_SECRET:-} 9 | CURRENT_VARNISH_SECRET="$(cat /etc/varnish/secret)" 10 | if [ -z "$VARNISH_SECRET" ]; then 11 | export VARNISH_SECRET="${CURRENT_VARNISH_SECRET}" 12 | fi 13 | --------------------------------------------------------------------------------