diff --git a/apps/389ds/389ds.mk b/apps/389ds/389ds.mk deleted file mode 100644 index 07317da..0000000 --- a/apps/389ds/389ds.mk +++ /dev/null @@ -1,3 +0,0 @@ -389DS_REPOSITORY_URL := https://github.com/thorsten-l/389ds-docker-alpine -389DS_VERSION := 2.4.4 -DOCKER_BUILD_ARGS += --build-arg BUILD_VERSION=$(389DS_VERSION) diff --git a/apps/bionicgpt/bionicgpt.mk b/apps/bionicgpt/bionicgpt.mk deleted file mode 100644 index c480929..0000000 --- a/apps/bionicgpt/bionicgpt.mk +++ /dev/null @@ -1,4 +0,0 @@ -BIONICGPT_ENVOY_SERVICE_7700_TAGS ?= $(call tagprefix) -BIONICGPT_REPOSITORY_URL ?= https://github.com/purton-tech/bionicgpt -BIONICGPT_VERSION ?= v1.3.3 -ENV_VARS += BIONICGPT_ENVOY_SERVICE_7700_TAGS diff --git a/apps/bionicgpt/bionicgpt.yml b/apps/bionicgpt/bionicgpt.yml deleted file mode 100644 index 06cd548..0000000 --- a/apps/bionicgpt/bionicgpt.yml +++ /dev/null @@ -1,47 +0,0 @@ -services: - - app: - environment: - APP_DATABASE_URL: postgresql://${BIONICGPT_DB_APP_USER:-ft_application}:${BIONICGPT_DB_APP_PASSWORD:-testpassword}@db:5432/${BIONICGPT_DB_POSTGRES_DB:-finetuna}?sslmode=disable - - barricade: - environment: - SECRET_KEY: ${BIONICGPT_BARRICADE_SECRET_KEY:-190a5bf4b3cbb6c0991967ab1c48ab30790af876720f1835cbbf3820f4f5d949} - DATABASE_URL: postgresql://${BIONICGPT_DB_POSTGRES_USER:-postgres}:${BIONICGPT_DB_POSTGRES_PASSWORD:-testpassword}@db:5432/${BIONICGPT_DB_POSTGRES_DB:-finetuna}?sslmode=disable - - db: - environment: - POSTGRES_PASSWORD: ${BIONICGPT_DB_POSTGRES_PASSWORD:-testpassword} - POSTGRES_USER: ${BIONICGPT_DB_POSTGRES_USER:-postgres} - POSTGRES_DB: ${BIONICGPT_DB_POSTGRES_DB:-finetuna} - PGDATA: /var/lib/postgresql/data - healthcheck: - test: ["CMD-SHELL", "pg_isready -U ${BIONICGPT_DB_POSTGRES_USER:-postgres}"] - interval: 10s - timeout: 5s - retries: 5 - volumes: - - pgdata:/var/lib/postgresql/data - - pipeline-job: - environment: - APP_DATABASE_URL: postgresql://${BIONICGPT_DB_APP_USER:-ft_application}:${BIONICGPT_DB_APP_PASSWORD:-testpassword}@db:5432/${BIONICGPT_DB_POSTGRES_DB:-finetuna}?sslmode=disable - - envoy: - labels: - - SERVICE_7700_CHECK_HTTP=${BIONICGPT_ENVOY_SERVICE_7700_CHECK_HTTP:-/auth/sign_in} - - SERVICE_7700_NAME=${COMPOSE_SERVICE_NAME:-bionicgpt}-envoy-7700 - - SERVICE_7700_TAGS=${BIONICGPT_ENVOY_SERVICE_7700_TAGS:-urlprefix-localhost/bionicgpt/*} - - llm-api: - networks: - default: - aliases: - - local-ai - - migrations: - environment: - DATABASE_URL: postgresql://${BIONICGPT_DB_POSTGRES_USER:-postgres}:${BIONICGPT_DB_POSTGRES_PASSWORD:-testpassword}@db:5432/${BIONICGPT_DB_POSTGRES_DB:-finetuna}?sslmode=disable - -volumes: - pgdata: diff --git a/apps/signoz/signoz.mk b/apps/signoz/signoz.mk deleted file mode 100644 index 1acbe7d..0000000 --- a/apps/signoz/signoz.mk +++ /dev/null @@ -1,6 +0,0 @@ -ENV_VARS += SIGNOZ_FRONTEND_SERVICE_3301_TAGS -SIGNOZ_DOCKER_DIR ?= deploy/docker/clickhouse-setup -SIGNOZ_FRONTEND_SERVICE_3301_TAGS ?= $(call urlprefix) -SIGNOZ_REPOSITORY_URL ?= https://github.com/SigNoz/signoz -SIGNOZ_VERSION ?= v0.34.3 -STACK += alerting/apprise diff --git a/apps/signoz/signoz.yml b/apps/signoz/signoz.yml deleted file mode 100644 index 82c6991..0000000 --- a/apps/signoz/signoz.yml +++ /dev/null @@ -1,6 +0,0 @@ -services: - frontend: - labels: - - SERVICE_3301_CHECK_HTTP=${SIGNOZ_SERVICE_3301_CHECK_HTTP:-/} - - SERVICE_3301_NAME=${COMPOSE_SERVICE_NAME:-signoz}-frontend-3301 - - SERVICE_3301_TAGS=${SIGNOZ_FRONTEND_SERVICE_3301_TAGS:-urlprefix-localhost/signoz/*} diff --git a/docker/389ds/Dockerfile b/docker/389ds/Dockerfile deleted file mode 100644 index 3136102..0000000 --- a/docker/389ds/Dockerfile +++ /dev/null @@ -1,62 +0,0 @@ -# from: https://github.com/thorsten-l/389ds-docker-alpine -FROM --platform=$BUILDPLATFORM alpine:3.19 as builder -ARG TARGETPLATFORM -ARG BUILDPLATFORM -RUN echo "*** BUILDPLATFORM=$BUILDPLATFORM TARGETPLATFORM=$TARGETPLATFORM" - -ARG BUILD_VERSION -ARG DOCKER_BUILD_DIR - -RUN apk add build-base wget libtool autoconf automake openssl-dev cracklib-dev \ - libevent-dev nspr-dev nss-dev openldap-dev db-dev icu-dev \ - net-snmp-dev krb5-dev pcre-dev make rsync nss-tools openssl \ - linux-pam-dev python3 py3-pip python3-dev git py3-setuptools \ - py3-argcomplete py3-ldap3 py3-dateutil lmdb-dev json-c-dev pcre2-dev - -RUN if [ "$TARGETPLATFORM" != "linux/arm/v7" ]; then apk add rust cargo ; fi - -RUN mkdir /build -WORKDIR /build -RUN wget "https://github.com/389ds/389-ds-base/archive/refs/tags/389-ds-base-$BUILD_VERSION.tar.gz" -RUN tar xvfz "389-ds-base-$BUILD_VERSION.tar.gz" -WORKDIR "/build/389-ds-base-389-ds-base-$BUILD_VERSION" - -RUN ./autogen.sh -RUN if [ "$TARGETPLATFORM" != "linux/arm/v7" ]; then ./configure --with-openldap --enable-rust ; fi -RUN if [ "$TARGETPLATFORM" == "linux/arm/v7" ]; then ./configure --with-openldap; fi - -RUN sed -e 's/.*build_manpages.*/\tcd \$\(srcdir\)\/src\/lib389\; \$\(PYTHON\) setup.py build/g' Makefile > M -RUN mv M Makefile - -COPY ${DOCKER_BUILD_DIR}/setup.py src/lib389/setup.py - -RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ - && apk add zig@testing - -RUN make -j 8 && make lib389 -j 8 && make install && make lib389-install - -FROM alpine:3.19 - -RUN apk add openssl cracklib libevent nspr nss openldap db icu \ - net-snmp krb5 pcre nss-tools openssl linux-pam python3 \ - lmdb json-c pcre2 elfutils libffi libexpat - -COPY --from=builder /opt /opt -COPY --from=builder /usr/sbin/ds* /usr/sbin/ -COPY --from=builder /usr/lib/python3.10 /usr/lib/python3.10 -COPY --from=builder /usr/libexec/dirsrv /usr/libexec/dirsrv - -RUN mkdir -p /data /data/config /data/run /opt/dirsrv/var/run/dirsrv; \ - ln -s /data/run /opt/dirsrv/var/run/dirsrv; \ - ln -s /data/ssca /opt/dirsrv/etc/dirsrv/ssca; \ - ln -s /data/config /opt/dirsrv/etc/dirsrv/slapd-localhost - -HEALTHCHECK --start-period=5m --timeout=5s --interval=5s --retries=2 \ - CMD /usr/libexec/dirsrv/dscontainer -H - -WORKDIR /data -VOLUME /data - -EXPOSE 3389 3636 - -CMD [ "/usr/libexec/dirsrv/dscontainer", "-r" ] diff --git a/docker/389ds/setup.py b/docker/389ds/setup.py deleted file mode 100644 index 5f571d1..0000000 --- a/docker/389ds/setup.py +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/python3 - -# --- BEGIN COPYRIGHT BLOCK --- -# Copyright (C) 2018 Red Hat, Inc. -# All rights reserved. -# -# License: GPL (version 3 or any later version). -# See LICENSE for details. -# --- END COPYRIGHT BLOCK --- - -# -# A setup.py file -# - -from setuptools import setup, find_packages -from os import path - -from setuptools.command.build_py import build_py - -here = path.abspath(path.dirname(__file__)) - -# fedora/rhel versioning or PEP440?; ATM semantic versioning -# with open(path.join(here, 'VERSION'), 'r') as version_file: -# version = version_file.read().strip() - -version = "1.4.0.1" - -with open(path.join(here, 'README.md'), 'r') as f: - long_description = f.read() - -setup( - name='lib389', - license='GPLv3+', - version=version, - description='A library for accessing and configuring the 389 Directory ' + - 'Server', - long_description=long_description, - url='http://www.port389.org/docs/389ds/FAQ/upstream-test-framework.html', - - author='Red Hat Inc., and William Brown', - author_email='389-devel@lists.fedoraproject.org', - - classifiers=[ - 'Development Status :: 4 - Beta', - 'Intended Audience :: Developers', - 'Operating System :: POSIX :: Linux', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Topic :: Software Development :: Libraries', - 'Topic :: Software Development :: Quality Assurance', - 'Topic :: Software Development :: Testing'], - - keywords='389 directory server test configure', - packages=find_packages(exclude=['tests*']), - - # find lib389/clitools -name ds\* -exec echo \''{}'\', \; - data_files=[ - ('/usr/sbin/', [ - 'cli/dsctl', - 'cli/dsconf', - 'cli/dscreate', - 'cli/dsidm', - 'cli/openldap_to_ds', - ]), - ('/usr/libexec/dirsrv/', [ - 'cli/dscontainer', - ]), - ], - - install_requires=[ - 'pyasn1', - 'pyasn1-modules', - 'python-dateutil', - 'argcomplete', - 'argparse-manpage', - 'python-ldap', - 'setuptools', - 'distro', - ], - - cmdclass={ - } - -) diff --git a/docker/ansible/Dockerfile b/docker/ansible/Dockerfile deleted file mode 100644 index 2318e1e..0000000 --- a/docker/ansible/Dockerfile +++ /dev/null @@ -1,42 +0,0 @@ -FROM alpine:latest as dist -LABEL maintainer aynic.os - -RUN apk --no-cache add \ - ansible \ - py3-pip \ - && pip3 install boto - -RUN apk --no-cache upgrade - -ENTRYPOINT ["/usr/bin/ansible"] -CMD ["--help"] - -FROM dist as master -ARG DOCKER_BUILD_DIR -ARG UID -ARG USER -ENV UID=${UID} -ENV GID=${UID} -ENV USER=${USER} - -# If we provide a numeric UID -RUN [ "$UID" -eq "$UID" ] 2>/dev/null \ -# Remove user with $UID if it is not our $USER - && if [ "$(getent passwd $UID |awk -F: '{print $1}')" != "$USER" ]; then \ - sed -i '/^'$(getent passwd $UID |awk -F: '{print $1}')':x:'$UID':/d' /etc/passwd; \ - sed -i '/^'$(getent group $GID |awk -F: '{print $1}')':x:'$GID':/d' /etc/group; \ - fi \ -# Force $UID if our $USER already exists - && sed -i 's/^'$USER':x:[0-9]\+:[0-9]\+:/'$USER':x:'$UID':'$GID':/' /etc/passwd \ - && sed -i 's/^'$USER':x:[0-9]\+:/'$USER':x:'$GID':/' /etc/group \ -# Create $USER if it does not exist - && if [ "$(getent passwd $UID)" = "" ]; then \ - echo "$USER:x:$UID:$GID::/home/$USER:$SHELL" >> /etc/passwd; \ - echo "$USER:\!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \ - echo "$USER:x:$GID:" >> /etc/group; \ - fi \ - && mkdir -p /home/$USER \ - && chown $UID:$GID /home/$USER \ - || true - -USER $USER diff --git a/docker/apache/php5/Dockerfile b/docker/apache/php5/Dockerfile deleted file mode 100644 index 8996b81..0000000 --- a/docker/apache/php5/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM nimmis/alpine-apache-php5 -ARG DOCKER_BUILD_DIR - -RUN apk add --no-cache \ - memcached \ - php5-bz2 \ - php5-enchant \ - php5-gmp \ - php5-imap \ - php5-ldap \ - php5-memcache \ - php5-mssql \ - php5-mysqli \ - php5-opcache \ - php5-pdo \ - php5-pdo_mysql \ - php5-pdo_pgsql \ - php5-pdo_sqlite \ - php5-pspell \ - php5-snmp \ - php5-xcache \ - php5-xmlrpc \ - php5-xsl - -COPY ${DOCKER_BUILD_DIR}/apache-php5-config.sh /etc/run_always/51-config-apache -COPY ${DOCKER_BUILD_DIR}/php.ini /etc/php5/ -COPY ${DOCKER_BUILD_DIR}/header.php /etc/php5/ - -RUN mkdir -p /etc/sv/memcached \ - && echo -e '#!/bin/sh\n\nexec 2>&1\nexec chpst -u apache /usr/bin/memcached -s /var/tmp/memcached\n' > /etc/sv/memcached/run \ - && chmod +x /etc/sv/memcached/run \ - && ln -s ../sv/memcached /etc/service/memcached diff --git a/docker/apache/php5/apache-php5-config.sh b/docker/apache/php5/apache-php5-config.sh deleted file mode 100755 index 5a40182..0000000 --- a/docker/apache/php5/apache-php5-config.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -set -eu - -DOCUMENT_ROOT=${DOCUMENT_ROOT:-/web/html} -LOAD_MODULE=${LOAD_MODULE:-env expires headers remoteip reqtimeout rewrite setenvif slotmem_shm vhost_alias} -PREFIX=${PREFIX:-/web/config} -SERVER_NAME=${SERVER_NAME:-$(hostname)} -VIRTUAL_ROOT=${VIRTUAL_ROOT:-%0} - -sed -E -i \ - -e 's!^#?\s*(LoadModule ('${LOAD_MODULE// /|}')_module modules/mod_('${LOAD_MODULE// /|}').so)\s*!\1!g' \ - -e 's!^ServerName .*!ServerName '${SERVER_NAME}'!g' \ - -e 's!^ServerSignature .*!ServerSignature Off!g' \ - -e 's!DocumentRoot .*!DocumentRoot "'${DOCUMENT_ROOT}'"!; /DocumentRoot/,/Directory/{s!Directory .*"!Directory "'${DOCUMENT_ROOT}'"!}' \ - "$PREFIX/httpd.conf" -sed -ni \ - -e '/^VirtualDocumentRoot/!p;$a VirtualDocumentRoot '"${DOCUMENT_ROOT}/${VIRTUAL_ROOT:-%-1/%-2/%-3}"'' \ - "$PREFIX/conf.d/default.conf" -sed -i \ - -e 's!internal!localhost!g' \ - -e 's!^Alias .*!Alias "/localhost" "'${DOCUMENT_ROOT}'/localhost"!g; /Alias/,/Directory/{s!Directory .*"!Directory "'${DOCUMENT_ROOT}/localhost'"!}' \ - "$PREFIX/conf.d/errordocs.conf" diff --git a/docker/apache/php5/header.php b/docker/apache/php5/header.php deleted file mode 100644 index e9e805a..0000000 --- a/docker/apache/php5/header.php +++ /dev/null @@ -1,33 +0,0 @@ - diff --git a/docker/apache/php5/php.ini b/docker/apache/php5/php.ini deleted file mode 100644 index 17012e3..0000000 --- a/docker/apache/php5/php.ini +++ /dev/null @@ -1,1926 +0,0 @@ -[PHP] - -;;;;;;;;;;;;;;;;;;; -; About php.ini ; -;;;;;;;;;;;;;;;;;;; -; PHP's initialization file, generally called php.ini, is responsible for -; configuring many of the aspects of PHP's behavior. - -; PHP attempts to find and load this configuration from a number of locations. -; The following is a summary of its search order: -; 1. SAPI module specific location. -; 2. The PHPRC environment variable. (As of PHP 5.2.0) -; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0) -; 4. Current working directory (except CLI) -; 5. The web server's directory (for SAPI modules), or directory of PHP -; (otherwise in Windows) -; 6. The directory from the --with-config-file-path compile time option, or the -; Windows directory (C:\windows or C:\winnt) -; See the PHP docs for more specific information. -; http://php.net/configuration.file - -; The syntax of the file is extremely simple. Whitespace and lines -; beginning with a semicolon are silently ignored (as you probably guessed). -; Section headers (e.g. [Foo]) are also silently ignored, even though -; they might mean something in the future. - -; Directives following the section heading [PATH=/www/mysite] only -; apply to PHP files in the /www/mysite directory. Directives -; following the section heading [HOST=www.example.com] only apply to -; PHP files served from www.example.com. Directives set in these -; special sections cannot be overridden by user-defined INI files or -; at runtime. Currently, [PATH=] and [HOST=] sections only work under -; CGI/FastCGI. -; http://php.net/ini.sections - -; Directives are specified using the following syntax: -; directive = value -; Directive names are *case sensitive* - foo=bar is different from FOO=bar. -; Directives are variables used to configure PHP or PHP extensions. -; There is no name validation. If PHP can't find an expected -; directive because it is not set or is mistyped, a default value will be used. - -; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one -; of the INI constants (On, Off, True, False, Yes, No and None) or an expression -; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a -; previously set variable or directive (e.g. ${foo}) - -; Expressions in the INI file are limited to bitwise operators and parentheses: -; | bitwise OR -; ^ bitwise XOR -; & bitwise AND -; ~ bitwise NOT -; ! boolean NOT - -; Boolean flags can be turned on using the values 1, On, True or Yes. -; They can be turned off using the values 0, Off, False or No. - -; An empty string can be denoted by simply not writing anything after the equal -; sign, or by using the None keyword: - -; foo = ; sets foo to an empty string -; foo = None ; sets foo to an empty string -; foo = "None" ; sets foo to the string 'None' - -; If you use constants in your value, and these constants belong to a -; dynamically loaded extension (either a PHP extension or a Zend extension), -; you may only use these constants *after* the line that loads the extension. - -;;;;;;;;;;;;;;;;;;; -; About this file ; -;;;;;;;;;;;;;;;;;;; -; PHP comes packaged with two INI files. One that is recommended to be used -; in production environments and one that is recommended to be used in -; development environments. - -; php.ini-production contains settings which hold security, performance and -; best practices at its core. But please be aware, these settings may break -; compatibility with older or less security conscience applications. We -; recommending using the production ini in production and testing environments. - -; php.ini-development is very similar to its production variant, except it's -; much more verbose when it comes to errors. We recommending using the -; development version only in development environments as errors shown to -; application users can inadvertently leak otherwise secure information. - -; This is php.ini-production INI file. - -;;;;;;;;;;;;;;;;;;; -; Quick Reference ; -;;;;;;;;;;;;;;;;;;; -; The following are all the settings which are different in either the production -; or development versions of the INIs with respect to PHP's default behavior. -; Please see the actual settings later in the document for more details as to why -; we recommend these changes in PHP's behavior. - -; display_errors -; Default Value: On -; Development Value: On -; Production Value: Off - -; display_startup_errors -; Default Value: Off -; Development Value: On -; Production Value: Off - -; error_reporting -; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED -; Development Value: E_ALL -; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT - -; html_errors -; Default Value: On -; Development Value: On -; Production value: On - -; log_errors -; Default Value: Off -; Development Value: On -; Production Value: On - -; max_input_time -; Default Value: -1 (Unlimited) -; Development Value: 60 (60 seconds) -; Production Value: 60 (60 seconds) - -; output_buffering -; Default Value: Off -; Development Value: 4096 -; Production Value: 4096 - -; register_argc_argv -; Default Value: On -; Development Value: Off -; Production Value: Off - -; request_order -; Default Value: None -; Development Value: "GP" -; Production Value: "GP" - -; session.bug_compat_42 -; Default Value: On -; Development Value: On -; Production Value: Off - -; session.bug_compat_warn -; Default Value: On -; Development Value: On -; Production Value: Off - -; session.gc_divisor -; Default Value: 100 -; Development Value: 1000 -; Production Value: 1000 - -; session.hash_bits_per_character -; Default Value: 4 -; Development Value: 5 -; Production Value: 5 - -; short_open_tag -; Default Value: On -; Development Value: Off -; Production Value: Off - -; track_errors -; Default Value: Off -; Development Value: On -; Production Value: Off - -; url_rewriter.tags -; Default Value: "a=href,area=href,frame=src,form=,fieldset=" -; Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry" -; Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry" - -; variables_order -; Default Value: "EGPCS" -; Development Value: "GPCS" -; Production Value: "GPCS" - -;;;;;;;;;;;;;;;;;;;; -; php.ini Options ; -;;;;;;;;;;;;;;;;;;;; -; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini" -;user_ini.filename = ".user.ini" - -; To disable this feature set this option to empty value -;user_ini.filename = - -; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes) -;user_ini.cache_ttl = 300 - -;;;;;;;;;;;;;;;;;;;; -; Language Options ; -;;;;;;;;;;;;;;;;;;;; - -; Enable the PHP scripting language engine under Apache. -; http://php.net/engine -engine = On - -; This directive determines whether or not PHP will recognize code between -; tags as PHP source which should be processed as such. It's been -; recommended for several years that you not use the short tag "short cut" and -; instead to use the full tag combination. With the wide spread use -; of XML and use of these tags by other languages, the server can become easily -; confused and end up parsing the wrong code in the wrong context. But because -; this short cut has been a feature for such a long time, it's currently still -; supported for backwards compatibility, but we recommend you don't use them. -; Default Value: On -; Development Value: Off -; Production Value: Off -; http://php.net/short-open-tag -short_open_tag = Off - -; Allow ASP-style <% %> tags. -; http://php.net/asp-tags -asp_tags = Off - -; The number of significant digits displayed in floating point numbers. -; http://php.net/precision -precision = 14 - -; Output buffering is a mechanism for controlling how much output data -; (excluding headers and cookies) PHP should keep internally before pushing that -; data to the client. If your application's output exceeds this setting, PHP -; will send that data in chunks of roughly the size you specify. -; Turning on this setting and managing its maximum buffer size can yield some -; interesting side-effects depending on your application and web server. -; You may be able to send headers and cookies after you've already sent output -; through print or echo. You also may see performance benefits if your server is -; emitting less packets due to buffered output versus PHP streaming the output -; as it gets it. On production servers, 4096 bytes is a good setting for performance -; reasons. -; Note: Output buffering can also be controlled via Output Buffering Control -; functions. -; Possible Values: -; On = Enabled and buffer is unlimited. (Use with caution) -; Off = Disabled -; Integer = Enables the buffer and sets its maximum size in bytes. -; Note: This directive is hardcoded to Off for the CLI SAPI -; Default Value: Off -; Development Value: 4096 -; Production Value: 4096 -; http://php.net/output-buffering -output_buffering = 4096 -;output_buffering = Off - -; You can redirect all of the output of your scripts to a function. For -; example, if you set output_handler to "mb_output_handler", character -; encoding will be transparently converted to the specified encoding. -; Setting any output handler automatically turns on output buffering. -; Note: People who wrote portable scripts should not depend on this ini -; directive. Instead, explicitly set the output handler using ob_start(). -; Using this ini directive may cause problems unless you know what script -; is doing. -; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler" -; and you cannot use both "ob_gzhandler" and "zlib.output_compression". -; Note: output_handler must be empty if this is set 'On' !!!! -; Instead you must use zlib.output_handler. -; http://php.net/output-handler -;output_handler = - -; Transparent output compression using the zlib library -; Valid values for this option are 'off', 'on', or a specific buffer size -; to be used for compression (default is 4KB) -; Note: Resulting chunk size may vary due to nature of compression. PHP -; outputs chunks that are few hundreds bytes each as a result of -; compression. If you prefer a larger chunk size for better -; performance, enable output_buffering in addition. -; Note: You need to use zlib.output_handler instead of the standard -; output_handler, or otherwise the output will be corrupted. -; http://php.net/zlib.output-compression -zlib.output_compression = Off - -; http://php.net/zlib.output-compression-level -;zlib.output_compression_level = -1 - -; You cannot specify additional output handlers if zlib.output_compression -; is activated here. This setting does the same as output_handler but in -; a different order. -; http://php.net/zlib.output-handler -;zlib.output_handler = - -; Implicit flush tells PHP to tell the output layer to flush itself -; automatically after every output block. This is equivalent to calling the -; PHP function flush() after each and every call to print() or echo() and each -; and every HTML block. Turning this option on has serious performance -; implications and is generally recommended for debugging purposes only. -; http://php.net/implicit-flush -; Note: This directive is hardcoded to On for the CLI SAPI -implicit_flush = Off - -; The unserialize callback function will be called (with the undefined class' -; name as parameter), if the unserializer finds an undefined class -; which should be instantiated. A warning appears if the specified function is -; not defined, or if the function doesn't include/implement the missing class. -; So only set this entry, if you really want to implement such a -; callback-function. -unserialize_callback_func = - -; When floats & doubles are serialized store serialize_precision significant -; digits after the floating point. The default value ensures that when floats -; are decoded with unserialize, the data will remain the same. -serialize_precision = 17 - -; open_basedir, if set, limits all file operations to the defined directory -; and below. This directive makes most sense if used in a per-directory -; or per-virtualhost web server configuration file. This directive is -; *NOT* affected by whether Safe Mode is turned On or Off. -; http://php.net/open-basedir -;open_basedir = - -; This directive allows you to disable certain functions for security reasons. -; It receives a comma-delimited list of function names. This directive is -; *NOT* affected by whether Safe Mode is turned On or Off. -; http://php.net/disable-functions -disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, - -; This directive allows you to disable certain classes for security reasons. -; It receives a comma-delimited list of class names. This directive is -; *NOT* affected by whether Safe Mode is turned On or Off. -; http://php.net/disable-classes -disable_classes = - -; Colors for Syntax Highlighting mode. Anything that's acceptable in -; would work. -; http://php.net/syntax-highlighting -;highlight.string = #DD0000 -;highlight.comment = #FF9900 -;highlight.keyword = #007700 -;highlight.default = #0000BB -;highlight.html = #000000 - -; If enabled, the request will be allowed to complete even if the user aborts -; the request. Consider enabling it if executing long requests, which may end up -; being interrupted by the user or a browser timing out. PHP's default behavior -; is to disable this feature. -; http://php.net/ignore-user-abort -;ignore_user_abort = On - -; Determines the size of the realpath cache to be used by PHP. This value should -; be increased on systems where PHP opens many files to reflect the quantity of -; the file operations performed. -; http://php.net/realpath-cache-size -;realpath_cache_size = 16k - -; Duration of time, in seconds for which to cache realpath information for a given -; file or directory. For systems with rarely changing files, consider increasing this -; value. -; http://php.net/realpath-cache-ttl -;realpath_cache_ttl = 120 - -; Enables or disables the circular reference collector. -; http://php.net/zend.enable-gc -zend.enable_gc = On - -; If enabled, scripts may be written in encodings that are incompatible with -; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such -; encodings. To use this feature, mbstring extension must be enabled. -; Default: Off -;zend.multibyte = Off - -; Allows to set the default encoding for the scripts. This value will be used -; unless "declare(encoding=...)" directive appears at the top of the script. -; Only affects if zend.multibyte is set. -; Default: "" -;zend.script_encoding = - -;;;;;;;;;;;;;;;;; -; Miscellaneous ; -;;;;;;;;;;;;;;;;; - -; Decides whether PHP may expose the fact that it is installed on the server -; (e.g. by adding its signature to the Web server header). It is no security -; threat in any way, but it makes it possible to determine whether you use PHP -; on your server or not. -; http://php.net/expose-php -expose_php = On - -;;;;;;;;;;;;;;;;;;; -; Resource Limits ; -;;;;;;;;;;;;;;;;;;; - -; Maximum execution time of each script, in seconds -; http://php.net/max-execution-time -; Note: This directive is hardcoded to 0 for the CLI SAPI -max_execution_time = 320 - -; Maximum amount of time each script may spend parsing request data. It's a good -; idea to limit this time on productions servers in order to eliminate unexpectedly -; long running scripts. -; Note: This directive is hardcoded to -1 for the CLI SAPI -; Default Value: -1 (Unlimited) -; Development Value: 60 (60 seconds) -; Production Value: 60 (60 seconds) -; http://php.net/max-input-time -max_input_time = 320 - -; Maximum input variable nesting level -; http://php.net/max-input-nesting-level -;max_input_nesting_level = 64 - -; How many GET/POST/COOKIE input variables may be accepted -; max_input_vars = 1000 - -; Maximum amount of memory a script may consume (128MB) -; http://php.net/memory-limit -memory_limit = 128M - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Error handling and logging ; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; This directive informs PHP of which errors, warnings and notices you would like -; it to take action for. The recommended way of setting values for this -; directive is through the use of the error level constants and bitwise -; operators. The error level constants are below here for convenience as well as -; some common settings and their meanings. -; By default, PHP is set to take action on all errors, notices and warnings EXCEPT -; those related to E_NOTICE and E_STRICT, which together cover best practices and -; recommended coding standards in PHP. For performance reasons, this is the -; recommend error reporting setting. Your production server shouldn't be wasting -; resources complaining about best practices and coding standards. That's what -; development servers and development settings are for. -; Note: The php.ini-development file has this setting as E_ALL. This -; means it pretty much reports everything which is exactly what you want during -; development and early testing. -; -; Error Level Constants: -; E_ALL - All errors and warnings (includes E_STRICT as of PHP 5.4.0) -; E_ERROR - fatal run-time errors -; E_RECOVERABLE_ERROR - almost fatal run-time errors -; E_WARNING - run-time warnings (non-fatal errors) -; E_PARSE - compile-time parse errors -; E_NOTICE - run-time notices (these are warnings which often result -; from a bug in your code, but it's possible that it was -; intentional (e.g., using an uninitialized variable and -; relying on the fact it's automatically initialized to an -; empty string) -; E_STRICT - run-time notices, enable to have PHP suggest changes -; to your code which will ensure the best interoperability -; and forward compatibility of your code -; E_CORE_ERROR - fatal errors that occur during PHP's initial startup -; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's -; initial startup -; E_COMPILE_ERROR - fatal compile-time errors -; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) -; E_USER_ERROR - user-generated error message -; E_USER_WARNING - user-generated warning message -; E_USER_NOTICE - user-generated notice message -; E_DEPRECATED - warn about code that will not work in future versions -; of PHP -; E_USER_DEPRECATED - user-generated deprecation warnings -; -; Common Values: -; E_ALL (Show all errors, warnings and notices including coding standards.) -; E_ALL & ~E_NOTICE (Show all errors, except for notices) -; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.) -; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) -; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED -; Development Value: E_ALL -; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT -; http://php.net/error-reporting -error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT - -; This directive controls whether or not and where PHP will output errors, -; notices and warnings too. Error output is very useful during development, but -; it could be very dangerous in production environments. Depending on the code -; which is triggering the error, sensitive information could potentially leak -; out of your application such as database usernames and passwords or worse. -; It's recommended that errors be logged on production servers rather than -; having the errors sent to STDOUT. -; Possible Values: -; Off = Do not display any errors -; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) -; On or stdout = Display errors to STDOUT -; Default Value: On -; Development Value: On -; Production Value: Off -; http://php.net/display-errors -display_errors = Off - -; The display of errors which occur during PHP's startup sequence are handled -; separately from display_errors. PHP's default behavior is to suppress those -; errors from clients. Turning the display of startup errors on can be useful in -; debugging configuration problems. But, it's strongly recommended that you -; leave this setting off on production servers. -; Default Value: Off -; Development Value: On -; Production Value: Off -; http://php.net/display-startup-errors -display_startup_errors = Off - -; Besides displaying errors, PHP can also log errors to locations such as a -; server-specific log, STDERR, or a location specified by the error_log -; directive found below. While errors should not be displayed on productions -; servers they should still be monitored and logging is a great way to do that. -; Default Value: Off -; Development Value: On -; Production Value: On -; http://php.net/log-errors -log_errors = On - -; Set maximum length of log_errors. In error_log information about the source is -; added. The default is 1024 and 0 allows to not apply any maximum length at all. -; http://php.net/log-errors-max-len -log_errors_max_len = 1024 - -; Do not log repeated messages. Repeated errors must occur in same file on same -; line unless ignore_repeated_source is set true. -; http://php.net/ignore-repeated-errors -ignore_repeated_errors = Off - -; Ignore source of message when ignoring repeated messages. When this setting -; is On you will not log errors with repeated messages from different files or -; source lines. -; http://php.net/ignore-repeated-source -ignore_repeated_source = Off - -; If this parameter is set to Off, then memory leaks will not be shown (on -; stdout or in the log). This has only effect in a debug compile, and if -; error reporting includes E_WARNING in the allowed list -; http://php.net/report-memleaks -report_memleaks = On - -; This setting is on by default. -;report_zend_debug = 0 - -; Store the last error/warning message in $php_errormsg (boolean). Setting this value -; to On can assist in debugging and is appropriate for development servers. It should -; however be disabled on production servers. -; Default Value: Off -; Development Value: On -; Production Value: Off -; http://php.net/track-errors -track_errors = On - -; Turn off normal error reporting and emit XML-RPC error XML -; http://php.net/xmlrpc-errors -;xmlrpc_errors = 0 - -; An XML-RPC faultCode -;xmlrpc_error_number = 0 - -; When PHP displays or logs an error, it has the capability of formatting the -; error message as HTML for easier reading. This directive controls whether -; the error message is formatted as HTML or not. -; Note: This directive is hardcoded to Off for the CLI SAPI -; Default Value: On -; Development Value: On -; Production value: On -; http://php.net/html-errors -html_errors = On - -; If html_errors is set to On *and* docref_root is not empty, then PHP -; produces clickable error messages that direct to a page describing the error -; or function causing the error in detail. -; You can download a copy of the PHP manual from http://php.net/docs -; and change docref_root to the base URL of your local copy including the -; leading '/'. You must also specify the file extension being used including -; the dot. PHP's default behavior is to leave these settings empty, in which -; case no links to documentation are generated. -; Note: Never use this feature for production boxes. -; http://php.net/docref-root -; Examples -;docref_root = "/phpmanual/" - -; http://php.net/docref-ext -;docref_ext = .html - -; String to output before an error message. PHP's default behavior is to leave -; this setting blank. -; http://php.net/error-prepend-string -; Example: -;error_prepend_string = "" - -; String to output after an error message. PHP's default behavior is to leave -; this setting blank. -; http://php.net/error-append-string -; Example: -;error_append_string = "" - -; Log errors to specified file. PHP's default behavior is to leave this value -; empty. -; http://php.net/error-log -; Example: -;error_log = php_errors.log -; Log errors to syslog (Event Log on NT, not valid in Windows 95). -;error_log = syslog - -;windows.show_crt_warning -; Default value: 0 -; Development value: 0 -; Production value: 0 - -;;;;;;;;;;;;;;;;; -; Data Handling ; -;;;;;;;;;;;;;;;;; - -; The separator used in PHP generated URLs to separate arguments. -; PHP's default setting is "&". -; http://php.net/arg-separator.output -; Example: -;arg_separator.output = "&" - -; List of separator(s) used by PHP to parse input URLs into variables. -; PHP's default setting is "&". -; NOTE: Every character in this directive is considered as separator! -; http://php.net/arg-separator.input -; Example: -;arg_separator.input = ";&" - -; This directive determines which super global arrays are registered when PHP -; starts up. G,P,C,E & S are abbreviations for the following respective super -; globals: GET, POST, COOKIE, ENV and SERVER. There is a performance penalty -; paid for the registration of these arrays and because ENV is not as commonly -; used as the others, ENV is not recommended on productions servers. You -; can still get access to the environment variables through getenv() should you -; need to. -; Default Value: "EGPCS" -; Development Value: "GPCS" -; Production Value: "GPCS"; -; http://php.net/variables-order -variables_order = "GPCS" - -; This directive determines which super global data (G,P,C,E & S) should -; be registered into the super global array REQUEST. If so, it also determines -; the order in which that data is registered. The values for this directive are -; specified in the same manner as the variables_order directive, EXCEPT one. -; Leaving this value empty will cause PHP to use the value set in the -; variables_order directive. It does not mean it will leave the super globals -; array REQUEST empty. -; Default Value: None -; Development Value: "GP" -; Production Value: "GP" -; http://php.net/request-order -request_order = "GP" - -; This directive determines whether PHP registers $argv & $argc each time it -; runs. $argv contains an array of all the arguments passed to PHP when a script -; is invoked. $argc contains an integer representing the number of arguments -; that were passed when the script was invoked. These arrays are extremely -; useful when running scripts from the command line. When this directive is -; enabled, registering these variables consumes CPU cycles and memory each time -; a script is executed. For performance reasons, this feature should be disabled -; on production servers. -; Note: This directive is hardcoded to On for the CLI SAPI -; Default Value: On -; Development Value: Off -; Production Value: Off -; http://php.net/register-argc-argv -register_argc_argv = Off - -; When enabled, the ENV, REQUEST and SERVER variables are created when they're -; first used (Just In Time) instead of when the script starts. If these -; variables are not used within a script, having this directive on will result -; in a performance gain. The PHP directive register_argc_argv must be disabled -; for this directive to have any affect. -; http://php.net/auto-globals-jit -auto_globals_jit = On - -; Whether PHP will read the POST data. -; This option is enabled by default. -; Most likely, you won't want to disable this option globally. It causes $_POST -; and $_FILES to always be empty; the only way you will be able to read the -; POST data will be through the php://input stream wrapper. This can be useful -; to proxy requests or to process the POST data in a memory efficient fashion. -; http://php.net/enable-post-data-reading -;enable_post_data_reading = Off - -; Maximum size of POST data that PHP will accept. -; Its value may be 0 to disable the limit. It is ignored if POST data reading -; is disabled through enable_post_data_reading. -; http://php.net/post-max-size -;post_max_size = 8M -post_max_size = 128M - -; Automatically add files before PHP document. -; http://php.net/auto-prepend-file -auto_prepend_file = /etc/php5/header.php - -; Automatically add files after PHP document. -; http://php.net/auto-append-file -auto_append_file = - -; By default, PHP will output a character encoding using -; the Content-type: header. To disable sending of the charset, simply -; set it to be empty. -; -; PHP's built-in default is text/html -; http://php.net/default-mimetype -default_mimetype = "text/html" - -; PHP's default character set is set to empty. -; http://php.net/default-charset -default_charset = "UTF-8" - -; Always populate the $HTTP_RAW_POST_DATA variable. PHP's default behavior is -; to disable this feature. If post reading is disabled through -; enable_post_data_reading, $HTTP_RAW_POST_DATA is *NOT* populated. -; http://php.net/always-populate-raw-post-data -;always_populate_raw_post_data = On - -;;;;;;;;;;;;;;;;;;;;;;;;; -; Paths and Directories ; -;;;;;;;;;;;;;;;;;;;;;;;;; - -; UNIX: "/path1:/path2" -;include_path = ".:/usr/share/php" -; -; Windows: "\path1;\path2" -;include_path = ".;c:\php\includes" -; -; PHP's default setting for include_path is ".;/path/to/php/pear" -; http://php.net/include-path - -; The root of the PHP pages, used only if nonempty. -; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root -; if you are running php as a CGI under any web server (other than IIS) -; see documentation for security issues. The alternate is to use the -; cgi.force_redirect configuration below -; http://php.net/doc-root -doc_root = - -; The directory under which PHP opens the script using /~username used only -; if nonempty. -; http://php.net/user-dir -user_dir = - -; Directory in which the loadable extensions (modules) reside. -; http://php.net/extension-dir -; extension_dir = "./" -; On windows: -; extension_dir = "ext" - -; Directory where the temporary files should be placed. -; Defaults to the system default (see sys_get_temp_dir) -; sys_temp_dir = "/tmp" - -; Whether or not to enable the dl() function. The dl() function does NOT work -; properly in multithreaded servers, such as IIS or Zeus, and is automatically -; disabled on them. -; http://php.net/enable-dl -enable_dl = Off - -; cgi.force_redirect is necessary to provide security running PHP as a CGI under -; most web servers. Left undefined, PHP turns this on by default. You can -; turn it off here AT YOUR OWN RISK -; **You CAN safely turn this off for IIS, in fact, you MUST.** -; http://php.net/cgi.force-redirect -;cgi.force_redirect = 1 - -; if cgi.nph is enabled it will force cgi to always sent Status: 200 with -; every request. PHP's default behavior is to disable this feature. -;cgi.nph = 1 - -; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape -; (iPlanet) web servers, you MAY need to set an environment variable name that PHP -; will look for to know it is OK to continue execution. Setting this variable MAY -; cause security issues, KNOW WHAT YOU ARE DOING FIRST. -; http://php.net/cgi.redirect-status-env -;cgi.redirect_status_env = - -; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's -; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok -; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting -; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting -; of zero causes PHP to behave as before. Default is 1. You should fix your scripts -; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. -; http://php.net/cgi.fix-pathinfo -;cgi.fix_pathinfo=1 - -; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate -; security tokens of the calling client. This allows IIS to define the -; security context that the request runs under. mod_fastcgi under Apache -; does not currently support this feature (03/17/2002) -; Set to 1 if running under IIS. Default is zero. -; http://php.net/fastcgi.impersonate -;fastcgi.impersonate = 1 - -; Disable logging through FastCGI connection. PHP's default behavior is to enable -; this feature. -;fastcgi.logging = 0 - -; cgi.rfc2616_headers configuration option tells PHP what type of headers to -; use when sending HTTP response code. If it's set 0 PHP sends Status: header that -; is supported by Apache. When this option is set to 1 PHP will send -; RFC2616 compliant header. -; Default is zero. -; http://php.net/cgi.rfc2616-headers -;cgi.rfc2616_headers = 0 - -;;;;;;;;;;;;;;;; -; File Uploads ; -;;;;;;;;;;;;;;;; - -; Whether to allow HTTP file uploads. -; http://php.net/file-uploads -file_uploads = On - -; Temporary directory for HTTP uploaded files (will use system default if not -; specified). -; http://php.net/upload-tmp-dir -;upload_tmp_dir = - -; Maximum allowed size for uploaded files. -; http://php.net/upload-max-filesize -;upload_max_filesize = 8M -upload_max_filesize = 128M - -; Maximum number of files that can be uploaded via a single request -max_file_uploads = 20 - -;;;;;;;;;;;;;;;;;; -; Fopen wrappers ; -;;;;;;;;;;;;;;;;;; - -; Whether to allow the treatment of URLs (like http:// or ftp://) as files. -; http://php.net/allow-url-fopen -allow_url_fopen = On - -; Whether to allow include/require to open URLs (like http:// or ftp://) as files. -; http://php.net/allow-url-include -allow_url_include = Off - -; Define the anonymous ftp password (your email address). PHP's default setting -; for this is empty. -; http://php.net/from -;from="john@doe.com" - -; Define the User-Agent string. PHP's default setting for this is empty. -; http://php.net/user-agent -;user_agent="PHP" - -; Default timeout for socket based streams (seconds) -; http://php.net/default-socket-timeout -default_socket_timeout = 60 - -; If your scripts have to deal with files from Macintosh systems, -; or you are running on a Mac and need to deal with files from -; unix or win32 systems, setting this flag will cause PHP to -; automatically detect the EOL character in those files so that -; fgets() and file() will work regardless of the source of the file. -; http://php.net/auto-detect-line-endings -;auto_detect_line_endings = Off - -;;;;;;;;;;;;;;;;;;;;;; -; Dynamic Extensions ; -;;;;;;;;;;;;;;;;;;;;;; - -; If you wish to have an extension loaded automatically, use the following -; syntax: -; -; extension=modulename.extension -; -; For example, on Windows: -; -; extension=msql.dll -; -; ... or under UNIX: -; -; extension=msql.so -; -; ... or with a path: -; -; extension=/path/to/extension/msql.so -; -; If you only provide the name of the extension, PHP will look for it in its -; default extension directory. -; - -;;;;;;;;;;;;;;;;;;; -; Module Settings ; -;;;;;;;;;;;;;;;;;;; - -[CLI Server] -; Whether the CLI web server uses ANSI color coding in its terminal output. -cli_server.color = On - -[Date] -; Defines the default timezone used by the date functions -; http://php.net/date.timezone -date.timezone = Europe/Paris - -; http://php.net/date.default-latitude -;date.default_latitude = 31.7667 - -; http://php.net/date.default-longitude -;date.default_longitude = 35.2333 - -; http://php.net/date.sunrise-zenith -;date.sunrise_zenith = 90.583333 - -; http://php.net/date.sunset-zenith -;date.sunset_zenith = 90.583333 - -[filter] -; http://php.net/filter.default -;filter.default = unsafe_raw - -; http://php.net/filter.default-flags -;filter.default_flags = - -[iconv] -;iconv.input_encoding = ISO-8859-1 -;iconv.internal_encoding = ISO-8859-1 -;iconv.output_encoding = ISO-8859-1 - -[intl] -;intl.default_locale = -; This directive allows you to produce PHP errors when some error -; happens within intl functions. The value is the level of the error produced. -; Default is 0, which does not produce any errors. -;intl.error_level = E_WARNING - -[sqlite] -; http://php.net/sqlite.assoc-case -;sqlite.assoc_case = 0 - -[sqlite3] -;sqlite3.extension_dir = - -[Pcre] -;PCRE library backtracking limit. -; http://php.net/pcre.backtrack-limit -;pcre.backtrack_limit=100000 - -;PCRE library recursion limit. -;Please note that if you set this value to a high number you may consume all -;the available process stack and eventually crash PHP (due to reaching the -;stack size limit imposed by the Operating System). -; http://php.net/pcre.recursion-limit -;pcre.recursion_limit=100000 - -[Pdo] -; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off" -; http://php.net/pdo-odbc.connection-pooling -;pdo_odbc.connection_pooling=strict - -;pdo_odbc.db2_instance_name - -[Pdo_mysql] -; If mysqlnd is used: Number of cache slots for the internal result set cache -; http://php.net/pdo_mysql.cache_size -pdo_mysql.cache_size = 2000 - -; Default socket name for local MySQL connects. If empty, uses the built-in -; MySQL defaults. -; http://php.net/pdo_mysql.default-socket -pdo_mysql.default_socket= - -[Phar] -; http://php.net/phar.readonly -;phar.readonly = On - -; http://php.net/phar.require-hash -;phar.require_hash = On - -;phar.cache_list = - -[mail function] -; For Win32 only. -; http://php.net/smtp -SMTP = localhost -; http://php.net/smtp-port -smtp_port = 25 - -; For Win32 only. -; http://php.net/sendmail-from -;sendmail_from = me@example.com - -; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). -; http://php.net/sendmail-path -;sendmail_path = - -; Force the addition of the specified parameters to be passed as extra parameters -; to the sendmail binary. These parameters will always replace the value of -; the 5th parameter to mail(), even in safe mode. -;mail.force_extra_parameters = - -; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename -mail.add_x_header = On - -; The path to a log file that will log all mail() calls. Log entries include -; the full path of the script, line number, To address and headers. -;mail.log = -; Log mail to syslog (Event Log on NT, not valid in Windows 95). -;mail.log = syslog - -[SQL] -; http://php.net/sql.safe-mode -sql.safe_mode = Off - -[ODBC] -; http://php.net/odbc.default-db -;odbc.default_db = Not yet implemented - -; http://php.net/odbc.default-user -;odbc.default_user = Not yet implemented - -; http://php.net/odbc.default-pw -;odbc.default_pw = Not yet implemented - -; Controls the ODBC cursor model. -; Default: SQL_CURSOR_STATIC (default). -;odbc.default_cursortype - -; Allow or prevent persistent links. -; http://php.net/odbc.allow-persistent -odbc.allow_persistent = On - -; Check that a connection is still valid before reuse. -; http://php.net/odbc.check-persistent -odbc.check_persistent = On - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/odbc.max-persistent -odbc.max_persistent = -1 - -; Maximum number of links (persistent + non-persistent). -1 means no limit. -; http://php.net/odbc.max-links -odbc.max_links = -1 - -; Handling of LONG fields. Returns number of bytes to variables. 0 means -; passthru. -; http://php.net/odbc.defaultlrl -odbc.defaultlrl = 4096 - -; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char. -; See the documentation on odbc_binmode and odbc_longreadlen for an explanation -; of odbc.defaultlrl and odbc.defaultbinmode -; http://php.net/odbc.defaultbinmode -odbc.defaultbinmode = 1 - -;birdstep.max_links = -1 - -[Interbase] -; Allow or prevent persistent links. -ibase.allow_persistent = 1 - -; Maximum number of persistent links. -1 means no limit. -ibase.max_persistent = -1 - -; Maximum number of links (persistent + non-persistent). -1 means no limit. -ibase.max_links = -1 - -; Default database name for ibase_connect(). -;ibase.default_db = - -; Default username for ibase_connect(). -;ibase.default_user = - -; Default password for ibase_connect(). -;ibase.default_password = - -; Default charset for ibase_connect(). -;ibase.default_charset = - -; Default timestamp format. -ibase.timestampformat = "%Y-%m-%d %H:%M:%S" - -; Default date format. -ibase.dateformat = "%Y-%m-%d" - -; Default time format. -ibase.timeformat = "%H:%M:%S" - -[MySQL] -; Allow accessing, from PHP's perspective, local files with LOAD DATA statements -; http://php.net/mysql.allow_local_infile -mysql.allow_local_infile = On - -; Allow or prevent persistent links. -; http://php.net/mysql.allow-persistent -mysql.allow_persistent = On - -; If mysqlnd is used: Number of cache slots for the internal result set cache -; http://php.net/mysql.cache_size -mysql.cache_size = 2000 - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/mysql.max-persistent -mysql.max_persistent = -1 - -; Maximum number of links (persistent + non-persistent). -1 means no limit. -; http://php.net/mysql.max-links -mysql.max_links = -1 - -; Default port number for mysql_connect(). If unset, mysql_connect() will use -; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the -; compile-time value defined MYSQL_PORT (in that order). Win32 will only look -; at MYSQL_PORT. -; http://php.net/mysql.default-port -mysql.default_port = - -; Default socket name for local MySQL connects. If empty, uses the built-in -; MySQL defaults. -; http://php.net/mysql.default-socket -mysql.default_socket = - -; Default host for mysql_connect() (doesn't apply in safe mode). -; http://php.net/mysql.default-host -mysql.default_host = - -; Default user for mysql_connect() (doesn't apply in safe mode). -; http://php.net/mysql.default-user -mysql.default_user = - -; Default password for mysql_connect() (doesn't apply in safe mode). -; Note that this is generally a *bad* idea to store passwords in this file. -; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password") -; and reveal this password! And of course, any users with read access to this -; file will be able to reveal the password as well. -; http://php.net/mysql.default-password -mysql.default_password = - -; Maximum time (in seconds) for connect timeout. -1 means no limit -; http://php.net/mysql.connect-timeout -mysql.connect_timeout = 60 - -; Trace mode. When trace_mode is active (=On), warnings for table/index scans and -; SQL-Errors will be displayed. -; http://php.net/mysql.trace-mode -mysql.trace_mode = Off - -[MySQLi] - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/mysqli.max-persistent -mysqli.max_persistent = -1 - -; Allow accessing, from PHP's perspective, local files with LOAD DATA statements -; http://php.net/mysqli.allow_local_infile -;mysqli.allow_local_infile = On - -; Allow or prevent persistent links. -; http://php.net/mysqli.allow-persistent -mysqli.allow_persistent = On - -; Maximum number of links. -1 means no limit. -; http://php.net/mysqli.max-links -mysqli.max_links = -1 - -; If mysqlnd is used: Number of cache slots for the internal result set cache -; http://php.net/mysqli.cache_size -mysqli.cache_size = 2000 - -; Default port number for mysqli_connect(). If unset, mysqli_connect() will use -; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the -; compile-time value defined MYSQL_PORT (in that order). Win32 will only look -; at MYSQL_PORT. -; http://php.net/mysqli.default-port -mysqli.default_port = 3306 - -; Default socket name for local MySQL connects. If empty, uses the built-in -; MySQL defaults. -; http://php.net/mysqli.default-socket -mysqli.default_socket = - -; Default host for mysql_connect() (doesn't apply in safe mode). -; http://php.net/mysqli.default-host -mysqli.default_host = - -; Default user for mysql_connect() (doesn't apply in safe mode). -; http://php.net/mysqli.default-user -mysqli.default_user = - -; Default password for mysqli_connect() (doesn't apply in safe mode). -; Note that this is generally a *bad* idea to store passwords in this file. -; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw") -; and reveal this password! And of course, any users with read access to this -; file will be able to reveal the password as well. -; http://php.net/mysqli.default-pw -mysqli.default_pw = - -; Allow or prevent reconnect -mysqli.reconnect = Off - -[mysqlnd] -; Enable / Disable collection of general statistics by mysqlnd which can be -; used to tune and monitor MySQL operations. -; http://php.net/mysqlnd.collect_statistics -mysqlnd.collect_statistics = On - -; Enable / Disable collection of memory usage statistics by mysqlnd which can be -; used to tune and monitor MySQL operations. -; http://php.net/mysqlnd.collect_memory_statistics -mysqlnd.collect_memory_statistics = Off - -; Size of a pre-allocated buffer used when sending commands to MySQL in bytes. -; http://php.net/mysqlnd.net_cmd_buffer_size -;mysqlnd.net_cmd_buffer_size = 2048 - -; Size of a pre-allocated buffer used for reading data sent by the server in -; bytes. -; http://php.net/mysqlnd.net_read_buffer_size -;mysqlnd.net_read_buffer_size = 32768 - -[OCI8] - -; Connection: Enables privileged connections using external -; credentials (OCI_SYSOPER, OCI_SYSDBA) -; http://php.net/oci8.privileged-connect -;oci8.privileged_connect = Off - -; Connection: The maximum number of persistent OCI8 connections per -; process. Using -1 means no limit. -; http://php.net/oci8.max-persistent -;oci8.max_persistent = -1 - -; Connection: The maximum number of seconds a process is allowed to -; maintain an idle persistent connection. Using -1 means idle -; persistent connections will be maintained forever. -; http://php.net/oci8.persistent-timeout -;oci8.persistent_timeout = -1 - -; Connection: The number of seconds that must pass before issuing a -; ping during oci_pconnect() to check the connection validity. When -; set to 0, each oci_pconnect() will cause a ping. Using -1 disables -; pings completely. -; http://php.net/oci8.ping-interval -;oci8.ping_interval = 60 - -; Connection: Set this to a user chosen connection class to be used -; for all pooled server requests with Oracle 11g Database Resident -; Connection Pooling (DRCP). To use DRCP, this value should be set to -; the same string for all web servers running the same application, -; the database pool must be configured, and the connection string must -; specify to use a pooled server. -;oci8.connection_class = - -; High Availability: Using On lets PHP receive Fast Application -; Notification (FAN) events generated when a database node fails. The -; database must also be configured to post FAN events. -;oci8.events = Off - -; Tuning: This option enables statement caching, and specifies how -; many statements to cache. Using 0 disables statement caching. -; http://php.net/oci8.statement-cache-size -;oci8.statement_cache_size = 20 - -; Tuning: Enables statement prefetching and sets the default number of -; rows that will be fetched automatically after statement execution. -; http://php.net/oci8.default-prefetch -;oci8.default_prefetch = 100 - -; Compatibility. Using On means oci_close() will not close -; oci_connect() and oci_new_connect() connections. -; http://php.net/oci8.old-oci-close-semantics -;oci8.old_oci_close_semantics = Off - -[PostgreSQL] -; Allow or prevent persistent links. -; http://php.net/pgsql.allow-persistent -pgsql.allow_persistent = On - -; Detect broken persistent links always with pg_pconnect(). -; Auto reset feature requires a little overheads. -; http://php.net/pgsql.auto-reset-persistent -pgsql.auto_reset_persistent = Off - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/pgsql.max-persistent -pgsql.max_persistent = -1 - -; Maximum number of links (persistent+non persistent). -1 means no limit. -; http://php.net/pgsql.max-links -pgsql.max_links = -1 - -; Ignore PostgreSQL backends Notice message or not. -; Notice message logging require a little overheads. -; http://php.net/pgsql.ignore-notice -pgsql.ignore_notice = 0 - -; Log PostgreSQL backends Notice message or not. -; Unless pgsql.ignore_notice=0, module cannot log notice message. -; http://php.net/pgsql.log-notice -pgsql.log_notice = 0 - -[Sybase-CT] -; Allow or prevent persistent links. -; http://php.net/sybct.allow-persistent -sybct.allow_persistent = On - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/sybct.max-persistent -sybct.max_persistent = -1 - -; Maximum number of links (persistent + non-persistent). -1 means no limit. -; http://php.net/sybct.max-links -sybct.max_links = -1 - -; Minimum server message severity to display. -; http://php.net/sybct.min-server-severity -sybct.min_server_severity = 10 - -; Minimum client message severity to display. -; http://php.net/sybct.min-client-severity -sybct.min_client_severity = 10 - -; Set per-context timeout -; http://php.net/sybct.timeout -;sybct.timeout= - -;sybct.packet_size - -; The maximum time in seconds to wait for a connection attempt to succeed before returning failure. -; Default: one minute -;sybct.login_timeout= - -; The name of the host you claim to be connecting from, for display by sp_who. -; Default: none -;sybct.hostname= - -; Allows you to define how often deadlocks are to be retried. -1 means "forever". -; Default: 0 -;sybct.deadlock_retry_count= - -[bcmath] -; Number of decimal digits for all bcmath functions. -; http://php.net/bcmath.scale -bcmath.scale = 0 - -[browscap] -; http://php.net/browscap -;browscap = extra/browscap.ini - -[Session] -; Handler used to store/retrieve data. -; http://php.net/session.save-handler -session.save_handler = memcache - -; Argument passed to save_handler. In the case of files, this is the path -; where data files are stored. Note: Windows users have to change this -; variable in order to use PHP's session functions. -; -; The path can be defined as: -; -; session.save_path = "N;/path" -; -; where N is an integer. Instead of storing all the session files in -; /path, what this will do is use subdirectories N-levels deep, and -; store the session data in those directories. This is useful if you -; or your OS have problems with lots of files in one directory, and is -; a more efficient layout for servers that handle lots of sessions. -; -; NOTE 1: PHP will not create this directory structure automatically. -; You can use the script in the ext/session dir for that purpose. -; NOTE 2: See the section on garbage collection below if you choose to -; use subdirectories for session storage -; -; The file storage module creates files using mode 600 by default. -; You can change that by using -; -; session.save_path = "N;MODE;/path" -; -; where MODE is the octal representation of the mode. Note that this -; does not overwrite the process's umask. -; http://php.net/session.save-path -session.save_path = "file:///var/tmp/memcached?persistent=1" - -; Whether to use cookies. -; http://php.net/session.use-cookies -session.use_cookies = 1 - -; http://php.net/session.cookie-secure -;session.cookie_secure = - -; This option forces PHP to fetch and use a cookie for storing and maintaining -; the session id. We encourage this operation as it's very helpful in combating -; session hijacking when not specifying and managing your own session id. It is -; not the end all be all of session hijacking defense, but it's a good start. -; http://php.net/session.use-only-cookies -session.use_only_cookies = 1 - -; Name of the session (used as cookie name). -; http://php.net/session.name -session.name = PHPSESSID - -; Initialize session on request startup. -; http://php.net/session.auto-start -session.auto_start = 0 - -; Lifetime in seconds of cookie or, if 0, until browser is restarted. -; http://php.net/session.cookie-lifetime -session.cookie_lifetime = 0 - -; The path for which the cookie is valid. -; http://php.net/session.cookie-path -session.cookie_path = / - -; The domain for which the cookie is valid. -; http://php.net/session.cookie-domain -session.cookie_domain = - -; Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser scripting languages such as JavaScript. -; http://php.net/session.cookie-httponly -session.cookie_httponly = - -; Handler used to serialize data. php is the standard serializer of PHP. -; http://php.net/session.serialize-handler -session.serialize_handler = php - -; Defines the probability that the 'garbage collection' process is started -; on every session initialization. The probability is calculated by using -; gc_probability/gc_divisor. Where session.gc_probability is the numerator -; and gc_divisor is the denominator in the equation. Setting this value to 1 -; when the session.gc_divisor value is 100 will give you approximately a 1% chance -; the gc will run on any give request. -; Default Value: 1 -; Development Value: 1 -; Production Value: 1 -; http://php.net/session.gc-probability -session.gc_probability = 0 - -; Defines the probability that the 'garbage collection' process is started on every -; session initialization. The probability is calculated by using the following equation: -; gc_probability/gc_divisor. Where session.gc_probability is the numerator and -; session.gc_divisor is the denominator in the equation. Setting this value to 1 -; when the session.gc_divisor value is 100 will give you approximately a 1% chance -; the gc will run on any give request. Increasing this value to 1000 will give you -; a 0.1% chance the gc will run on any give request. For high volume production servers, -; this is a more efficient approach. -; Default Value: 100 -; Development Value: 1000 -; Production Value: 1000 -; http://php.net/session.gc-divisor -session.gc_divisor = 1000 - -; After this number of seconds, stored data will be seen as 'garbage' and -; cleaned up by the garbage collection process. -; http://php.net/session.gc-maxlifetime -session.gc_maxlifetime = 1440 - -; NOTE: If you are using the subdirectory option for storing session files -; (see session.save_path above), then garbage collection does *not* -; happen automatically. You will need to do your own garbage -; collection through a shell script, cron entry, or some other method. -; For example, the following script would is the equivalent of -; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): -; find /path/to/sessions -cmin +24 -type f | xargs rm - -; PHP 4.2 and less have an undocumented feature/bug that allows you to -; to initialize a session variable in the global scope. -; PHP 4.3 and later will warn you, if this feature is used. -; You can disable the feature and the warning separately. At this time, -; the warning is only displayed, if bug_compat_42 is enabled. This feature -; introduces some serious security problems if not handled correctly. It's -; recommended that you do not use this feature on production servers. But you -; should enable this on development servers and enable the warning as well. If you -; do not enable the feature on development servers, you won't be warned when it's -; used and debugging errors caused by this can be difficult to track down. -; Default Value: On -; Development Value: On -; Production Value: Off -; http://php.net/session.bug-compat-42 -session.bug_compat_42 = Off - -; This setting controls whether or not you are warned by PHP when initializing a -; session value into the global space. session.bug_compat_42 must be enabled before -; these warnings can be issued by PHP. See the directive above for more information. -; Default Value: On -; Development Value: On -; Production Value: Off -; http://php.net/session.bug-compat-warn -session.bug_compat_warn = Off - -; Check HTTP Referer to invalidate externally stored URLs containing ids. -; HTTP_REFERER has to contain this substring for the session to be -; considered as valid. -; http://php.net/session.referer-check -session.referer_check = - -; How many bytes to read from the file. -; http://php.net/session.entropy-length -;session.entropy_length = 32 - -; Specified here to create the session id. -; http://php.net/session.entropy-file -; Defaults to /dev/urandom -; On systems that don't have /dev/urandom but do have /dev/arandom, this will default to /dev/arandom -; If neither are found at compile time, the default is no entropy file. -; On windows, setting the entropy_length setting will activate the -; Windows random source (using the CryptoAPI) -;session.entropy_file = /dev/urandom - -; Set to {nocache,private,public,} to determine HTTP caching aspects -; or leave this empty to avoid sending anti-caching headers. -; http://php.net/session.cache-limiter -session.cache_limiter = nocache - -; Document expires after n minutes. -; http://php.net/session.cache-expire -session.cache_expire = 180 - -; trans sid support is disabled by default. -; Use of trans sid may risk your users security. -; Use this option with caution. -; - User may send URL contains active session ID -; to other person via. email/irc/etc. -; - URL that contains active session ID may be stored -; in publicly accessible computer. -; - User may access your site with the same session ID -; always using URL stored in browser's history or bookmarks. -; http://php.net/session.use-trans-sid -session.use_trans_sid = 0 - -; Select a hash function for use in generating session ids. -; Possible Values -; 0 (MD5 128 bits) -; 1 (SHA-1 160 bits) -; This option may also be set to the name of any hash function supported by -; the hash extension. A list of available hashes is returned by the hash_algos() -; function. -; http://php.net/session.hash-function -session.hash_function = 0 - -; Define how many bits are stored in each character when converting -; the binary hash data to something readable. -; Possible values: -; 4 (4 bits: 0-9, a-f) -; 5 (5 bits: 0-9, a-v) -; 6 (6 bits: 0-9, a-z, A-Z, "-", ",") -; Default Value: 4 -; Development Value: 5 -; Production Value: 5 -; http://php.net/session.hash-bits-per-character -session.hash_bits_per_character = 5 - -; The URL rewriter will look for URLs in a defined set of HTML tags. -; form/fieldset are special; if you include them here, the rewriter will -; add a hidden field with the info which is otherwise appended -; to URLs. If you want XHTML conformity, remove the form entry. -; Note that all valid entries require a "=", even if no value follows. -; Default Value: "a=href,area=href,frame=src,form=,fieldset=" -; Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry" -; Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry" -; http://php.net/url-rewriter.tags -url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" - -; Enable upload progress tracking in $_SESSION -; Default Value: On -; Development Value: On -; Production Value: On -; http://php.net/session.upload-progress.enabled -;session.upload_progress.enabled = On - -; Cleanup the progress information as soon as all POST data has been read -; (i.e. upload completed). -; Default Value: On -; Development Value: On -; Production Value: On -; http://php.net/session.upload-progress.cleanup -;session.upload_progress.cleanup = On - -; A prefix used for the upload progress key in $_SESSION -; Default Value: "upload_progress_" -; Development Value: "upload_progress_" -; Production Value: "upload_progress_" -; http://php.net/session.upload-progress.prefix -;session.upload_progress.prefix = "upload_progress_" - -; The index name (concatenated with the prefix) in $_SESSION -; containing the upload progress information -; Default Value: "PHP_SESSION_UPLOAD_PROGRESS" -; Development Value: "PHP_SESSION_UPLOAD_PROGRESS" -; Production Value: "PHP_SESSION_UPLOAD_PROGRESS" -; http://php.net/session.upload-progress.name -;session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS" - -; How frequently the upload progress should be updated. -; Given either in percentages (per-file), or in bytes -; Default Value: "1%" -; Development Value: "1%" -; Production Value: "1%" -; http://php.net/session.upload-progress.freq -;session.upload_progress.freq = "1%" - -; The minimum delay between updates, in seconds -; Default Value: 1 -; Development Value: 1 -; Production Value: 1 -; http://php.net/session.upload-progress.min-freq -;session.upload_progress.min_freq = "1" - -[MSSQL] -; Allow or prevent persistent links. -mssql.allow_persistent = On - -; Maximum number of persistent links. -1 means no limit. -mssql.max_persistent = -1 - -; Maximum number of links (persistent+non persistent). -1 means no limit. -mssql.max_links = -1 - -; Minimum error severity to display. -mssql.min_error_severity = 10 - -; Minimum message severity to display. -mssql.min_message_severity = 10 - -; Compatibility mode with old versions of PHP 3.0. -mssql.compatibility_mode = Off - -; Connect timeout -;mssql.connect_timeout = 5 - -; Query timeout -;mssql.timeout = 60 - -; Valid range 0 - 2147483647. Default = 4096. -;mssql.textlimit = 4096 - -; Valid range 0 - 2147483647. Default = 4096. -;mssql.textsize = 4096 - -; Limits the number of records in each batch. 0 = all records in one batch. -;mssql.batchsize = 0 - -; Specify how datetime and datetim4 columns are returned -; On => Returns data converted to SQL server settings -; Off => Returns values as YYYY-MM-DD hh:mm:ss -;mssql.datetimeconvert = On - -; Use NT authentication when connecting to the server -mssql.secure_connection = Off - -; Specify max number of processes. -1 = library default -; msdlib defaults to 25 -; FreeTDS defaults to 4096 -;mssql.max_procs = -1 - -; Specify client character set. -; If empty or not set the client charset from freetds.conf is used -; This is only used when compiled with FreeTDS -;mssql.charset = "ISO-8859-1" - -[Assertion] -; Assert(expr); active by default. -; http://php.net/assert.active -;assert.active = On - -; Issue a PHP warning for each failed assertion. -; http://php.net/assert.warning -;assert.warning = On - -; Don't bail out by default. -; http://php.net/assert.bail -;assert.bail = Off - -; User-function to be called if an assertion fails. -; http://php.net/assert.callback -;assert.callback = 0 - -; Eval the expression with current error_reporting(). Set to true if you want -; error_reporting(0) around the eval(). -; http://php.net/assert.quiet-eval -;assert.quiet_eval = 0 - -[COM] -; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs -; http://php.net/com.typelib-file -;com.typelib_file = - -; allow Distributed-COM calls -; http://php.net/com.allow-dcom -;com.allow_dcom = true - -; autoregister constants of a components typlib on com_load() -; http://php.net/com.autoregister-typelib -;com.autoregister_typelib = true - -; register constants casesensitive -; http://php.net/com.autoregister-casesensitive -;com.autoregister_casesensitive = false - -; show warnings on duplicate constant registrations -; http://php.net/com.autoregister-verbose -;com.autoregister_verbose = true - -; The default character set code-page to use when passing strings to and from COM objects. -; Default: system ANSI code page -;com.code_page= - -[mbstring] -; language for internal character representation. -; http://php.net/mbstring.language -;mbstring.language = Japanese - -; internal/script encoding. -; Some encoding cannot work as internal encoding. -; (e.g. SJIS, BIG5, ISO-2022-*) -; http://php.net/mbstring.internal-encoding -;mbstring.internal_encoding = UTF-8 - -; http input encoding. -; http://php.net/mbstring.http-input -;mbstring.http_input = UTF-8 - -; http output encoding. mb_output_handler must be -; registered as output buffer to function -; http://php.net/mbstring.http-output -;mbstring.http_output = pass - -; enable automatic encoding translation according to -; mbstring.internal_encoding setting. Input chars are -; converted to internal encoding by setting this to On. -; Note: Do _not_ use automatic encoding translation for -; portable libs/applications. -; http://php.net/mbstring.encoding-translation -;mbstring.encoding_translation = Off - -; automatic encoding detection order. -; auto means -; http://php.net/mbstring.detect-order -;mbstring.detect_order = auto - -; substitute_character used when character cannot be converted -; one from another -; http://php.net/mbstring.substitute-character -;mbstring.substitute_character = none - -; overload(replace) single byte functions by mbstring functions. -; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(), -; etc. Possible values are 0,1,2,4 or combination of them. -; For example, 7 for overload everything. -; 0: No overload -; 1: Overload mail() function -; 2: Overload str*() functions -; 4: Overload ereg*() functions -; http://php.net/mbstring.func-overload -;mbstring.func_overload = 0 - -; enable strict encoding detection. -;mbstring.strict_detection = On - -; This directive specifies the regex pattern of content types for which mb_output_handler() -; is activated. -; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml) -;mbstring.http_output_conv_mimetype= - -[gd] -; Tell the jpeg decode to ignore warnings and try to create -; a gd image. The warning will then be displayed as notices -; disabled by default -; http://php.net/gd.jpeg-ignore-warning -;gd.jpeg_ignore_warning = 0 - -[exif] -; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS. -; With mbstring support this will automatically be converted into the encoding -; given by corresponding encode setting. When empty mbstring.internal_encoding -; is used. For the decode settings you can distinguish between motorola and -; intel byte order. A decode setting cannot be empty. -; http://php.net/exif.encode-unicode -;exif.encode_unicode = ISO-8859-15 - -; http://php.net/exif.decode-unicode-motorola -;exif.decode_unicode_motorola = UCS-2BE - -; http://php.net/exif.decode-unicode-intel -;exif.decode_unicode_intel = UCS-2LE - -; http://php.net/exif.encode-jis -;exif.encode_jis = - -; http://php.net/exif.decode-jis-motorola -;exif.decode_jis_motorola = JIS - -; http://php.net/exif.decode-jis-intel -;exif.decode_jis_intel = JIS - -[Tidy] -; The path to a default tidy configuration file to use when using tidy -; http://php.net/tidy.default-config -;tidy.default_config = /usr/local/lib/php/default.tcfg - -; Should tidy clean and repair output automatically? -; WARNING: Do not use this option if you are generating non-html content -; such as dynamic images -; http://php.net/tidy.clean-output -tidy.clean_output = Off - -[soap] -; Enables or disables WSDL caching feature. -; http://php.net/soap.wsdl-cache-enabled -soap.wsdl_cache_enabled=1 - -; Sets the directory name where SOAP extension will put cache files. -; http://php.net/soap.wsdl-cache-dir -soap.wsdl_cache_dir="/tmp" - -; (time to live) Sets the number of second while cached file will be used -; instead of original one. -; http://php.net/soap.wsdl-cache-ttl -soap.wsdl_cache_ttl=86400 - -; Sets the size of the cache limit. (Max. number of WSDL files to cache) -soap.wsdl_cache_limit = 5 - -[sysvshm] -; A default size of the shared memory segment -;sysvshm.init_mem = 10000 - -[ldap] -; Sets the maximum number of open links or -1 for unlimited. -ldap.max_links = -1 - -[mcrypt] -; For more information about mcrypt settings see http://php.net/mcrypt-module-open - -; Directory where to load mcrypt algorithms -; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt) -;mcrypt.algorithms_dir= - -; Directory where to load mcrypt modes -; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt) -;mcrypt.modes_dir= - -[dba] -;dba.default_handler= - -[opcache] -; Determines if Zend OPCache is enabled -opcache.enable=1 - -; Determines if Zend OPCache is enabled for the CLI version of PHP -opcache.enable_cli=1 - -; The OPcache shared memory storage size. -opcache.memory_consumption=2048 - -; The amount of memory for interned strings in Mbytes. -opcache.interned_strings_buffer=4 - -; The maximum number of keys (scripts) in the OPcache hash table. -; Only numbers between 200 and 100000 are allowed. -opcache.max_accelerated_files=100000 - -; The maximum percentage of "wasted" memory until a restart is scheduled. -opcache.max_wasted_percentage=5 - -; When this directive is enabled, the OPcache appends the current working -; directory to the script key, thus eliminating possible collisions between -; files with the same name (basename). Disabling the directive improves -; performance, but may break existing applications. -opcache.use_cwd=1 - -; When disabled, you must reset the OPcache manually or restart the -; webserver for changes to the filesystem to take effect. -;opcache.validate_timestamps=1 - -; How often (in seconds) to check file timestamps for changes to the shared -; memory storage allocation. ("1" means validate once per second, but only -; once per request. "0" means always validate) -;opcache.revalidate_freq=2 - -; Enables or disables file search in include_path optimization -;opcache.revalidate_path=0 - -; If disabled, all PHPDoc comments are dropped from the code to reduce the - ;size of the optimized code. -;opcache.save_comments=1 - -; If disabled, PHPDoc comments are not loaded from SHM, so "Doc Comments" -; may be always stored (save_comments=1), but not loaded by applications -; that don't need them anyway. -;opcache.load_comments=1 - -; If enabled, a fast shutdown sequence is used for the accelerated code -;opcache.fast_shutdown=0 - -; Allow file existence override (file_exists, etc.) performance feature. -;opcache.enable_file_override=0 - -; A bitmask, where each bit enables or disables the appropriate OPcache -; passes -;opcache.optimization_level=0xffffffff - -;opcache.inherited_hack=1 -;opcache.dups_fix=0 - -; The location of the OPcache blacklist file (wildcards allowed). -; Each OPcache blacklist file is a text file that holds the names of files -; that should not be accelerated. The file format is to add each filename -; to a new line. The filename may be a full path or just a file prefix -; (i.e., /var/www/x blacklists all the files and directories in /var/www -; that start with 'x'). Line starting with a ; are ignored (comments). -;opcache.blacklist_filename= - -; Allows exclusion of large files from being cached. By default all files -; are cached. -;opcache.max_file_size=0 - -; Check the cache checksum each N requests. -; The default value of "0" means that the checks are disabled. -;opcache.consistency_checks=0 - -; How long to wait (in seconds) for a scheduled restart to begin if the cache -; is not being accessed. -;opcache.force_restart_timeout=180 - -; OPcache error_log file name. Empty string assumes "stderr". -;opcache.error_log= - -; All OPcache errors go to the Web server log. -; By default, only fatal errors (level 0) or errors (level 1) are logged. -; You can also enable warnings (level 2), info messages (level 3) or -; debug messages (level 4). -;opcache.log_verbosity_level=1 - -; Preferred Shared Memory back-end. Leave empty and let the system decide. -;opcache.preferred_memory_model= - -; Protect the shared memory from unexpected writing during script execution. -; Useful for internal debugging only. -;opcache.protect_memory=0 - -[curl] -; A default value for the CURLOPT_CAINFO option. This is required to be an -; absolute path. -;curl.cainfo = - -; Local Variables: -; tab-width: 4 -; End: diff --git a/docker/aws/Dockerfile b/docker/aws/Dockerfile deleted file mode 100644 index 8c16dfe..0000000 --- a/docker/aws/Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -FROM alpine:latest as dist -LABEL maintainer aynic.os - -RUN apk --no-cache add \ - groff \ - less \ - py-pip3 \ - && pip3 install awscli - -RUN apk --no-cache upgrade - -ENTRYPOINT ["/usr/bin/aws"] -CMD ["help"] - -FROM dist as master -ARG DOCKER_BUILD_DIR -ARG UID -ARG USER -ENV UID=${UID} -ENV GID=${UID} -ENV USER=${USER} - -# If we provide a numeric UID -RUN [ "$UID" -eq "$UID" ] 2>/dev/null \ -# Remove user with $UID if it is not our $USER - && if [ "$(getent passwd $UID |awk -F: '{print $1}')" != "$USER" ]; then \ - sed -i '/^'$(getent passwd $UID |awk -F: '{print $1}')':x:'$UID':/d' /etc/passwd; \ - sed -i '/^'$(getent group $GID |awk -F: '{print $1}')':x:'$GID':/d' /etc/group; \ - fi \ -# Force $UID if our $USER already exists - && sed -i 's/^'$USER':x:[0-9]\+:[0-9]\+:/'$USER':x:'$UID':'$GID':/' /etc/passwd \ - && sed -i 's/^'$USER':x:[0-9]\+:/'$USER':x:'$GID':/' /etc/group \ -# Create $USER if it does not exist - && if [ "$(getent passwd $UID)" = "" ]; then \ - echo "$USER:x:$UID:$GID::/home/$USER:$SHELL" >> /etc/passwd; \ - echo "$USER:\!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \ - echo "$USER:x:$GID:" >> /etc/group; \ - fi \ - && mkdir -p /home/$USER \ - && chown $UID:$GID /home/$USER \ - || true - -USER $USER diff --git a/docker/certbot/Dockerfile b/docker/certbot/Dockerfile deleted file mode 100644 index ea9afae..0000000 --- a/docker/certbot/Dockerfile +++ /dev/null @@ -1,62 +0,0 @@ -FROM python:3.11-alpine as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR -ARG CERTBOT_VERSION=1.32.0 - -# RUN pip install \ -RUN apk --no-cache add --virtual .build-deps \ - augeas-dev \ - build-base \ - libffi-dev \ - && pip install \ - acme==$CERTBOT_VERSION \ - certbot==$CERTBOT_VERSION \ -# certbot-apache \ - certbot-dns-azure \ -# certbot-dns-bunny \ - certbot-dns-clouddns \ - certbot-dns-cloudflare \ - certbot-dns-cloudxns \ - certbot-dns-digitalocean \ - certbot-dns-dnsmadeeasy \ - certbot-dns-dnsimple \ -# certbot-dns-gehirn \ - certbot-dns-godaddy \ - certbot-dns-google \ - certbot-dns-infomaniak \ -# certbot-dns-inwx \ - certbot-dns-ispconfig \ - certbot-dns-lightsail \ - certbot-dns-linode \ - certbot-dns-luadns \ - certbot-dns-njalla \ -# certbot-dns-nsone \ - certbot-dns-ovh \ - certbot-dns-rfc2136 \ - certbot-dns-route53 \ -# certbot-dns-sakuracloud \ - certbot-dns-standalone \ - certbot-dns-yandexcloud \ -# certbot-ext-auth future \ - certbot-nginx \ - certbot-plugin-gandi \ - certbot-s3front \ - certbot_dns_duckdns \ - certbot_dns_porkbun \ -# letsencrypt-pritunl \ -# letsencrypt-proxmox \ - && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | xargs -r apk info --installed \ - | sort -u \ - )" \ - && apk del .build-deps \ - && apk add --no-cache --virtual .run-deps $runDeps - -COPY ${DOCKER_BUILD_DIR}/certbot-renew /etc/periodic/daily/ -COPY ${DOCKER_BUILD_DIR}/docker-entrypoint.sh /docker-entrypoint.sh -ENTRYPOINT ["/docker-entrypoint.sh"] -CMD ["--help"] - -FROM dist as master diff --git a/docker/certbot/certbot-renew b/docker/certbot/certbot-renew deleted file mode 100755 index 1b1c550..0000000 --- a/docker/certbot/certbot-renew +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -mkdir -p /etc/letsencrypt/renewal -/usr/local/bin/certbot renew > /etc/letsencrypt/renewal/letsencrypt.log diff --git a/docker/certbot/docker-entrypoint.sh b/docker/certbot/docker-entrypoint.sh deleted file mode 100755 index 4b07039..0000000 --- a/docker/certbot/docker-entrypoint.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env sh -set -euo errexit - -[ -n "${DEBUG:-}" -a "${DEBUG:-}" != "false" ] && set -x - -case "${1:-start}" in - - start) - exec /usr/sbin/crond -f -L/dev/stdout - ;; - - *) - exec /usr/local/bin/certbot "$@" - ;; - -esac diff --git a/docker/compose/Dockerfile b/docker/compose/Dockerfile deleted file mode 100644 index 99e3b4b..0000000 --- a/docker/compose/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM alpine:latest as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR - -ARG COMPOSE_REMOTE=https://github.com/docker/compose -ARG COMPOSE_VERSION=2.5.0 -ARG DOCKER_MACHINE=x86_64 -ARG DOCKER_SYSTEM=Linux - -RUN apk update \ - && apk add --no-cache ca-certificates \ - && OS="$(echo ${DOCKER_SYSTEM} |awk '{print tolower($0)}')" \ - && ARCH="$(echo ${DOCKER_MACHINE} |awk '{print /armv7l/ ? "armv7" : $0}')" \ - && wget -qO /usr/bin/docker-compose ${COMPOSE_REMOTE}/releases/download/v${COMPOSE_VERSION}/docker-compose-${OS}-${ARCH} \ - && chmod +x /usr/bin/docker-compose - -ENTRYPOINT ["/usr/bin/docker-compose"] - -FROM dist as master -ARG DOCKER_BUILD_DIR diff --git a/docker/consul/Dockerfile b/docker/consul/Dockerfile deleted file mode 100644 index 71310f6..0000000 --- a/docker/consul/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -ARG CONSUL_VERSION=1.11.1 -FROM consul:${CONSUL_VERSION} as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR -ARG DOCKER_GID=999 - -# add user consul in group docker -RUN DOCKER_GROUP=$(awk -F: '$3 == '${DOCKER_GID}' {print $1}' < /etc/group) \ - && if [ -n "${DOCKER_GROUP}" ]; then adduser consul ${DOCKER_GROUP}; \ - else addgroup -g ${DOCKER_GID} docker && adduser consul docker; \ - fi - -COPY ${DOCKER_BUILD_DIR}/docker-healthcheck /usr/local/bin/ -RUN chmod +rx /usr/local/bin/docker-healthcheck - -HEALTHCHECK CMD ((((echo -e 'GET /v1/health/service/consul HTTP/1.0\n' \ - |nc -w 1 localhost:8500; echo $? >&3) \ - |sed -n '/^\[/,$p' \ - |jq '.[].Checks[0].Output' >&4) 3>&1) \ - | (read err; exit $err)) 4>&1 - -FROM dist as master -ARG DOCKER_BUILD_DIR diff --git a/docker/consul/docker-healthcheck b/docker/consul/docker-healthcheck deleted file mode 100755 index 892f5bf..0000000 --- a/docker/consul/docker-healthcheck +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -# link: https://github.com/hashicorp/consul/issues/3182 -# author: Yann "aya" Autissier -# license: GPL -set -eu - -DOCKER_SOCK=${DOCKER_SOCK:-/var/run/docker.sock} - -if ! which curl > /dev/null || ! which jq >/dev/null; then - >&2 echo "ERROR: curl or jq not found" - exit 2 -fi - -if [ $# -ne 1 ]; then - >&2 echo "ERROR: invalid parameter '$*'" - echo "USAGE: $0 container-id|container-name|container-ip" - exit 2 -fi - -{ - { - { - # list all dockers - for docker in $(curl --disable --fail --show-error --silent --unix-socket "${DOCKER_SOCK}" http://localhost/containers/json |jq -r '.[].Id'); do - # print "health_status id name ip_address health_output" for each docker - curl --disable --fail --show-error --silent --unix-socket "${DOCKER_SOCK}" "http://localhost/containers/${docker}/json" \ - |jq -r '[.State.Health.Status, .Id, .Name, .NetworkSettings.Networks[].IPAddress, .State.Health.Log[0].Output] |@tsv' - # shorten id: .Id |capture("(?.{12})").id - # print "health_status" and "health_output" for line matching $1 - done |awk -F '\t' '/\<'"$1"'\>/ {print $1 | "cat >&3; exec 3>&-"; print $NF | "cat >&4";}' - } 3>&1 - } | { - read -r status ||: - case "$status" in - healthy) exit=0;; - starting) exit=1;; - *) exit=2;; - esac - # exit according to "health_status" - exit $exit - } -# print "health_output" -} 4>&1 diff --git a/docker/elastic/apm-server-oss/Dockerfile b/docker/elastic/apm-server-oss/Dockerfile deleted file mode 100644 index 59ab5ee..0000000 --- a/docker/elastic/apm-server-oss/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM docker.elastic.co/apm/apm-server-oss:7.4.2 as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR - -# config -COPY ${DOCKER_BUILD_DIR}/apm-server.yml /usr/share/apm-server/ - -FROM dist as master -ARG DOCKER_BUILD_DIR diff --git a/docker/elastic/apm-server-oss/apm-server.docker.yml b/docker/elastic/apm-server-oss/apm-server.docker.yml deleted file mode 100644 index 3bb99b6..0000000 --- a/docker/elastic/apm-server-oss/apm-server.docker.yml +++ /dev/null @@ -1,931 +0,0 @@ -######################### APM Server Configuration ######################### - -################################ APM Server ################################ - -apm-server: - # Defines the host and port the server is listening on. Use "unix:/path/to.sock" to listen on a unix domain socket. - host: "0.0.0.0:8200" - - # Maximum permitted size in bytes of a request's header accepted by the server to be processed. - #max_header_size: 1048576 - - # Maximum amount of time to wait for the next incoming request before underlying connection is closed. - #idle_timeout: 45s - - # Maximum permitted duration for reading an entire request. - #read_timeout: 30s - - # Maximum permitted duration for writing a response. - #write_timeout: 30s - - # Maximum duration before releasing resources when shutting down the server. - #shutdown_timeout: 5s - - # Maximum permitted size in bytes of an event accepted by the server to be processed. - #max_event_size: 307200 - - # Maximum number of new connections to accept simultaneously (0 means unlimited). - #max_connections: 0 - - # Authorization token for sending data to the APM server. If a token is set, the - # agents must send it in the following format: Authorization: Bearer . - # It is recommended to use an authorization token in combination with SSL enabled, - # and save the token in the apm-server keystore. The token is not used for the RUM endpoint. - #secret_token: - - # Enable secure communication between APM agents and the server. By default ssl is disabled. - #ssl: - #enabled: false - - # Configure a list of root certificate authorities for verifying client certificates. - #certificate_authorities: [] - - # Path to file containing the certificate for server authentication. - # Needs to be configured when ssl is enabled. - #certificate: '' - - # Path to file containing server certificate key. - # Needs to be configured when ssl is enabled. - #key: '' - - # Optional configuration options for ssl communication. - - # Passphrase for decrypting the Certificate Key. - # It is recommended to use the provided keystore instead of entering the passphrase in plain text. - #key_passphrase: '' - - # List of supported/valid protocol versions. By default TLS versions 1.1 up to 1.2 are enabled. - #supported_protocols: [TLSv1.1, TLSv1.2] - - # Configure cipher suites to be used for SSL connections. - #cipher_suites: [] - - # Configure curve types for ECDHE based cipher suites. - #curve_types: [] - - # Configure which type of client authentication is supported. - # Options are `none`, `optional`, and `required`. Default is `optional`. - #client_authentication: "optional" - - # Configure SSL verification mode. If `none` is configured, all hosts and - # certificates will be accepted. In this mode, SSL-based connections are - # susceptible to man-in-the-middle attacks. Use only for testing. Default is `full`. - #ssl.verification_mode: full - - # Enable Real User Monitoring (RUM) Support. By default RUM is disabled. - #rum: - #enabled: false - - #event_rate: - - # Defines the maximum amount of events allowed to be sent to the APM Server RUM - # endpoint per IP per second. Defaults to 300. - #limit: 300 - - # An LRU cache is used to keep a rate limit per IP for the most recently seen IPs. - # This setting defines the number of unique IPs that can be tracked in the cache. - # Sites with many concurrent clients should consider increasing this limit. Defaults to 1000. - #lru_size: 1000 - - #-- General RUM settings - - # Comma separated list of permitted origins for real user monitoring. - # User-agents will send an origin header that will be validated against this list. - # An origin is made of a protocol scheme, host and port, without the url path. - # Allowed origins in this setting can have * to match anything (eg.: http://*.example.com) - # If an item in the list is a single '*', everything will be allowed. - #allow_origins : ['*'] - - # Regexp to be matched against a stacktrace frame's `file_name` and `abs_path` attributes. - # If the regexp matches, the stacktrace frame is considered to be a library frame. - #library_pattern: "node_modules|bower_components|~" - - # Regexp to be matched against a stacktrace frame's `file_name`. - # If the regexp matches, the stacktrace frame is not used for calculating error groups. - # The default pattern excludes stacktrace frames that have a filename starting with '/webpack' - #exclude_from_grouping: "^/webpack" - - # If a source map has previously been uploaded, source mapping is automatically applied. - # to all error and transaction documents sent to the RUM endpoint. - #source_mapping: - - # Sourcemapping is enabled by default. - #enabled: true - - # Source maps are always fetched from Elasticsearch, by default using the output.elasticsearch configuration. - # A different instance must be configured when using any other output. - # This setting only affects sourcemap reads - the output determines where sourcemaps are written. - #elasticsearch: - # Array of hosts to connect to. - # Scheme and port can be left out and will be set to the default (`http` and `9200`). - # In case you specify and additional path, the scheme is required: `http://localhost:9200/path`. - # IPv6 addresses should always be defined as: `https://[2001:db8::1]:9200`. - # hosts: ["localhost:9200"] - - # Optional protocol and basic auth credentials. - #protocol: "https" - #username: "elastic" - #password: "changeme" - - # The `cache.expiration` determines how long a source map should be cached before fetching it again from Elasticsearch. - # Note that values configured without a time unit will be interpreted as seconds. - #cache: - #expiration: 5m - - # Source maps are stored in a separate index. - # If the default index pattern for source maps at 'outputs.elasticsearch.indices' - # is changed, a matching index pattern needs to be specified here. - #index_pattern: "apm-*-sourcemap*" - - - # If true (default), APM Server captures the IP of the instrumented service - # or the IP and User Agent of the real user (RUM requests). - #capture_personal_data: true - - # Enable APM Server Golang expvar support (https://golang.org/pkg/expvar/). - #expvar: - #enabled: false - - # Url to expose expvar. - #url: "/debug/vars" - - # Instrumentation support for the server's HTTP endpoints and event publisher. - #instrumentation: - # Set to true to enable instrumentation of the APM Server itself. - #enabled: false - - # Environment in which the APM Server is running on (eg: staging, production, etc.) - #environment: "" - - # Remote hosts to report instrumentation results to. - #hosts: - # - http://remote-apm-server:8200 - - # secret_token for the remote apm-servers. - #secret_token: - - # A pipeline is a definition of processors applied to documents when ingesting them to Elasticsearch. - # Using pipelines involves two steps: - # (1) registering a pipeline - # (2) applying a pipeline during data ingestion (see `output.elasticsearch.pipeline`) - # - # You can manually register a pipeline, or use this configuration option to ensure - # the pipeline is loaded and registered at the configured Elasticsearch instances. - # Find the default pipeline configuration at `ingest/pipeline/definition.json`. - # Automatic pipeline registration requires the `output.elasticsearch` to be enabled and configured. - #register.ingest.pipeline: - # Registers APM pipeline definition in Elasticsearch on APM Server startup. Defaults to true. - #enabled: true - # Overwrites existing APM pipeline definition in Elasticsearch. Defaults to false. - #overwrite: false - - # When ilm is set to `auto`, the APM Server checks a couple of preconditions: - # If a different output than Elasticsearch is configured, ILM will be disabled. - # If Elasticsearch output is configured, but specific `index` or `indices` settings are configured, ILM will be - # disabled, as it only works with default index settings. - # If the configured Elasticsearch instance is not eligible for ILM, ILM will also be disabled. - # If all preconditions are met, ILM will be enabled. - # - # When ILM is set to `true`, the APM Server ignores any configured index settings. - # For ILM to be applied, The configured output must be set to Elasticsearch and the instance - # needs to support ILM. Otherwise APM Server falls back to ordinary index management without ILM. - # - # Defaults to "auto". Disable ILM by setting it to `false`. - #ilm.enabled: "auto" - - # When using APM agent configuration, information fetched from Kibana will be cached in memory for some time. - # Specify cache key expiration via this setting. Default is 30 seconds. - #agent.config.cache.expiration: 30s - - #kibana: - # For APM Agent configuration in Kibana, enabled must be true. - #enabled: false - - # Scheme and port can be left out and will be set to the default (`http` and `5601`). - # In case you specify an additional path, the scheme is required: `http://localhost:5601/path`. - # IPv6 addresses should always be defined as: `https://[2001:db8::1]:5601`. - #host: "localhost:5601" - - # Optional protocol and basic auth credentials. - #protocol: "https" - #username: "elastic" - #password: "changeme" - - # Optional HTTP path. - #path: "" - - # Enable custom SSL settings. Set to false to ignore custom SSL settings for secure communication. - #ssl.enabled: true - - # Optional SSL configuration options. SSL is off by default, change the `protocol` option if you want to enable `https`. - # Configure SSL verification mode. If `none` is configured, all server hosts - # and certificates will be accepted. In this mode, SSL based connections are - # susceptible to man-in-the-middle attacks. Use only for testing. Default is - # `full`. - #ssl.verification_mode: full - - # List of supported/valid TLS versions. By default all TLS versions 1.0 up to - # 1.2 are enabled. - #ssl.supported_protocols: [TLSv1.0, TLSv1.1, TLSv1.2] - - # List of root certificates for HTTPS server verifications. - #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"] - - # Certificate for SSL client authentication. - #ssl.certificate: "/etc/pki/client/cert.pem" - - # Client Certificate Key - #ssl.key: "/etc/pki/client/cert.key" - - # Optional passphrase for decrypting the Certificate Key. - # It is recommended to use the provided keystore instead of entering the passphrase in plain text. - #ssl.key_passphrase: '' - - # Configure cipher suites to be used for SSL connections. - #ssl.cipher_suites: [] - - # Configure curve types for ECDHE based cipher suites. - #ssl.curve_types: [] - -#================================= General ================================= - -# Data is buffered in a memory queue before it is published to the configured output. -# The memory queue will present all available events (up to the outputs -# bulk_max_size) to the output, the moment the output is ready to serve -# another batch of events. -#queue: - # Queue type by name (default 'mem'). - #mem: - # Max number of events the queue can buffer. - #events: 4096 - - # Hints the minimum number of events stored in the queue, - # before providing a batch of events to the outputs. - # The default value is set to 2048. - # A value of 0 ensures events are immediately available - # to be sent to the outputs. - #flush.min_events: 2048 - - # Maximum duration after which events are available to the outputs, - # if the number of events stored in the queue is < `flush.min_events`. - #flush.timeout: 1s - -# Sets the maximum number of CPUs that can be executing simultaneously. The -# default is the number of logical CPUs available in the system. -#max_procs: - -#================================= Template ================================= - -# A template is used to set the mapping in Elasticsearch. -# By default template loading is enabled and the template is loaded. -# These settings can be adjusted to load your own template or overwrite existing ones. - -# Set to false to disable template loading. -#setup.template.enabled: true - -# Template name. By default the template name is "apm-%{[observer.version]}" -# The template name and pattern has to be set in case the elasticsearch index pattern is modified. -#setup.template.name: "apm-%{[observer.version]}" - -# Template pattern. By default the template pattern is "apm-%{[observer.version]}-*" to apply to the default index settings. -# The first part is the version of apm-server and then -* is used to match all daily indices. -# The template name and pattern has to be set in case the elasticsearch index pattern is modified. -#setup.template.pattern: "apm-%{[observer.version]}-*" - -# Path to fields.yml file to generate the template. -#setup.template.fields: "${path.config}/fields.yml" - -# Overwrite existing template. -#setup.template.overwrite: false - -# Elasticsearch template settings. -#setup.template.settings: - - # A dictionary of settings to place into the settings.index dictionary - # of the Elasticsearch template. For more details, please check - # https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html - #index: - #number_of_shards: 1 - #codec: best_compression - #number_of_routing_shards: 30 - #mapping.total_fields.limit: 2000 - -#============================= Elastic Cloud ============================= - -# These settings simplify using APM Server with the Elastic Cloud (https://cloud.elastic.co/). - -# The cloud.id setting overwrites the `output.elasticsearch.hosts` option. -# You can find the `cloud.id` in the Elastic Cloud web UI. -#cloud.id: - -# The cloud.auth setting overwrites the `output.elasticsearch.username` and -# `output.elasticsearch.password` settings. The format is `:`. -#cloud.auth: - -#================================ Outputs ================================= - -# Configure the output to use when sending the data collected by apm-server. - -#-------------------------- Elasticsearch output -------------------------- -output.elasticsearch: - # Array of hosts to connect to. - # Scheme and port can be left out and will be set to the default (`http` and `9200`). - # In case you specify and additional path, the scheme is required: `http://localhost:9200/path`. - # IPv6 addresses should always be defined as: `https://[2001:db8::1]:9200`. - hosts: ["elasticsearch:9200"] - - # Boolean flag to enable or disable the output module. - #enabled: true - - # Set gzip compression level. - #compression_level: 0 - - # Optional protocol and basic auth credentials. - #protocol: "https" - #username: "elastic" - #password: "changeme" - - # Dictionary of HTTP parameters to pass within the url with index operations. - #parameters: - #param1: value1 - #param2: value2 - - # Number of workers per Elasticsearch host. - #worker: 1 - - # By using the configuration below, APM documents are stored to separate indices, - # depending on their `processor.event`: - # - error - # - transaction - # - span - # - sourcemap - # - # The indices are all prefixed with `apm-%{[observer.version]}`. - # To allow managing indices based on their age, all indices (except for sourcemaps) - # end with the information of the day they got indexed. - # e.g. "apm-7.3.0-transaction-2019.07.20" - # - # Be aware that you can only specify one Elasticsearch template. - # If you modify the index patterns you must also update these configurations accordingly, - # as they need to be aligned: - # * `setup.template.name` - # * `setup.template.pattern` - #index: "apm-%{[observer.version]}-%{+yyyy.MM.dd}" - #indices: - # - index: "apm-%{[observer.version]}-sourcemap" - # when.contains: - # processor.event: "sourcemap" - # - # - index: "apm-%{[observer.version]}-error-%{+yyyy.MM.dd}" - # when.contains: - # processor.event: "error" - # - # - index: "apm-%{[observer.version]}-transaction-%{+yyyy.MM.dd}" - # when.contains: - # processor.event: "transaction" - # - # - index: "apm-%{[observer.version]}-span-%{+yyyy.MM.dd}" - # when.contains: - # processor.event: "span" - # - # - index: "apm-%{[observer.version]}-metric-%{+yyyy.MM.dd}" - # when.contains: - # processor.event: "metric" - # - # - index: "apm-%{[observer.version]}-onboarding-%{+yyyy.MM.dd}" - # when.contains: - # processor.event: "onboarding" - - # A pipeline is a definition of processors applied to documents when ingesting them to Elasticsearch. - # APM Server comes with a default pipeline definition, located at `ingest/pipeline/definition.json`, which is - # loaded to Elasticsearch by default (see `apm-server.register.ingest.pipeline`). - # APM pipeline is enabled by default. To disable it, set `pipeline: _none`. - #pipeline: "apm" - - # Optional HTTP Path. - #path: "/elasticsearch" - - # Custom HTTP headers to add to each request. - #headers: - # X-My-Header: Contents of the header - - # Proxy server url. - #proxy_url: http://proxy:3128 - - # The number of times a particular Elasticsearch index operation is attempted. If - # the indexing operation doesn't succeed after this many retries, the events are - # dropped. The default is 3. - #max_retries: 3 - - # The maximum number of events to bulk in a single Elasticsearch bulk API index request. - # The default is 50. - #bulk_max_size: 50 - - # The number of seconds to wait before trying to reconnect to Elasticsearch - # after a network error. After waiting backoff.init seconds, apm-server - # tries to reconnect. If the attempt fails, the backoff timer is increased - # exponentially up to backoff.max. After a successful connection, the backoff - # timer is reset. The default is 1s. - #backoff.init: 1s - - # The maximum number of seconds to wait before attempting to connect to - # Elasticsearch after a network error. The default is 60s. - #backoff.max: 60s - - # Configure http request timeout before failing an request to Elasticsearch. - #timeout: 90 - - # Enable custom SSL settings. Set to false to ignore custom SSL settings for secure communication. - #ssl.enabled: true - - # Optional SSL configuration options. SSL is off by default, change the `protocol` option if you want to enable `https`. - # Configure SSL verification mode. If `none` is configured, all server hosts - # and certificates will be accepted. In this mode, SSL based connections are - # susceptible to man-in-the-middle attacks. Use only for testing. Default is - # `full`. - #ssl.verification_mode: full - - # List of supported/valid TLS versions. By default all TLS versions 1.0 up to - # 1.2 are enabled. - #ssl.supported_protocols: [TLSv1.0, TLSv1.1, TLSv1.2] - - # List of root certificates for HTTPS server verifications. - #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"] - - # Certificate for SSL client authentication. - #ssl.certificate: "/etc/pki/client/cert.pem" - - # Client Certificate Key - #ssl.key: "/etc/pki/client/cert.key" - - # Optional passphrase for decrypting the Certificate Key. - # It is recommended to use the provided keystore instead of entering the passphrase in plain text. - #ssl.key_passphrase: '' - - # Configure cipher suites to be used for SSL connections. - #ssl.cipher_suites: [] - - # Configure curve types for ECDHE based cipher suites. - #ssl.curve_types: [] - - # Configure what types of renegotiation are supported. Valid options are - # never, once, and freely. Default is never. - #ssl.renegotiation: never - -#----------------------------- Console output ----------------------------- -#output.console: - # Boolean flag to enable or disable the output module. - #enabled: false - - # Configure JSON encoding. - #codec.json: - # Pretty-print JSON event. - #pretty: false - - # Configure escaping HTML symbols in strings. - #escape_html: false - -#---------------------------- Logstash output ----------------------------- -#output.logstash: - # Boolean flag to enable or disable the output module. - #enabled: false - - # The Logstash hosts. - #hosts: ["localhost:5044"] - - # Number of workers per Logstash host. - #worker: 1 - - # Set gzip compression level. - #compression_level: 3 - - # Configure escaping html symbols in strings. - #escape_html: true - - # Optional maximum time to live for a connection to Logstash, after which the - # connection will be re-established. A value of `0s` (the default) will - # disable this feature. - # - # Not yet supported for async connections (i.e. with the "pipelining" option set). - #ttl: 30s - - # Optional load balance the events between the Logstash hosts. Default is false. - #loadbalance: false - - # Number of batches to be sent asynchronously to Logstash while processing - # new batches. - #pipelining: 2 - - # If enabled only a subset of events in a batch of events is transferred per - # group. The number of events to be sent increases up to `bulk_max_size` - # if no error is encountered. - #slow_start: false - - # The number of seconds to wait before trying to reconnect to Logstash - # after a network error. After waiting backoff.init seconds, apm-server - # tries to reconnect. If the attempt fails, the backoff timer is increased - # exponentially up to backoff.max. After a successful connection, the backoff - # timer is reset. The default is 1s. - #backoff.init: 1s - - # The maximum number of seconds to wait before attempting to connect to - # Logstash after a network error. The default is 60s. - #backoff.max: 60s - - # Optional index name. The default index name is set to apm - # in all lowercase. - #index: 'apm' - - # SOCKS5 proxy server URL - #proxy_url: socks5://user:password@socks5-server:2233 - - # Resolve names locally when using a proxy server. Defaults to false. - #proxy_use_local_resolver: false - - # Enable SSL support. SSL is automatically enabled if any SSL setting is set. - #ssl.enabled: false - - # Optional SSL configuration options. SSL is off by default. - # Configure SSL verification mode. If `none` is configured, all server hosts - # and certificates will be accepted. In this mode, SSL based connections are - # susceptible to man-in-the-middle attacks. Use only for testing. Default is - # `full`. - #ssl.verification_mode: full - - # List of supported/valid TLS versions. By default all TLS versions 1.0 up to - # 1.2 are enabled. - #ssl.supported_protocols: [TLSv1.0, TLSv1.1, TLSv1.2] - - # List of root certificates for HTTPS server verifications. - #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"] - - # Certificate for SSL client authentication. - #ssl.certificate: "/etc/pki/client/cert.pem" - - # Client Certificate Key - #ssl.key: "/etc/pki/client/cert.key" - - # Optional passphrase for decrypting the Certificate Key. - # It is recommended to use the provided keystore instead of entering the passphrase in plain text. - #ssl.key_passphrase: '' - - # Configure cipher suites to be used for SSL connections. - #ssl.cipher_suites: [] - - # Configure curve types for ECDHE based cipher suites. - #ssl.curve_types: [] - - # Configure what types of renegotiation are supported. Valid options are - # never, once, and freely. Default is never. - #ssl.renegotiation: never - -#------------------------------ Kafka output ------------------------------ -#output.kafka: - # Boolean flag to enable or disable the output module. - #enabled: false - - # The list of Kafka broker addresses from where to fetch the cluster metadata. - # The cluster metadata contain the actual Kafka brokers events are published - # to. - #hosts: ["localhost:9092"] - - # The Kafka topic used for produced events. The setting can be a format string - # using any event field. To set the topic from document type use `%{[type]}`. - #topic: beats - - # The Kafka event key setting. Use format string to create unique event key. - # By default no event key will be generated. - #key: '' - - # The Kafka event partitioning strategy. Default hashing strategy is `hash` - # using the `output.kafka.key` setting or randomly distributes events if - # `output.kafka.key` is not configured. - #partition.hash: - # If enabled, events will only be published to partitions with reachable - # leaders. Default is false. - #reachable_only: false - - # Configure alternative event field names used to compute the hash value. - # If empty `output.kafka.key` setting will be used. - # Default value is empty list. - #hash: [] - - # Authentication details. Password is required if username is set. - #username: '' - #password: '' - - # Kafka version libbeat is assumed to run against. Defaults to the "1.0.0". - #version: '1.0.0' - - # Configure JSON encoding. - #codec.json: - # Pretty print json event - #pretty: false - - # Configure escaping html symbols in strings. - #escape_html: true - - # Metadata update configuration. Metadata do contain leader information - # deciding which broker to use when publishing. - #metadata: - # Max metadata request retry attempts when cluster is in middle of leader - # election. Defaults to 3 retries. - #retry.max: 3 - - # Waiting time between retries during leader elections. Default is 250ms. - #retry.backoff: 250ms - - # Refresh metadata interval. Defaults to every 10 minutes. - #refresh_frequency: 10m - - # The number of concurrent load-balanced Kafka output workers. - #worker: 1 - - # The number of times to retry publishing an event after a publishing failure. - # After the specified number of retries, the events are typically dropped. - # Set max_retries to a value less than 0 to retry - # until all events are published. The default is 3. - #max_retries: 3 - - # The maximum number of events to bulk in a single Kafka request. The default - # is 2048. - #bulk_max_size: 2048 - - # The number of seconds to wait for responses from the Kafka brokers before - # timing out. The default is 30s. - #timeout: 30s - - # The maximum duration a broker will wait for number of required ACKs. The - # default is 10s. - #broker_timeout: 10s - - # The number of messages buffered for each Kafka broker. The default is 256. - #channel_buffer_size: 256 - - # The keep-alive period for an active network connection. If 0s, keep-alives - # are disabled. The default is 0 seconds. - #keep_alive: 0 - - # Sets the output compression codec. Must be one of none, snappy and gzip. The - # default is gzip. - #compression: gzip - - # Set the compression level. Currently only gzip provides a compression level - # between 0 and 9. The default value is chosen by the compression algorithm. - #compression_level: 4 - - # The maximum permitted size of JSON-encoded messages. Bigger messages will be - # dropped. The default value is 1000000 (bytes). This value should be equal to - # or less than the broker's message.max.bytes. - #max_message_bytes: 1000000 - - # The ACK reliability level required from broker. 0=no response, 1=wait for - # local commit, -1=wait for all replicas to commit. The default is 1. Note: - # If set to 0, no ACKs are returned by Kafka. Messages might be lost silently - # on error. - #required_acks: 1 - - # The configurable ClientID used for logging, debugging, and auditing - # purposes. The default is "beats". - #client_id: beats - - # Enable SSL support. SSL is automatically enabled if any SSL setting is set. - #ssl.enabled: false - - # Optional SSL configuration options. SSL is off by default. - # Configure SSL verification mode. If `none` is configured, all server hosts - # and certificates will be accepted. In this mode, SSL based connections are - # susceptible to man-in-the-middle attacks. Use only for testing. Default is - # `full`. - #ssl.verification_mode: full - - # List of supported/valid TLS versions. By default all TLS versions 1.0 up to - # 1.2 are enabled. - #ssl.supported_protocols: [TLSv1.0, TLSv1.1, TLSv1.2] - - # List of root certificates for HTTPS server verifications. - #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"] - - # Certificate for SSL client authentication. - #ssl.certificate: "/etc/pki/client/cert.pem" - - # Client Certificate Key - #ssl.key: "/etc/pki/client/cert.key" - - # Optional passphrase for decrypting the Certificate Key. - # It is recommended to use the provided keystore instead of entering the passphrase in plain text. - #ssl.key_passphrase: '' - - # Configure cipher suites to be used for SSL connections. - #ssl.cipher_suites: [] - - # Configure curve types for ECDHE based cipher suites. - #ssl.curve_types: [] - - # Configure what types of renegotiation are supported. Valid options are - # never, once, and freely. Default is never. - #ssl.renegotiation: never - -#================================= Paths ================================== - -# The home path for the apm-server installation. This is the default base path -# for all other path settings and for miscellaneous files that come with the -# distribution. -# If not set by a CLI flag or in the configuration file, the default for the -# home path is the location of the binary. -#path.home: - -# The configuration path for the apm-server installation. This is the default -# base path for configuration files, including the main YAML configuration file -# and the Elasticsearch template file. If not set by a CLI flag or in the -# configuration file, the default for the configuration path is the home path. -#path.config: ${path.home} - -# The data path for the apm-server installation. This is the default base path -# for all the files in which apm-server needs to store its data. If not set by a -# CLI flag or in the configuration file, the default for the data path is a data -# subdirectory inside the home path. -#path.data: ${path.home}/data - -# The logs path for an apm-server installation. If not set by a CLI flag or in the -# configuration file, the default is a logs subdirectory inside the home path. -#path.logs: ${path.home}/logs - -#================================= Logging ================================= - -# There are three options for the log output: syslog, file, and stderr. -# Windows systems default to file output. All other systems default to syslog. - -# Sets the minimum log level. The default log level is info. -# Available log levels are: error, warning, info, or debug. -#logging.level: info - -# Enable debug output for selected components. To enable all selectors use ["*"]. -# Other available selectors are "beat", "publish", or "service". -# Multiple selectors can be chained. -#logging.selectors: [ ] - -# Send all logging output to syslog. The default is false. -#logging.to_syslog: true - -# If enabled, apm-server periodically logs its internal metrics that have changed -# in the last period. For each metric that changed, the delta from the value at -# the beginning of the period is logged. Also, the total values for -# all non-zero internal metrics are logged on shutdown. The default is false. -#logging.metrics.enabled: false - -# The period after which to log the internal metrics. The default is 30s. -#logging.metrics.period: 30s - -# Logging to rotating files. When true, writes all logging output to files. -# The log files are automatically rotated when the log file size limit is reached. -#logging.to_files: true -#logging.files: - # Configure the path where the logs are written. The default is the logs directory - # under the home path (the binary location). - #path: /var/log/apm-server - - # The name of the files where the logs are written to. - #name: apm-server - - # Configure log file size limit. If limit is reached, log file will be - # automatically rotated. - #rotateeverybytes: 10485760 # = 10MB - - # Number of rotated log files to keep. Oldest files will be deleted first. - #keepfiles: 7 - - # The permissions mask to apply when rotating log files. The default value is 0600. - # Must be a valid Unix-style file permissions mask expressed in octal notation. - #permissions: 0600 - - # Enable log file rotation on time intervals in addition to size-based rotation. - # Intervals must be at least 1s. Values of 1m, 1h, 24h, 7*24h, 30*24h, and 365*24h - # are boundary-aligned with minutes, hours, days, weeks, months, and years as - # reported by the local system clock. All other intervals are calculated from the - # Unix epoch. Defaults to disabled. - #interval: 0 - -# Set to true to log messages in json format. -#logging.json: false - -#=============================== HTTP Endpoint =============================== - -# apm-server can expose internal metrics through a HTTP endpoint. For security -# reasons the endpoint is disabled by default. This feature is currently experimental. -# Stats can be access through http://localhost:5066/stats. For pretty JSON output -# append ?pretty to the URL. - -# Defines if the HTTP endpoint is enabled. -#http.enabled: false - -# The HTTP endpoint will bind to this hostname or IP address. It is recommended to use only localhost. -#http.host: localhost - -# Port on which the HTTP endpoint will bind. Default is 5066. -#http.port: 5066 - -#============================= X-pack Monitoring ============================= - -# APM server can export internal metrics to a central Elasticsearch monitoring -# cluster. This requires x-pack monitoring to be enabled in Elasticsearch. The -# reporting is disabled by default. - -# Set to true to enable the monitoring reporter. -#monitoring.enabled: false - -# Most settings from the Elasticsearch output are accepted here as well. -# Note that these settings should be configured to point to your Elasticsearch *monitoring* cluster. -# Any setting that is not set is automatically inherited from the Elasticsearch -# output configuration. This means that if you have the Elasticsearch output configured, -# you can simply uncomment the following line. -#monitoring.elasticsearch: - - # Optional protocol and basic auth credentials. - #protocol: "https" - #username: "apm_system" - #password: "" - - # Array of hosts to connect to. - # Scheme and port can be left out and will be set to the default (`http` and `9200`). - # In case you specify and additional path, the scheme is required: `http://localhost:9200/path`. - # IPv6 addresses should always be defined as: `https://[2001:db8::1]:9200`. - #hosts: ["localhost:9200"] - - # Set gzip compression level. - #compression_level: 0 - - # Dictionary of HTTP parameters to pass within the URL with index operations. - #parameters: - #param1: value1 - #param2: value2 - - # Custom HTTP headers to add to each request. - #headers: - # X-My-Header: Contents of the header - - # Proxy server url. - #proxy_url: http://proxy:3128 - - # The number of times a particular Elasticsearch index operation is attempted. If - # the indexing operation doesn't succeed after this many retries, the events are - # dropped. The default is 3. - #max_retries: 3 - - # The maximum number of events to bulk in a single Elasticsearch bulk API index request. - # The default is 50. - #bulk_max_size: 50 - - # The number of seconds to wait before trying to reconnect to Elasticsearch - # after a network error. After waiting backoff.init seconds, apm-server - # tries to reconnect. If the attempt fails, the backoff timer is increased - # exponentially up to backoff.max. After a successful connection, the backoff - # timer is reset. The default is 1s. - #backoff.init: 1s - - # The maximum number of seconds to wait before attempting to connect to - # Elasticsearch after a network error. The default is 60s. - #backoff.max: 60s - - # Configure HTTP request timeout before failing an request to Elasticsearch. - #timeout: 90 - - # Enable custom SSL settings. Set to false to ignore custom SSL settings for secure communication. - #ssl.enabled: true - - # Optional SSL configuration options. SSL is off by default, change the `protocol` option if you want to enable `https`. - # Configure SSL verification mode. If `none` is configured, all server hosts - # and certificates will be accepted. In this mode, SSL based connections are - # susceptible to man-in-the-middle attacks. Use only for testing. Default is - # `full`. - #ssl.verification_mode: full - - # List of supported/valid TLS versions. By default all TLS versions 1.0 up to - # 1.2 are enabled. - #ssl.supported_protocols: [TLSv1.0, TLSv1.1, TLSv1.2] - - # List of root certificates for HTTPS server verifications. - #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"] - - # Certificate for SSL client authentication. - #ssl.certificate: "/etc/pki/client/cert.pem" - - # Client Certificate Key - #ssl.key: "/etc/pki/client/cert.key" - - # Optional passphrase for decrypting the Certificate Key. - # It is recommended to use the provided keystore instead of entering the passphrase in plain text. - #ssl.key_passphrase: '' - - # Configure cipher suites to be used for SSL connections. - #ssl.cipher_suites: [] - - # Configure curve types for ECDHE based cipher suites. - #ssl.curve_types: [] - - # Configure what types of renegotiation are supported. Valid options are - # never, once, and freely. Default is never. - #ssl.renegotiation: never - - #metrics.period: 10s - #state.period: 1m diff --git a/docker/elastic/apm-server-oss/apm-server.yml b/docker/elastic/apm-server-oss/apm-server.yml deleted file mode 100644 index 0ce7b26..0000000 --- a/docker/elastic/apm-server-oss/apm-server.yml +++ /dev/null @@ -1,30 +0,0 @@ -apm-server: - host: "0.0.0.0:8200" - -output.elasticsearch: - pipeline: _none - #index: "apm-%{[observer.version]}-%{+yyyy.MM.dd}" - #indices: - # - index: "apm-%{[observer.version]}-sourcemap" - # when.contains: - # processor.event: "sourcemap" - # - # - index: "apm-%{[observer.version]}-error-%{+yyyy.MM.dd}" - # when.contains: - # processor.event: "error" - # - # - index: "apm-%{[observer.version]}-transaction-%{+yyyy.MM.dd}" - # when.contains: - # processor.event: "transaction" - # - # - index: "apm-%{[observer.version]}-span-%{+yyyy.MM.dd}" - # when.contains: - # processor.event: "span" - # - # - index: "apm-%{[observer.version]}-metric-%{+yyyy.MM.dd}" - # when.contains: - # processor.event: "metric" - # - # - index: "apm-%{[observer.version]}-onboarding-%{+yyyy.MM.dd}" - # when.contains: - # processor.event: "onboarding" diff --git a/docker/elastic/apm-server-oss/dashboards/error_details.json b/docker/elastic/apm-server-oss/dashboards/error_details.json deleted file mode 100644 index 550d655..0000000 --- a/docker/elastic/apm-server-oss/dashboards/error_details.json +++ /dev/null @@ -1,98 +0,0 @@ -[ - { - "_id": "5f08a870-7c6a-11e7-aa55-3b0d52c71c60", - "_migrationVersion": { - "dashboard": "7.0.0" - }, - "_references": [ - { - "id": "c618e4e0-7c69-11e7-aa55-3b0d52c71c60", - "name": "panel_0", - "type": "visualization" - }, - { - "id": "ceefd050-7c6a-11e7-aa55-3b0d52c71c60", - "name": "panel_1", - "type": "search" - } - ], - "_source": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"version\":true,\"highlightAll\":true}" - }, - "optionsJSON": "{\"darkTheme\": false}", - "panelsJSON": "[{\"size_x\":12,\"size_y\":3,\"panelIndex\":1,\"col\":1,\"row\":1,\"panelRefName\":\"panel_0\"},{\"sort\":[\"@timestamp\",\"desc\"],\"size_x\":12,\"size_y\":21,\"panelIndex\":2,\"col\":1,\"columns\":[\"error.culprit\",\"error.exception.type\",\"error.exception.message\",\"error.log.message\",\"error.exception.handled\",\"service.name\"],\"row\":4,\"panelRefName\":\"panel_1\"}]", - "timeRestore": false, - "title": "[APM] Error Details", - "uiStateJSON": "{}", - "version": 1 - }, - "_type": "dashboard" - }, - { - "_id": "c618e4e0-7c69-11e7-aa55-3b0d52c71c60", - "_migrationVersion": { - "visualization": "7.0.0" - }, - "_references": [ - { - "id": "apm-*", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "_source": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Error Occurrences [APM]", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"params\":{\"time_field\":\"@timestamp\",\"series\":[{\"line_width\":\"0\",\"terms_field\":\"error.grouping_key\",\"point_size\":1,\"color\":\"rgba(0,156,224,1)\",\"label\":\"Occurrences\",\"metrics\":[{\"type\":\"count\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\"}],\"seperate_axis\":0,\"split_mode\":\"terms\",\"chart_type\":\"bar\",\"stacked\":\"none\",\"axis_position\":\"right\",\"formatter\":\"number\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"fill\":\"1\"}],\"axis_formatter\":\"number\",\"interval\":\">=1m\",\"filter\":\"processor.event:error\",\"show_legend\":0,\"show_grid\":1,\"axis_position\":\"left\",\"type\":\"timeseries\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\"},\"type\":\"metrics\",\"aggs\":[],\"title\":\"Error Occurrences [APM]\"}" - }, - "_type": "visualization" - }, - { - "_id": "ceefd050-7c6a-11e7-aa55-3b0d52c71c60", - "_migrationVersion": { - "search": "7.0.0" - }, - "_references": [ - { - "id": "apm-*", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - }, - { - "id": "apm-*", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", - "type": "index-pattern" - } - ], - "_source": { - "columns": [ - "error.culprit", - "error.exception.type", - "error.exception.message", - "error.log.message", - "error.exception.handled", - "service.name" - ], - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[{\"query\":{\"match\":{\"processor.event\":{\"query\":\"error\",\"type\":\"phrase\"}}},\"meta\":{\"value\":\"error\",\"disabled\":false,\"alias\":null,\"params\":{\"query\":\"error\",\"type\":\"phrase\"},\"key\":\"processor.event\",\"negate\":false,\"type\":\"phrase\",\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"$state\":{\"store\":\"appState\"}}],\"version\":true,\"highlightAll\":true,\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "sort": [ - "@timestamp", - "desc" - ], - "title": "Error Details [APM]", - "version": 1 - }, - "_type": "search" - } -] \ No newline at end of file diff --git a/docker/elastic/apm-server-oss/dashboards/errors.json b/docker/elastic/apm-server-oss/dashboards/errors.json deleted file mode 100644 index 8fa1f60..0000000 --- a/docker/elastic/apm-server-oss/dashboards/errors.json +++ /dev/null @@ -1,82 +0,0 @@ -[ - { - "_id": "37f6fac0-7c6a-11e7-aa55-3b0d52c71c60", - "_migrationVersion": { - "dashboard": "7.0.0" - }, - "_references": [ - { - "id": "22518e70-7c69-11e7-aa55-3b0d52c71c60", - "name": "panel_0", - "type": "visualization" - }, - { - "id": "c618e4e0-7c69-11e7-aa55-3b0d52c71c60", - "name": "panel_1", - "type": "visualization" - } - ], - "_source": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"version\":true,\"highlightAll\":true}" - }, - "optionsJSON": "{\"darkTheme\": false}", - "panelsJSON": "[{\"size_x\":12,\"size_y\":10,\"panelIndex\":1,\"col\":1,\"row\":4,\"panelRefName\":\"panel_0\"},{\"size_x\":12,\"size_y\":3,\"panelIndex\":2,\"col\":1,\"row\":1,\"panelRefName\":\"panel_1\"}]", - "timeRestore": false, - "title": "[APM] Errors", - "uiStateJSON": "{\"P-1\": {\"vis\": {\"params\": {\"sort\": {\"columnIndex\": null, \"direction\": null}}}}}", - "version": 1 - }, - "_type": "dashboard" - }, - { - "_id": "22518e70-7c69-11e7-aa55-3b0d52c71c60", - "_migrationVersion": { - "visualization": "7.0.0" - }, - "_references": [ - { - "id": "apm-*", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "_source": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Top Errors for Time Period [APM]", - "uiStateJSON": "{\"vis\": {\"params\": {\"sort\": {\"columnIndex\": null, \"direction\": null}}}}", - "version": 1, - "visState": "{\"title\":\"Top Errors for Time Period [APM]\",\"type\":\"table\",\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null},\"perPage\":25,\"showPartialRows\":false,\"totalFunc\":\"sum\",\"showTotal\":false,\"showMetricsAtAllLevels\":false,\"dimensions\":{\"metrics\":[{\"accessor\":1,\"format\":{\"id\":\"string\"},\"params\":{},\"aggType\":\"top_hits\"},{\"accessor\":2,\"format\":{\"id\":\"number\"},\"params\":{},\"aggType\":\"count\"},{\"accessor\":3,\"format\":{\"id\":\"string\"},\"params\":{},\"aggType\":\"top_hits\"},{\"accessor\":4,\"format\":{\"id\":\"string\"},\"params\":{},\"aggType\":\"top_hits\"},{\"accessor\":5,\"format\":{\"id\":\"string\"},\"params\":{},\"aggType\":\"top_hits\"}],\"buckets\":[{\"accessor\":0,\"format\":{\"id\":\"terms\",\"params\":{\"id\":\"string\",\"otherBucketLabel\":\"Other\",\"missingBucketLabel\":\"Missing\"}},\"params\":{},\"aggType\":\"terms\"}]}},\"aggs\":[{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"error.culprit\",\"size\":100,\"order\":\"desc\",\"orderBy\":\"1\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"Error Culprit\"}},{\"id\":\"5\",\"enabled\":true,\"type\":\"top_hits\",\"schema\":\"metric\",\"params\":{\"field\":\"error.exception.message\",\"aggregate\":\"concat\",\"size\":1,\"sortField\":\"@timestamp\",\"sortOrder\":\"desc\",\"customLabel\":\"Message\"}},{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{\"customLabel\":\"Number of Errors\"}},{\"id\":\"4\",\"enabled\":true,\"type\":\"top_hits\",\"schema\":\"metric\",\"params\":{\"field\":\"error.exception.type\",\"aggregate\":\"concat\",\"size\":1,\"sortField\":\"@timestamp\",\"sortOrder\":\"desc\",\"customLabel\":\"Type\"}},{\"id\":\"6\",\"enabled\":true,\"type\":\"top_hits\",\"schema\":\"metric\",\"params\":{\"field\":\"service.name\",\"aggregate\":\"concat\",\"size\":1,\"sortField\":\"@timestamp\",\"sortOrder\":\"desc\",\"customLabel\":\"App Name\"}},{\"id\":\"7\",\"enabled\":true,\"type\":\"top_hits\",\"schema\":\"metric\",\"params\":{\"field\":\"error.grouping_key\",\"aggregate\":\"concat\",\"size\":1,\"sortField\":\"@timestamp\",\"sortOrder\":\"desc\",\"customLabel\":\"Error Grouping Key\"}}]}" - }, - "_type": "visualization" - }, - { - "_id": "c618e4e0-7c69-11e7-aa55-3b0d52c71c60", - "_migrationVersion": { - "visualization": "7.0.0" - }, - "_references": [ - { - "id": "apm-*", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "_source": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Error Occurrences [APM]", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"params\":{\"time_field\":\"@timestamp\",\"series\":[{\"line_width\":\"0\",\"terms_field\":\"error.grouping_key\",\"point_size\":1,\"color\":\"rgba(0,156,224,1)\",\"label\":\"Occurrences\",\"metrics\":[{\"type\":\"count\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\"}],\"seperate_axis\":0,\"split_mode\":\"terms\",\"chart_type\":\"bar\",\"stacked\":\"none\",\"axis_position\":\"right\",\"formatter\":\"number\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"fill\":\"1\"}],\"axis_formatter\":\"number\",\"interval\":\">=1m\",\"filter\":\"processor.event:error\",\"show_legend\":0,\"show_grid\":1,\"axis_position\":\"left\",\"type\":\"timeseries\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\"},\"type\":\"metrics\",\"aggs\":[],\"title\":\"Error Occurrences [APM]\"}" - }, - "_type": "visualization" - } -] \ No newline at end of file diff --git a/docker/elastic/apm-server-oss/dashboards/services.json b/docker/elastic/apm-server-oss/dashboards/services.json deleted file mode 100644 index 14b2a9e..0000000 --- a/docker/elastic/apm-server-oss/dashboards/services.json +++ /dev/null @@ -1,111 +0,0 @@ -[ - { - "_id": "8d3ed660-7828-11e7-8c47-65b845b5cfb3", - "_migrationVersion": { - "dashboard": "7.0.0" - }, - "_references": [ - { - "id": "1ffc5e20-7827-11e7-8c47-65b845b5cfb3", - "name": "panel_0", - "type": "visualization" - }, - { - "id": "1bdca740-7828-11e7-8c47-65b845b5cfb3", - "name": "panel_1", - "type": "visualization" - }, - { - "id": "804ffc40-7828-11e7-8c47-65b845b5cfb3", - "name": "panel_2", - "type": "visualization" - } - ], - "_source": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"version\":true,\"highlightAll\":true}" - }, - "optionsJSON": "{\"darkTheme\": false}", - "panelsJSON": "[{\"size_x\":12,\"size_y\":5,\"panelIndex\":1,\"col\":1,\"row\":4,\"panelRefName\":\"panel_0\"},{\"size_x\":6,\"size_y\":3,\"panelIndex\":2,\"col\":1,\"row\":1,\"panelRefName\":\"panel_1\"},{\"size_x\":6,\"size_y\":3,\"panelIndex\":3,\"col\":7,\"row\":1,\"panelRefName\":\"panel_2\"}]", - "timeRestore": false, - "title": "[APM] Services", - "uiStateJSON": "{\"P-1\": {\"vis\": {\"params\": {\"sort\": {\"columnIndex\": null, \"direction\": null}}}}}", - "version": 1 - }, - "_type": "dashboard" - }, - { - "_id": "1ffc5e20-7827-11e7-8c47-65b845b5cfb3", - "_migrationVersion": { - "visualization": "7.0.0" - }, - "_references": [ - { - "id": "apm-*", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "_source": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Services [APM]", - "uiStateJSON": "{\"vis\": {\"params\": {\"sort\": {\"columnIndex\": null, \"direction\": null}}}}", - "version": 1, - "visState": "{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null},\"perPage\":10,\"showPartialRows\":false,\"totalFunc\":\"sum\",\"showTotal\":false,\"showMeticsAtAllLevels\":false},\"type\":\"table\",\"aggs\":[{\"type\":\"avg\",\"enabled\":true,\"id\":\"1\",\"params\":{\"field\":\"transaction.duration.us\",\"customLabel\":\"Avg. Trans. Time\"},\"schema\":\"metric\"},{\"type\":\"percentiles\",\"enabled\":true,\"id\":\"3\",\"params\":{\"field\":\"transaction.duration.us\",\"percents\":[95],\"customLabel\":\"Trans. Time\"},\"schema\":\"metric\"},{\"type\":\"cardinality\",\"enabled\":true,\"id\":\"4\",\"params\":{\"field\":\"transaction.id\",\"customLabel\":\"Total Transactions\"},\"schema\":\"metric\"},{\"type\":\"cardinality\",\"enabled\":true,\"id\":\"6\",\"params\":{\"field\":\"error.id\",\"customLabel\":\"Errors\"},\"schema\":\"metric\"},{\"type\":\"terms\",\"enabled\":true,\"id\":\"2\",\"params\":{\"orderBy\":\"1\",\"field\":\"service.name\",\"order\":\"desc\",\"size\":1000},\"schema\":\"bucket\"}],\"title\":\"Services [APM]\"}" - }, - "_type": "visualization" - }, - { - "_id": "1bdca740-7828-11e7-8c47-65b845b5cfb3", - "_migrationVersion": { - "visualization": "7.0.0" - }, - "_references": [ - { - "id": "apm-*", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "_source": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Top Services by Transaction Time [APM]", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"params\":{\"time_field\":\"@timestamp\",\"series\":[{\"line_width\":\"2\",\"terms_field\":\"service.name\",\"point_size\":1,\"color\":\"rgba(0,156,224,1)\",\"value_template\":\"{{value}} ms\",\"metrics\":[{\"field\":\"transaction.duration.us\",\"type\":\"avg\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\"}],\"seperate_axis\":0,\"split_mode\":\"terms\",\"chart_type\":\"line\",\"terms_order_by\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"stacked\":\"none\",\"axis_position\":\"right\",\"formatter\":\"us,ms,0\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"split_color_mode\":\"gradient\",\"fill\":\"0\"}],\"axis_formatter\":\"number\",\"interval\":\">=1m\",\"show_legend\":1,\"show_grid\":1,\"axis_position\":\"left\",\"type\":\"timeseries\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\"},\"type\":\"metrics\",\"aggs\":[],\"title\":\"Top Services by Transaction Time [APM]\"}" - }, - "_type": "visualization" - }, - { - "_id": "804ffc40-7828-11e7-8c47-65b845b5cfb3", - "_migrationVersion": { - "visualization": "7.0.0" - }, - "_references": [ - { - "id": "apm-*", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "_source": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Top Services by Transaction Per Minute [APM]", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"params\":{\"time_field\":\"@timestamp\",\"series\":[{\"line_width\":\"2\",\"terms_field\":\"service.name\",\"point_size\":1,\"color\":\"rgba(0,156,224,1)\",\"value_template\":\"{{value}} tpm\",\"metrics\":[{\"type\":\"count\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\"},{\"field\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"cumulative_sum\",\"id\":\"3fcaa6c0-7828-11e7-bb25-2ff6dee07a1b\"},{\"field\":\"3fcaa6c0-7828-11e7-bb25-2ff6dee07a1b\",\"type\":\"derivative\",\"id\":\"467f1cd0-7828-11e7-bb25-2ff6dee07a1b\",\"unit\":\"1m\"},{\"field\":\"467f1cd0-7828-11e7-bb25-2ff6dee07a1b\",\"type\":\"positive_only\",\"id\":\"4bd1b8f0-7828-11e7-bb25-2ff6dee07a1b\",\"unit\":\"\"}],\"seperate_axis\":0,\"split_mode\":\"terms\",\"chart_type\":\"line\",\"terms_order_by\":\"_count\",\"stacked\":\"none\",\"axis_position\":\"right\",\"formatter\":\"number\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"fill\":\"0\"}],\"axis_formatter\":\"number\",\"interval\":\">=1m\",\"show_legend\":1,\"show_grid\":1,\"axis_position\":\"left\",\"type\":\"timeseries\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\"},\"type\":\"metrics\",\"aggs\":[],\"title\":\"Top Apps by Transaction Per Minute [APM]\"}" - }, - "_type": "visualization" - } -] \ No newline at end of file diff --git a/docker/elastic/apm-server-oss/dashboards/span_details.json b/docker/elastic/apm-server-oss/dashboards/span_details.json deleted file mode 100644 index b3bdc49..0000000 --- a/docker/elastic/apm-server-oss/dashboards/span_details.json +++ /dev/null @@ -1,67 +0,0 @@ -[ - { - "_id": "3e3de700-7de0-11e7-b115-df9c90da2df1", - "_migrationVersion": { - "dashboard": "7.0.0" - }, - "_references": [ - { - "id": "d7735b90-7ddf-11e7-b115-df9c90da2df1", - "name": "panel_0", - "type": "search" - } - ], - "_source": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"version\":true,\"highlightAll\":true}" - }, - "optionsJSON": "{\"darkTheme\": false}", - "panelsJSON": "[{\"sort\":[\"span.start.us\",\"asc\"],\"col\":1,\"size_x\":12,\"size_y\":23,\"panelIndex\":1,\"columns\":[\"span.type\",\"span.name\",\"span.duration.us\",\"span.start.us\"],\"row\":1,\"panelRefName\":\"panel_0\"}]", - "timeRestore": false, - "title": "[APM] Span Details", - "uiStateJSON": "{}", - "version": 1 - }, - "_type": "dashboard" - }, - { - "_id": "d7735b90-7ddf-11e7-b115-df9c90da2df1", - "_migrationVersion": { - "search": "7.0.0" - }, - "_references": [ - { - "id": "apm-*", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - }, - { - "id": "apm-*", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", - "type": "index-pattern" - } - ], - "_source": { - "columns": [ - "span.type", - "span.name", - "span.duration.us", - "span.start.us" - ], - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[{\"query\":{\"match\":{\"processor.event\":{\"query\":\"span\",\"type\":\"phrase\"}}},\"meta\":{\"value\":\"span\",\"disabled\":false,\"alias\":null,\"params\":{\"query\":\"span\",\"type\":\"phrase\"},\"key\":\"processor.event\",\"negate\":false,\"type\":\"phrase\",\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"$state\":{\"store\":\"appState\"}}],\"version\":true,\"highlightAll\":true,\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "sort": [ - "span.start.us", - "asc" - ], - "title": "Spans [APM]", - "version": 1 - }, - "_type": "search" - } -] \ No newline at end of file diff --git a/docker/elastic/apm-server-oss/dashboards/transactions.json b/docker/elastic/apm-server-oss/dashboards/transactions.json deleted file mode 100644 index c047f56..0000000 --- a/docker/elastic/apm-server-oss/dashboards/transactions.json +++ /dev/null @@ -1,111 +0,0 @@ -[ - { - "_id": "41b5d920-7821-11e7-8c47-65b845b5cfb3", - "_migrationVersion": { - "dashboard": "7.0.0" - }, - "_references": [ - { - "id": "a2e199b0-7820-11e7-8c47-65b845b5cfb3", - "name": "panel_0", - "type": "visualization" - }, - { - "id": "09bcf890-7822-11e7-8c47-65b845b5cfb3", - "name": "panel_1", - "type": "visualization" - }, - { - "id": "55606a60-7823-11e7-8c47-65b845b5cfb3", - "name": "panel_2", - "type": "visualization" - } - ], - "_source": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"version\":true,\"highlightAll\":true}" - }, - "optionsJSON": "{\"darkTheme\": false}", - "panelsJSON": "[{\"size_x\":12,\"size_y\":10,\"panelIndex\":1,\"col\":1,\"row\":4,\"panelRefName\":\"panel_0\"},{\"size_x\":6,\"size_y\":3,\"panelIndex\":2,\"col\":1,\"row\":1,\"panelRefName\":\"panel_1\"},{\"size_x\":6,\"size_y\":3,\"panelIndex\":3,\"col\":7,\"row\":1,\"panelRefName\":\"panel_2\"}]", - "timeRestore": false, - "title": "[APM] Transactions", - "uiStateJSON": "{\"P-1\": {\"vis\": {\"params\": {\"sort\": {\"columnIndex\": null, \"direction\": null}}}}}", - "version": 1 - }, - "_type": "dashboard" - }, - { - "_id": "a2e199b0-7820-11e7-8c47-65b845b5cfb3", - "_migrationVersion": { - "visualization": "7.0.0" - }, - "_references": [ - { - "id": "apm-*", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "_source": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Top Transactions for Time Period [APM]", - "uiStateJSON": "{\"vis\": {\"params\": {\"sort\": {\"columnIndex\": null, \"direction\": null}}}}", - "version": 1, - "visState": "{\"type\":\"table\",\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null},\"perPage\":25,\"showPartialRows\":false,\"totalFunc\":\"sum\",\"showTotal\":false,\"showMeticsAtAllLevels\":false},\"aggs\":[{\"params\":{\"orderBy\":\"1\",\"field\":\"transaction.name\",\"customLabel\":\"Transaction\",\"order\":\"desc\",\"size\":1000},\"type\":\"terms\",\"enabled\":true,\"id\":\"2\",\"schema\":\"bucket\"},{\"params\":{\"sortField\":\"@timestamp\",\"customLabel\":\"Type\",\"field\":\"transaction.type\",\"sortOrder\":\"desc\",\"aggregate\":\"concat\",\"size\":1},\"type\":\"top_hits\",\"enabled\":true,\"id\":\"5\",\"schema\":\"metric\"},{\"params\":{\"field\":\"transaction.duration.us\",\"customLabel\":\"Avg. Resp Time (ms)\"},\"type\":\"avg\",\"enabled\":true,\"id\":\"1\",\"schema\":\"metric\"},{\"params\":{\"field\":\"transaction.duration.us\",\"customLabel\":\"Resp Time (ms)\",\"percents\":[95]},\"type\":\"percentiles\",\"enabled\":true,\"id\":\"3\",\"schema\":\"metric\"},{\"params\":{\"sortField\":\"@timestamp\",\"customLabel\":\"View Spans\",\"field\":\"transaction.id\",\"sortOrder\":\"desc\",\"aggregate\":\"concat\",\"size\":1},\"type\":\"top_hits\",\"enabled\":true,\"id\":\"4\",\"schema\":\"metric\"}],\"title\":\"Top Transactions for Time Period [APM]\"}" - }, - "_type": "visualization" - }, - { - "_id": "09bcf890-7822-11e7-8c47-65b845b5cfb3", - "_migrationVersion": { - "visualization": "7.0.0" - }, - "_references": [ - { - "id": "apm-*", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "_source": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Transaction Times [APM]", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"params\":{\"time_field\":\"@timestamp\",\"series\":[{\"line_width\":\"2\",\"point_size\":1,\"color\":\"rgba(0,156,224,1)\",\"value_template\":\"{{value}} ms\",\"label\":\"Average\",\"metrics\":[{\"field\":\"transaction.duration.us\",\"type\":\"avg\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\"}],\"seperate_axis\":0,\"split_mode\":\"everything\",\"chart_type\":\"line\",\"stacked\":\"none\",\"axis_position\":\"right\",\"formatter\":\"us,ms,0\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"fill\":\"0\"},{\"line_width\":1,\"point_size\":1,\"color\":\"rgba(115,216,255,1)\",\"value_template\":\"{{value}} ms\",\"label\":\"95th Percentile\",\"metrics\":[{\"field\":\"transaction.duration.us\",\"percentiles\":[{\"mode\":\"line\",\"percentile\":\"\",\"shade\":0.2,\"value\":\"95\",\"id\":\"858ec670-7821-11e7-8745-07eaffcb65e5\"}],\"type\":\"percentile\",\"id\":\"79921481-7821-11e7-8745-07eaffcb65e5\"}],\"seperate_axis\":0,\"split_mode\":\"everything\",\"chart_type\":\"line\",\"stacked\":\"none\",\"axis_position\":\"right\",\"formatter\":\"us,ms,0\",\"id\":\"79921480-7821-11e7-8745-07eaffcb65e5\",\"fill\":0.5},{\"line_width\":\"2\",\"point_size\":1,\"color\":\"rgba(254,146,0,1)\",\"value_template\":\"{{value}} ms\",\"label\":\"99th Percentile\",\"metrics\":[{\"field\":\"transaction.duration.us\",\"percentiles\":[{\"mode\":\"line\",\"percentile\":\"\",\"shade\":0.2,\"value\":\"99\",\"id\":\"858ec670-7821-11e7-8745-07eaffcb65e5\"}],\"type\":\"percentile\",\"id\":\"c1e42de1-7821-11e7-8745-07eaffcb65e5\"}],\"seperate_axis\":0,\"split_mode\":\"everything\",\"chart_type\":\"line\",\"stacked\":\"none\",\"axis_position\":\"right\",\"formatter\":\"us,ms,0\",\"id\":\"c1e42de0-7821-11e7-8745-07eaffcb65e5\",\"fill\":\"0\"}],\"axis_formatter\":\"number\",\"interval\":\">=1m\",\"show_legend\":1,\"show_grid\":1,\"legend_position\":\"right\",\"axis_position\":\"left\",\"type\":\"timeseries\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\"},\"type\":\"metrics\",\"aggs\":[],\"title\":\"Transaction Times [APM]\"}" - }, - "_type": "visualization" - }, - { - "_id": "55606a60-7823-11e7-8c47-65b845b5cfb3", - "_migrationVersion": { - "visualization": "7.0.0" - }, - "_references": [ - { - "id": "apm-*", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "_source": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Transaction Per Minute [APM]", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"params\":{\"time_field\":\"@timestamp\",\"series\":[{\"line_width\":\"2\",\"terms_field\":\"transaction.result\",\"point_size\":\"0\",\"color\":\"rgba(115,216,255,1)\",\"value_template\":\"{{value}} tpm\",\"label\":\"\",\"metrics\":[{\"field\":\"transaction.id\",\"type\":\"cardinality\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\"},{\"field\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"cumulative_sum\",\"id\":\"3fcaa6c0-7828-11e7-bb25-2ff6dee07a1b\"},{\"field\":\"3fcaa6c0-7828-11e7-bb25-2ff6dee07a1b\",\"type\":\"derivative\",\"id\":\"467f1cd0-7828-11e7-bb25-2ff6dee07a1b\",\"unit\":\"1m\"},{\"field\":\"467f1cd0-7828-11e7-bb25-2ff6dee07a1b\",\"type\":\"positive_only\",\"id\":\"4bd1b8f0-7828-11e7-bb25-2ff6dee07a1b\",\"unit\":\"\"}],\"seperate_axis\":0,\"split_mode\":\"everything\",\"chart_type\":\"line\",\"stacked\":\"none\",\"axis_position\":\"right\",\"formatter\":\"number\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"fill\":\"0\"}],\"axis_formatter\":\"number\",\"interval\":\">=1m\",\"show_legend\":0,\"show_grid\":1,\"axis_position\":\"left\",\"type\":\"timeseries\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\"},\"type\":\"metrics\",\"aggs\":[],\"title\":\"Transaction Per Minute [APM]\"}" - }, - "_type": "visualization" - } -] \ No newline at end of file diff --git a/docker/elastic/apm-server/Dockerfile b/docker/elastic/apm-server/Dockerfile deleted file mode 100644 index 7506e67..0000000 --- a/docker/elastic/apm-server/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM docker.elastic.co/apm/apm-server-oss:7.4.2 as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR - -# config -# COPY ${DOCKER_BUILD_DIR}/apm-server.yml /usr/share/apm-server/ - -FROM dist as master -ARG DOCKER_BUILD_DIR diff --git a/docker/elastic/curator/Dockerfile b/docker/elastic/curator/Dockerfile deleted file mode 100644 index 39f2680..0000000 --- a/docker/elastic/curator/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM alpine:latest as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR -ARG CURATOR_VERSION=5.8.3 - -RUN apk --no-cache add \ - bash \ - py-pip \ - && pip install elasticsearch-curator==${CURATOR_VERSION} - -COPY ${DOCKER_BUILD_DIR}/docker-entrypoint.sh / -COPY ${DOCKER_BUILD_DIR}/config.yml /etc/curator/ -COPY ${DOCKER_BUILD_DIR}/action.yml /etc/curator/ - -ENTRYPOINT ["/docker-entrypoint.sh"] - -FROM dist as master -ARG DOCKER_BUILD_DIR - -# install cronlock -ADD https://raw.github.com/kvz/cronlock/master/cronlock /usr/bin/cronlock -RUN chmod +rx /usr/bin/cronlock - -# install ssmtp -RUN apk --no-cache add ssmtp && \ - echo "FromLineOverride=YES" >> /etc/ssmtp/ssmtp.conf diff --git a/docker/elastic/curator/action.yml b/docker/elastic/curator/action.yml deleted file mode 100644 index 8ab7635..0000000 --- a/docker/elastic/curator/action.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -actions: - 1: - action: delete_indices - description: >- - Delete indices older than ${UNIT_COUNT:1} ${UNIT:months} based on index name, for apm-* - and logs-* prefixed indices. Ignore the error if the filter does not result in an - actionable list of indices (ignore_empty_list) and exit cleanly. - options: - ignore_empty_list: True - timeout_override: - continue_if_exception: True - disable_action: False - filters: - - filtertype: pattern - kind: regex - value: '^(apm|logs)-.*$' - - filtertype: age - source: name - direction: older - timestring: '%Y.%m.%d' - unit: ${UNIT:months} - unit_count: ${UNIT_COUNT:1} diff --git a/docker/elastic/curator/config.yml b/docker/elastic/curator/config.yml deleted file mode 100644 index efdcd8a..0000000 --- a/docker/elastic/curator/config.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -client: - hosts: ${HOSTS:elasticsearch} - port: ${PORT:9200} - url_prefix: - use_ssl: ${USE_SSL:False} - certificate: - client_cert: - client_key: - ssl_no_validate: False - http_auth: - timeout: ${TIMEOUT:30} - master_only: ${MASTER_ONLY:False} -logging: - loglevel: ${LOGLEVEL:INFO} - logfile: - logformat: ${LOGFORMAT:default} - blacklist: ['elasticsearch', 'urllib3'] diff --git a/docker/elastic/curator/docker-entrypoint.sh b/docker/elastic/curator/docker-entrypoint.sh deleted file mode 100755 index 916830b..0000000 --- a/docker/elastic/curator/docker-entrypoint.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -set -euo errexit - -trap 'kill -SIGQUIT $PID' INT - -CRON_DAILY_COMMAND="/usr/bin/curator --config /etc/curator/config.yml /etc/curator/action.yml" -[ "${DEPLOY:-}" = "true" ] && CRON_DAILY_COMMAND="cronlock ${CRON_DAILY_COMMAND}" - -cat > /etc/periodic/daily/curator < -ARG DOCKER_BUILD_DIR - -ARG DOCKER_MACHINE=x86_64 -ARG DOCKER_SYSTEM=Linux -ARG FABIO_REMOTE=https://github.com/fabiolb/fabio -ARG FABIO_VERSION=1.6.3 - -RUN apk update \ - && apk add --no-cache ca-certificates \ - && OS="$(echo ${DOCKER_SYSTEM} |awk '{print tolower($0)}')" \ - && ARCH="$(echo ${DOCKER_MACHINE} |awk '{print /x86_64/ ? "amd64" : /arch64/ ? "arm64" : /armv(6|7)/ ? "arm" : $0}')" \ - && wget -qO /usr/bin/fabio ${FABIO_REMOTE}/releases/download/v${FABIO_VERSION}/fabio-${FABIO_VERSION}-${OS}_${ARCH} \ - && chmod +x /usr/bin/fabio - -EXPOSE 9998 9999 -ENTRYPOINT ["/usr/bin/fabio"] -CMD ["-cfg", "/etc/fabio/fabio.properties"] - -HEALTHCHECK CMD status=$(echo -e 'GET /health HTTP/1.0\n' |nc -w 1 localhost 9998 | sed -n '$p') \ - && echo "$status" && [ "$status" = "OK" ] || exit 1 - -FROM dist as master -ARG DOCKER_BUILD_DIR diff --git a/docker/goofys/Dockerfile b/docker/goofys/Dockerfile deleted file mode 100644 index 70c9181..0000000 --- a/docker/goofys/Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -FROM golang:1.15-alpine AS build -LABEL maintainer aynic.os -ARG GOOFYS_VERSION=v0.24.0 - -WORKDIR /src/github.com/kahing/goofys/ - -RUN apk --no-cache upgrade \ - && apk --no-cache add git make \ - && git clone https://github.com/kahing/goofys/ . \ - && git checkout tags/${GOOFYS_VERSION} -b ${GOOFYS_VERSION} \ - && go get . \ - && make install - -FROM alpine:latest as dist - -RUN apk add --no-cache ca-certificates -COPY --from=build /go/bin/goofys /bin/goofys - -ENTRYPOINT ["/bin/goofys"] - -# goofys -f --region $REGION --stat-cache-ttl $STAT_CACHE_TTL --type-cache-ttl $TYPE_CACHE_TTL --dir-mode $DIR_MODE --file-mode $FILE_MODE -o nonempty $BUCKET $MOUNT_DIR - -FROM dist as master -ARG DOCKER_BUILD_DIR diff --git a/docker/grafana/Dockerfile b/docker/grafana/Dockerfile deleted file mode 100644 index 7c7fb09..0000000 --- a/docker/grafana/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM grafana/grafana:latest as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR -ARG AWS_ACCESS_KEY -ARG AWS_SECRET_KEY -ARG MYSQL_GRAFANA_USER -ARG MYSQL_GRAFANA_PASSWORD -ARG MYSQL_GRAFANA_DB - -COPY ${DOCKER_BUILD_DIR}/config.ini /etc/grafana/config.ini -COPY ${DOCKER_BUILD_DIR}/dashboards /etc/grafana/dashboards -COPY ${DOCKER_BUILD_DIR}/provisioning /etc/grafana/provisioning - -USER root - -RUN sed 's@AWS_ACCESS_KEY@'"${AWS_ACCESS_KEY:-UNDEFINED}"'@g; s@AWS_SECRET_KEY@'"${AWS_SECRET_KEY:-UNDEFINED}"'@g; s@MYSQL_GRAFANA_USER@'"${MYSQL_GRAFANA_USER:-UNDEFINED}"'@g; s@MYSQL_GRAFANA_PASSWORD@'"${MYSQL_GRAFANA_PASSWORD:-UNDEFINED}"'@g; s@MYSQL_GRAFANA_DB@'"${MYSQL_GRAFANA_DB:-UNDEFINED}"'@g' /etc/grafana/provisioning/datasources/datasources.tmpl > /etc/grafana/provisioning/datasources/datasources.yml - -COPY ${DOCKER_BUILD_DIR}/docker-entrypoint.sh / -RUN chmod +x /docker-entrypoint.sh - -USER grafana - -ENTRYPOINT ["/docker-entrypoint.sh"] - -FROM dist as master -ARG DOCKER_BUILD_DIR diff --git a/docker/grafana/config.ini b/docker/grafana/config.ini deleted file mode 100644 index 0066b7f..0000000 --- a/docker/grafana/config.ini +++ /dev/null @@ -1,2 +0,0 @@ -[paths] -provisioning = /etc/grafana/provisioning diff --git a/docker/grafana/dashboards/containers.json b/docker/grafana/dashboards/containers.json deleted file mode 100644 index 8285073..0000000 --- a/docker/grafana/dashboards/containers.json +++ /dev/null @@ -1,1383 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "description": "Containers metrics", - "editable": true, - "gnetId": null, - "graphTooltip": 1, - "id": null, - "links": [], - "panels": [ - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "Prometheus", - "decimals": 2, - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 0, - "y": 0 - }, - "hideTimeOverride": true, - "id": 4, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(rate(container_cpu_user_seconds_total{image!=\"\"}[1m])) / count(node_cpu_seconds_total{mode=\"user\"}) * 100", - "format": "time_series", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A", - "step": 10 - } - ], - "thresholds": "65, 90", - "timeFrom": "10s", - "title": "CPU Load", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "Prometheus", - "editable": true, - "error": false, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 4, - "y": 0 - }, - "id": 7, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "machine_cpu_cores", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "", - "metric": "machine_cpu_cores", - "refId": "A", - "step": 20 - } - ], - "thresholds": "", - "title": "CPU Cores", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "Prometheus", - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 8, - "y": 0 - }, - "hideTimeOverride": true, - "id": 5, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "(sum(node_memory_MemTotal_bytes) - sum(node_memory_MemFree_bytes+node_memory_Buffers_bytes+node_memory_Cached_bytes) ) / sum(node_memory_MemTotal_bytes) * 100", - "format": "time_series", - "interval": "10s", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A", - "step": 20 - } - ], - "thresholds": "65, 90", - "timeFrom": "10s", - "title": "Memory Load", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "Prometheus", - "decimals": 2, - "editable": true, - "error": false, - "format": "bytes", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 12, - "y": 0 - }, - "hideTimeOverride": true, - "id": 2, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(container_memory_usage_bytes{image!=\"\"})", - "format": "time_series", - "interval": "10s", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A", - "step": 20 - } - ], - "thresholds": "", - "timeFrom": "10s", - "title": "Used Memory", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "Prometheus", - "decimals": null, - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 16, - "y": 0 - }, - "hideTimeOverride": true, - "id": 6, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "(node_filesystem_size_bytes{fstype=\"aufs\"} - node_filesystem_free_bytes{fstype=\"aufs\"}) / node_filesystem_size_bytes{fstype=\"aufs\"} * 100", - "format": "time_series", - "interval": "30s", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A", - "step": 30 - } - ], - "thresholds": "65, 90", - "timeFrom": "10s", - "title": "Storage Load", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "Prometheus", - "decimals": 2, - "editable": true, - "error": false, - "format": "bytes", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 20, - "y": 0 - }, - "hideTimeOverride": true, - "id": 3, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(container_fs_usage_bytes)", - "interval": "30s", - "intervalFactor": 2, - "refId": "A", - "step": 60 - } - ], - "thresholds": "", - "timeFrom": "10s", - "title": "Used Storage", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "decimals": 0, - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "gridPos": { - "h": 4, - "w": 8, - "x": 0, - "y": 4 - }, - "id": 9, - "isNew": true, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "scalar(count(container_memory_usage_bytes{image!=\"\"}) > 0)", - "interval": "", - "intervalFactor": 2, - "legendFormat": "containers", - "refId": "A", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Running Containers", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "none", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "decimals": 2, - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "gridPos": { - "h": 4, - "w": 8, - "x": 8, - "y": 4 - }, - "id": 10, - "isNew": true, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "load 1m", - "color": "#BF1B00" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "node_load1", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "load 1m", - "metric": "node_load1", - "refId": "A", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "System CPU Load", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "gridPos": { - "h": 4, - "w": 8, - "x": 16, - "y": 4 - }, - "id": 15, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": true, - "show": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "read", - "yaxis": 1 - }, - { - "alias": "written", - "yaxis": 1 - }, - { - "alias": "io time", - "yaxis": 2 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(irate(node_disk_read_bytes_total[5m]))", - "format": "time_series", - "interval": "2s", - "intervalFactor": 4, - "legendFormat": "read", - "metric": "", - "refId": "A", - "step": 8 - }, - { - "expr": "sum(irate(node_disk_written_bytes_total[5m]))", - "format": "time_series", - "interval": "2s", - "intervalFactor": 4, - "legendFormat": "written", - "metric": "", - "refId": "B", - "step": 8 - }, - { - "expr": "sum(irate(node_disk_io_time_seconds_total[5m]))", - "format": "time_series", - "interval": "2s", - "intervalFactor": 4, - "legendFormat": "io time", - "metric": "", - "refId": "C", - "step": 8 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "I/O Usage", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "ms", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "decimals": 2, - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 8 - }, - "id": 8, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "sideWidth": null, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 2, - "points": true, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (name) (rate(container_cpu_usage_seconds_total{image!=\"\",container_label_org_label_schema_group=\"\"}[1m])) / scalar(count(node_cpu_seconds_total{mode=\"user\"})) * 100", - "format": "time_series", - "intervalFactor": 10, - "legendFormat": "{{ name }}", - "metric": "container_cpu_user_seconds_total", - "refId": "A", - "step": 10 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Container CPU Usage", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percent", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "decimals": 2, - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 15 - }, - "id": 11, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (name)(container_memory_usage_bytes{image!=\"\",container_label_org_label_schema_group=\"\"})", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ name }}", - "metric": "container_memory_usage", - "refId": "A", - "step": 1 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Container Memory Usage", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "decimals": 2, - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 22 - }, - "id": 12, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (name) (container_memory_cache{image!=\"\",container_label_org_label_schema_group=\"\"})", - "intervalFactor": 2, - "legendFormat": "{{name}}", - "metric": "container_memory_cache", - "refId": "A", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Container Cached Memory Usage", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "decimals": 2, - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 29 - }, - "id": 13, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (name) (rate(container_network_receive_bytes_total{image!=\"\",container_label_org_label_schema_group=\"\"}[1m]))", - "intervalFactor": 10, - "legendFormat": "{{ name }}", - "metric": "container_network_receive_bytes_total", - "refId": "A", - "step": 10 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Container Network Input", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "decimals": 2, - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 36 - }, - "id": 14, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (name) (rate(container_network_transmit_bytes_total{image!=\"\",container_label_org_label_schema_group=\"\"}[1m]))", - "intervalFactor": 10, - "legendFormat": "{{ name }}", - "metric": "container_network_transmit_bytes_total", - "refId": "A", - "step": 10 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Container Network Output", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "5s", - "schemaVersion": 16, - "style": "dark", - "tags": [ - "docker" - ], - "templating": { - "list": [] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "browser", - "title": "Docker - Local Containers (Provisoned)", - "uid": "SpmMKdciz", - "version": 11 -} diff --git a/docker/grafana/dashboards/host.json b/docker/grafana/dashboards/host.json deleted file mode 100644 index 4851297..0000000 --- a/docker/grafana/dashboards/host.json +++ /dev/null @@ -1,1607 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "description": "Docker host metrics", - "editable": true, - "gnetId": null, - "graphTooltip": 1, - "id": null, - "links": [], - "panels": [ - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "Prometheus", - "decimals": 1, - "editable": true, - "error": false, - "format": "s", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 0 - }, - "hideTimeOverride": true, - "id": 1, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "s", - "postfixFontSize": "80%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "node_time_seconds - node_boot_time_seconds", - "format": "time_series", - "interval": "30s", - "intervalFactor": 1, - "refId": "A", - "step": 30 - } - ], - "thresholds": "", - "timeFrom": "10s", - "title": "Uptime", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "Prometheus", - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 4, - "y": 0 - }, - "hideTimeOverride": true, - "id": 13, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "$$hashKey": "object:283", - "expr": "sum(rate(node_cpu_seconds_total{mode=\"user\"}[1m])) * 100 / scalar(count(node_cpu_seconds_total{mode=\"idle\"}))", - "format": "time_series", - "interval": "10s", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A", - "step": 20 - } - ], - "thresholds": "65,90", - "timeFrom": "10s", - "title": "CPU Load", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "Prometheus", - "editable": true, - "error": false, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 8, - "y": 0 - }, - "hideTimeOverride": true, - "id": 12, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "machine_cpu_cores", - "format": "time_series", - "intervalFactor": 2, - "metric": "machine_cpu_cores", - "refId": "A", - "step": 2 - } - ], - "thresholds": "", - "timeFrom": "10s", - "title": "CPU Cores", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "Prometheus", - "editable": true, - "error": false, - "format": "bytes", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 12, - "y": 0 - }, - "hideTimeOverride": true, - "id": 2, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "node_memory_MemAvailable_bytes", - "format": "time_series", - "interval": "30s", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A", - "step": 60 - } - ], - "thresholds": "", - "timeFrom": "10s", - "title": "Available Memory", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "Prometheus", - "editable": true, - "error": false, - "format": "bytes", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 16, - "y": 0 - }, - "hideTimeOverride": true, - "id": 3, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "node_memory_SwapFree_bytes", - "format": "time_series", - "interval": "30s", - "intervalFactor": 2, - "refId": "A", - "step": 60 - } - ], - "thresholds": "", - "timeFrom": "10s", - "title": "Free Swap", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "Prometheus", - "editable": true, - "error": false, - "format": "bytes", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 20, - "y": 0 - }, - "hideTimeOverride": true, - "id": 4, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(node_filesystem_free_bytes{fstype=\"aufs\"})", - "format": "time_series", - "interval": "30s", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A", - "step": 30 - } - ], - "thresholds": "", - "timeFrom": "10s", - "title": "Free Storage", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "alert": { - "conditions": [ - { - "evaluator": { - "params": [ - 8 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "avg" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "frequency": "60s", - "handler": 1, - "name": "Load Average 1m alert", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "decimals": 2, - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 3 - }, - "id": 9, - "isNew": true, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 2, - "points": true, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "load 1m", - "color": "#1F78C1" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "node_load1", - "format": "time_series", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "load 1m", - "refId": "A", - "step": 10 - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 8 - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Load Average 1m", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "decimals": 2, - "editable": true, - "error": false, - "fill": 4, - "grid": {}, - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 9 - }, - "id": 5, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 2, - "points": true, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(node_cpu_seconds_total[1m])) by (mode) * 100 / scalar(count(node_cpu_seconds_total{mode=\"user\"}))", - "format": "time_series", - "intervalFactor": 10, - "legendFormat": "{{ mode }}", - "metric": "node_cpu_seconds_total", - "refId": "A", - "step": 10 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "CPU Usage", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percent", - "label": null, - "logBase": 1, - "max": 100, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "gridPos": { - "h": 5, - "w": 12, - "x": 0, - "y": 15 - }, - "id": 11, - "isNew": true, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "interrupts", - "color": "#806EB7" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": " irate(node_intr_total[5m])", - "format": "time_series", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "interrupts", - "metric": "node_intr", - "refId": "A", - "step": 10 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Interrupts", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "gridPos": { - "h": 5, - "w": 12, - "x": 12, - "y": 15 - }, - "id": 10, - "isNew": true, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "blocked by I/O", - "color": "#58140C" - } - ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "node_procs_running", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "running", - "metric": "node_procs_running", - "refId": "A", - "step": 10 - }, - { - "expr": "node_procs_blocked", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "blocked by I/O", - "metric": "node_procs_blocked", - "refId": "B", - "step": 10 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Processes", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "decimals": 2, - "editable": true, - "error": false, - "fill": 4, - "grid": {}, - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 20 - }, - "id": 6, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Used", - "color": "#BF1B00" - }, - { - "alias": "Free", - "color": "#7EB26D" - }, - { - "alias": "Buffers", - "color": "#6ED0E0" - }, - { - "alias": "Cached", - "color": "#EF843C" - } - ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "node_memory_MemTotal_bytes - (node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Used", - "refId": "A", - "step": 1 - }, - { - "expr": "node_memory_MemFree_bytes", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Free", - "refId": "B", - "step": 1 - }, - { - "expr": "node_memory_Buffers_bytes", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Buffers", - "refId": "C", - "step": 1 - }, - { - "expr": "node_memory_Cached_bytes", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Cached", - "refId": "D", - "step": 1 - }, - { - "expr": "", - "format": "time_series", - "intervalFactor": 1, - "refId": "E" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Memory Usage", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "decimals": 2, - "editable": true, - "error": false, - "fill": 4, - "grid": {}, - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 26 - }, - "id": 14, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Used", - "color": "#890F02" - }, - { - "alias": "Free", - "color": "#7EB26D" - } - ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "node_memory_SwapTotal_bytes - node_memory_SwapFree_bytes", - "format": "time_series", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "Used", - "refId": "A", - "step": 10 - }, - { - "expr": "node_memory_SwapFree_bytes", - "format": "time_series", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "Free", - "refId": "B", - "step": 10 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Swap Usage", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "decimals": 2, - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "gridPos": { - "h": 6, - "w": 12, - "x": 12, - "y": 26 - }, - "id": 15, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "rate(node_vmstat_pswpin[1m]) * 4096 or irate(node_vmstat_pswpin[5m]) * 4096", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "In", - "refId": "A", - "step": 10 - }, - { - "expr": "rate(node_vmstat_pswpout[1m]) * 4096 or irate(node_vmstat_pswpout[5m]) * 4096", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "Out", - "refId": "B", - "step": 10 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Swap I/O", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "decimals": 2, - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 32 - }, - "id": 7, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "read", - "yaxis": 1 - }, - { - "alias": "written", - "yaxis": 1 - }, - { - "alias": "io time", - "yaxis": 2 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(irate(node_disk_read_bytes_total[1m]))", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "read", - "metric": "node_disk_bytes_read", - "refId": "A", - "step": 1 - }, - { - "expr": "sum(irate(node_disk_written_bytes_total[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "written", - "metric": "node_disk_bytes_written", - "refId": "B", - "step": 1 - }, - { - "expr": "sum(irate(node_disk_io_time_seconds_total[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "io time", - "metric": "node_disk_io_time_ms", - "refId": "C", - "step": 1 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "I/O Usage", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "ms", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "decimals": 2, - "editable": true, - "error": false, - "fill": 4, - "grid": {}, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 38 - }, - "id": 8, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "irate(node_network_receive_bytes_total{device!=\"lo\"}[1m])", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "In: {{ device }}", - "metric": "node_network_receive_bytes", - "refId": "A", - "step": 1 - }, - { - "expr": "irate(node_network_transmit_bytes_total{device!=\"lo\"}[1m])", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Out: {{ device }}", - "metric": "node_network_transmit_bytes", - "refId": "B", - "step": 1 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Network Usage", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "5s", - "schemaVersion": 16, - "style": "dark", - "tags": [ - "system" - ], - "templating": { - "list": [] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "browser", - "title": "Docker - Local Host (Provisioned)", - "uid": "BVaKHOcmz", - "version": 12 -} diff --git a/docker/grafana/docker-entrypoint.sh b/docker/grafana/docker-entrypoint.sh deleted file mode 100644 index 75596a4..0000000 --- a/docker/grafana/docker-entrypoint.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -mkdir -p /var/lib/grafana/dashboards -cp -a /etc/grafana/dashboards/* /var/lib/grafana/dashboards/ -/run.sh diff --git a/docker/grafana/provisioning/dashboards/dashboards.yml b/docker/grafana/provisioning/dashboards/dashboards.yml deleted file mode 100644 index fd042f5..0000000 --- a/docker/grafana/provisioning/dashboards/dashboards.yml +++ /dev/null @@ -1,6 +0,0 @@ -- name: 'default' - org_id: 1 - folder: '' - type: 'file' - options: - path: '/var/lib/grafana/dashboards' ## Contains dashboards host.json and containers.json diff --git a/docker/grafana/provisioning/datasources/datasources.tmpl b/docker/grafana/provisioning/datasources/datasources.tmpl deleted file mode 100644 index 741c8b7..0000000 --- a/docker/grafana/provisioning/datasources/datasources.tmpl +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: 1 - -datasources: - - - name: 'Prometheus' - type: 'prometheus' - access: 'proxy' - org_id: 1 - url: 'http://prometheus:9090' - is_default: true - version: 1 - editable: true - - - name: "AWS_Cloudwatch" - type: cloudwatch - jsonData: - authType: keys - defaultRegion: eu-west-1 - secureJsonData: - accessKey: "AWS_ACCESS_KEY" - secretKey: "AWS_SECRET_KEY" - - - name: MySQL - type: mysql - url: mysql:3306 - database: MYSQL_GRAFANA_DB - user: MYSQL_GRAFANA_USER - password: MYSQL_GRAFANA_PASSWORD - - diff --git a/docker/httpd/alpine/Dockerfile b/docker/httpd/alpine/Dockerfile deleted file mode 100644 index 1133158..0000000 --- a/docker/httpd/alpine/Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -FROM httpd:alpine as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR -ARG HTTPD_LOAD_MODULE="env expires headers lbmethod_bybusyness lbmethod_byrequests proxy proxy_balancer proxy_fcgi proxy_http setenvif slotmem_shm reqtimeout rewrite" -ARG HTTPD_CONF_EXTRA="default info mpm vhosts" - -RUN sed -E -i \ - -e 's!^#?\s*(LoadModule ('${HTTPD_LOAD_MODULE// /|}')_module modules/mod_('${HTTPD_LOAD_MODULE// /|}').so)\s*!\1!g' \ - -e 's!^#?\s*(Include conf/extra/httpd-('${HTTPD_CONF_EXTRA// /|}').conf)\s*!\1!g' \ - "$HTTPD_PREFIX/conf/httpd.conf"; - -COPY ${DOCKER_BUILD_DIR}/docker-entrypoint.sh / -COPY ${DOCKER_BUILD_DIR}/httpd-vhosts.ctmpl /usr/local/apache2/conf/extra/ -COPY --from=hashicorp/consul-template:alpine /bin/consul-template /usr/local/bin/ - -WORKDIR /var/www - -ENTRYPOINT ["/docker-entrypoint.sh"] -CMD /usr/local/bin/consul-template -log-level info -consul-addr consul:8500 -template "/usr/local/apache2/conf/extra/httpd-vhosts.ctmpl:/usr/local/apache2/conf/extra/httpd-vhosts.conf" -exec "/usr/local/bin/httpd-foreground" - -EXPOSE 80/tcp - -FROM dist as master -ARG DOCKER_BUILD_DIR diff --git a/docker/httpd/alpine/docker-entrypoint.sh b/docker/httpd/alpine/docker-entrypoint.sh deleted file mode 100755 index 2343feb..0000000 --- a/docker/httpd/alpine/docker-entrypoint.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -set -euo pipefail -set -o errexit - -trap 'kill -SIGQUIT $PID' INT - -# Launch httpd -[ $# -eq 0 ] && httpd-foreground || exec "$@" & -PID=$! && wait diff --git a/docker/httpd/alpine/httpd-vhosts.ctmpl b/docker/httpd/alpine/httpd-vhosts.ctmpl deleted file mode 100644 index f2b2304..0000000 --- a/docker/httpd/alpine/httpd-vhosts.ctmpl +++ /dev/null @@ -1,21 +0,0 @@ -{{ $serverName := printf "%s.%s.%s" (env "ENV") (env "APP") (env "USER") }} -{{ $serviceName := printf "%s-%s-%s-php-9000" (env "USER") (env "APP") (env "ENV") }} - - ServerAdmin support+apache@asycn.io - DocumentRoot "/var/www/web" - ServerName {{ $serverName }} - ServerAlias * - - SetHandler "proxy:balancer://php/" - - -{{ range service $serviceName }} BalancerMember "fcgi://{{ .Address }}:{{ .Port }}/" disablereuse=On timeout=900 -{{ end }} ProxySet lbmethod=bybusyness - - - AllowOverride All - CGIPassAuth On - Options +FollowSymLinks - Require all granted - - diff --git a/docker/ipfs/Dockerfile b/docker/ipfs/Dockerfile deleted file mode 100644 index 9abb128..0000000 --- a/docker/ipfs/Dockerfile +++ /dev/null @@ -1,49 +0,0 @@ -ARG IPFS_VERSION=0.32.1 -FROM ipfs/kubo:v${IPFS_VERSION} AS dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR - -RUN sed -i 's!repo="$IPFS_PATH"!repo="$IPFS_PATH" \&\& mkdir -p "$IPFS_PATH" \&\& chown ipfs:users $(dirname "$IPFS_PATH") \&\& chown ipfs:users "$IPFS_PATH"!' /usr/local/bin/start_ipfs -COPY ${DOCKER_BUILD_DIR}/*.sh /container-init.d/ -RUN chmod +rx /container-init.d/*.sh - -HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ - CMD ipfs --api=$(cat $IPFS_PATH/api) dag stat /ipfs/QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn || exit 1 - -FROM dist AS master -ARG DOCKER_BUILD_DIR -ARG UID -ENV UID=${UID} -ENV USER=ipfs - -# If we provide a numeric UID -RUN if [ "${UID}" -eq "${UID}" ] 2>/dev/null; then \ - # Force $UID of $USER if it exists - if [ "$(awk -F: '$1 == "'"${USER}"'" {print $3}' /etc/passwd)" != "${UID}" ]; then \ - sed -i 's/^\('"${USER}"':x\):[0-9]\+:/\1:'"${UID}"':/' /etc/passwd; \ - fi; \ - # Create $USER if $UID does not exist - if [ "$(awk -F: '$3 == "'"${UID}"'" {print $1}' /etc/passwd)" = "" ]; then \ - echo "${USER}:x:${UID}:${GID:-${UID}}::/home/${USER}:${SHELL:-/bin/sh}" >> /etc/passwd; \ - echo "${USER}:\!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \ - mkdir -p /home/"${USER}"; \ - fi; \ - chown "${UID}" $(awk -F: '$1 == "'"${USER}"'" {print $(NF-1)}' /etc/passwd); \ -fi - -# If we provide a numeric GID -RUN if [ "${GID}" -eq "${GID}" ] 2>/dev/null; then \ - # Force $GID of $GROUP if it already exists - if [ "$(awk -F: '$1 == "'"${GROUP}"'" {print $3}' /etc/group)" != "${GID}" ]; then \ - sed -i 's/^\('"${GROUP}"':x\):[0-9]\+:/\1:'"${GID}"':/' /etc/group; \ - fi; \ - # Create $GROUP if $GID does not exist - if [ "$(awk -F: '$3 == "'"${GID}"'" {print $1}' /etc/group)" = "" ]; then \ - echo "${GROUP}:x:${GID}:" >> /etc/group; \ - fi; \ - # Force $GID of $USER if it exists - if [ "$(awk -F: '$1 == "'"${USER}"'" {print $4}' /etc/passwd)" != "${GID}" ]; then \ - sed -i 's/^\('"${USER}"':x:[0-9]\+\):[0-9]\+:/\1:'"${GID}"':/' /etc/passwd; \ - fi; \ - chgrp "${GID}" $(awk -F: '$1 == "'"${USER}"'" {print $(NF-1)}' /etc/passwd); \ -fi diff --git a/docker/ipfs/ipfs-config.sh b/docker/ipfs/ipfs-config.sh deleted file mode 100755 index 60b64cf..0000000 --- a/docker/ipfs/ipfs-config.sh +++ /dev/null @@ -1,201 +0,0 @@ -#!/bin/sh -[ -n "${DEBUG:-}" -a "${DEBUG:-}" != "false" ] && set -x -set -e - -## fix resource manager fatal error on arm64/linux with 2Gb RAM -# ipfs config --json Swarm.ResourceMgr.Enabled false -# ERROR p2pnode libp2p/rcmgr_defaults.go:107 ===> OOF! go-libp2p changed DefaultServiceLimits - -# apply migration -if [ "${IPFS_REPO_MIGRATE}" = "true" ]; then ipfs repo stat >/dev/null || ipfs repo migrate; fi - -# set ipfs peer id -[ -n "${IPFS_IDENTITY_PEERID}" ] && [ -n "${IPFS_IDENTITY_PRIVKEY}" ] \ - && sed -i 's/"PeerID":.*/"PeerID": "'"${IPFS_IDENTITY_PEERID}"'",/;s/"PrivKey":.*/"PrivKey": "'"${IPFS_IDENTITY_PRIVKEY}"'"/' "${IPFS_PATH}/config" \ - || true - -# apply ipfs profile -[ -n "${IPFS_PROFILE}" ] && for profile in ${IPFS_PROFILE}; do ipfs config profile apply "${profile}"; done - -## ipfs client needs API address -# search for ip address of $(hostname).${IPFS_ADDRESSES_API_DOMAIN} -[ -n "${IPFS_ADDRESSES_API_DOMAIN}" ] && [ -z "${IPFS_ADDRESSES_API_INET4}" ] \ - && IPFS_ADDRESSES_API_INET4=$(nslookup -type=A -timeout=1 "$(hostname).${IPFS_ADDRESSES_API_DOMAIN}" |awk 'found && /^Address:/ {print $2; found=0}; /^Name:\t'"$(hostname).${IPFS_ADDRESSES_API_DOMAIN}"'/ {found=1};') -# check ${IPFS_ADDRESSES_API_INET4} format -echo "${IPFS_ADDRESSES_API_INET4}" |awk -F. '{ for ( i=1; i<=4; i++ ) if ($i >= 0 && $i <= 255); else exit 1;}; NF != 4 {exit 1;}' || unset IPFS_ADDRESSES_API_INET4 -# check ${IPFS_ADDRESSES_API_PORT} format -[ "${IPFS_ADDRESSES_API_PORT}" -eq "${IPFS_ADDRESSES_API_PORT}" ] 2>/dev/null && [ "${IPFS_ADDRESSES_API_PORT}" -ge 1 ] && [ "${IPFS_ADDRESSES_API_PORT}" -le 65535 ] \ - || unset IPFS_ADDRESSES_API_PORT -ipfs config Addresses.Api "${IPFS_ADDRESSES_API:-/ip4/${IPFS_ADDRESSES_API_INET4:-127.0.0.1}/tcp/${IPFS_ADDRESSES_API_PORT:-5001}}" - -## gateway address -# search for ip address of $(hostname).${IPFS_ADDRESSES_GATEWAY_DOMAIN} -[ -n "${IPFS_ADDRESSES_GATEWAY_DOMAIN}" ] && [ -z "${IPFS_ADDRESSES_GATEWAY_INET4}" ] \ - && IPFS_ADDRESSES_GATEWAY_INET4=$(nslookup -type=A -timeout=1 "$(hostname).${IPFS_ADDRESSES_GATEWAY_DOMAIN}" |awk 'found && /^Address:/ {print $2; found=0}; /^Name:\t'"$(hostname).${IPFS_ADDRESSES_GATEWAY_DOMAIN}"'/ {found=1};') -# check ${IPFS_ADDRESSES_GATEWAY_INET4} format -echo "${IPFS_ADDRESSES_GATEWAY_INET4}" |awk -F. '{ for ( i=1; i<=4; i++ ) if ($i >= 0 && $i <= 255); else exit 1;}; NF != 4 {exit 1;}' || unset IPFS_ADDRESSES_GATEWAY_INET4 -# check ${IPFS_ADDRESSES_GATEWAY_PORT} format -[ "${IPFS_ADDRESSES_GATEWAY_PORT}" -eq "${IPFS_ADDRESSES_GATEWAY_PORT}" ] 2>/dev/null && [ "${IPFS_ADDRESSES_GATEWAY_PORT}" -ge 1 ] && [ "${IPFS_ADDRESSES_GATEWAY_PORT}" -le 65535 ] \ - || unset IPFS_ADDRESSES_GATEWAY_PORT -ipfs config Addresses.Gateway "${IPFS_ADDRESSES_GATEWAY:-/ip4/${IPFS_ADDRESSES_GATEWAY_INET4:-127.0.0.1}/tcp/${IPFS_ADDRESSES_GATEWAY_PORT:-8080}}" - -[ -n "${IPFS_ADDRESSES_SWARM}" ] && ipfs config --json Addresses.Swarm "${IPFS_ADDRESSES_SWARM}" -[ -n "${IPFS_ADDRESSES_ANNOUNCE}" ] && ipfs config --json Addresses.Announce "${IPFS_ADDRESSES_ANNOUNCE}" -[ -n "${IPFS_ADDRESSES_APPENDANNOUNCE}" ] && ipfs config --json Addresses.AppendAnnounce "${IPFS_ADDRESSES_APPENDANNOUNCE}" -[ -n "${IPFS_ADDRESSES_NOANNOUNCE}" ] && ipfs config --json Addresses.NoAnnounce "${IPFS_ADDRESSES_NOANNOUNCE}" - -## api http headers -[ -n "${IPFS_API_HTTPHEADERS}${IPFS_API_HTTPHEADERS_ACA_CREDENTIALS}${IPFS_API_HTTPHEADERS_ACA_HEADERS}${IPFS_API_HTTPHEADERS_ACA_METHODS}${IPFS_API_HTTPHEADERS_ACA_ORIGIN}" ] \ - && ipfs config --json API.HTTPHeaders "${IPFS_API_HTTPHEADERS:-{ -\"Access-Control-Allow-Credentials\": ${IPFS_API_HTTPHEADERS_ACA_CREDENTIALS:-null}, -\"Access-Control-Allow-Headers\": ${IPFS_API_HTTPHEADERS_ACA_HEADERS:-null}, -\"Access-Control-Allow-Methods\": ${IPFS_API_HTTPHEADERS_ACA_METHODS:-null}, -\"Access-Control-Allow-Origin\": ${IPFS_API_HTTPHEADERS_ACA_ORIGIN:-null} -}}" - -## api authorizations: "Bob": { "AuthSecret": "bearer:secret-token123", "AllowedPaths": ["/api/v0"] } -[ -n "${IPFS_API_AUTHORIZATIONS}" ] && ipfs config --json API.Authorizations "${IPFS_API_AUTHORIZATIONS}" - -## autonat service -[ -n "$IPFS_AUTONAT$IPFS_AUTONAT_SERVICEMODE$IPFS_AUTONAT_THROTTLE$IPFS_AUTONAT_THROTTLE_GLOBALLIMIT$IPFS_AUTONAT_THROTTLE_PEERLIMIT$IPFS_AUTONAT_THROTTLE_INTERVAL" ] \ - && ipfs config --json AutoNAT "${IPFS_AUTONAT:-{ -\"ServiceMode\": ${IPFS_AUTONAT_SERVICEMODE:-null}, -\"Throttle\": ${IPFS_AUTONAT_THROTTLE:-{ - \"GlobalLimit\": ${IPFS_AUTONAT_THROTTLE_GLOBALLIMIT:-null}, - \"PeerLimit\": ${IPFS_AUTONAT_THROTTLE_PEERLIMIT:-null}, - \"Interval\": \"${IPFS_AUTONAT_THROTTLE_INTERVAL:-null}\" - } -}}" - -## auto tls -[ -n "$IPFS_AUTOTLS$IPFS_AUTOTLS_ENABLED$IPFS_AUTOTLS_DOMAINSUFFIX$IPFS_AUTOTLS_REGISTRATIONENDPOINT$IPFS_AUTOTLS_REGISTRATIONTOKEN$IPFS_AUTOTLS_CAENDPOINT" ] \ - && ipfs config --json AutoNAT "${IPFS_AUTOTLS:-{ -\"Enabled\": ${IPFS_AUTOTLS_ENABLED:-null}, -\"DomainSuffix\": ${IPFS_AUTOTLS_DOMAINSUFFIX:-null}, -\"RegistrationEndpoint\": ${IPFS_AUTOTLS_REGISTRATIONENDPOINT:-null}, -\"RegistrationToken\": ${IPFS_AUTOTLS_REGISTRATIONTOKEN:-null}, -\"CAEndpoint\": ${IPFS_AUTOTLS_CAENDPOINT:-null} -}}" - -## bootstrap -[ -n "${IPFS_BOOTSTRAP}" ] && ipfs config --json Bootstrap "${IPFS_BOOTSTRAP}" - -## storage -# limit disk usage to xx/percent of disk size -diskSize=$(df -P ${IPFS_PATH:-~/.ipfs} | awk 'NR>1{size+=$2}END{print size}') -ipfs config Datastore.StorageMax "$((diskSize * ${IPFS_DATASTORE_DISKUSAGE:-50}/100))" -# garbage collector is declenched over xx/percent of available disk used -[ -n "${IPFS_DATASTORE_STORAGEGCWATERMARK}" ] && ipfs config Datastore.StorageGCWatermark "${IPFS_DATASTORE_STORAGEGCWATERMARK}" -# automatic garbage collector run every time period -[ -n "${IPFS_DATASTORE_GCPERIOD}" ] && ipfs config Datastore.GCPeriod "${IPFS_DATASTORE_GCPERIOD}" -[ -n "${IPFS_DATASTORE_HASHONREAD}" ] && ipfs config --bool Datastore.HashOnRead "${IPFS_DATASTORE_HASHONREAD}" -[ -n "${IPFS_DATASTORE_BLOOMFILTERSIZE}" ] && ipfs config --json Datastore.BloomFilterSize "${IPFS_DATASTORE_BLOOMFILTERSIZE}" -[ -n "${IPFS_DATASTORE_SPEC}" ] && ipfs config --json Datastore.Spec "${IPFS_DATASTORE_SPEC}" - -## ALLOW AUTO DISCOVERY ON DOCKER NETWORK -[ -n "${IPFS_DISCOVERY_MDNS_ENABLED}" ] && ipfs config --bool Discovery.MDNS.Enabled "${IPFS_DISCOVERY_MDNS_ENABLED}" -[ -n "${IPFS_DOCKER_NETWORK}" ] && ipfs config --json Addresses.NoAnnounce "$(ipfs config Addresses.NoAnnounce |sed '/"${IPFS_DOCKER_NETWORK}"/d')" - -## serve only local content -[ -n "${IPFS_GATEWAY_NOFETCH}" ] && ipfs config --bool Gateway.NoFetch "${IPFS_GATEWAY_NOFETCH}" -## redirect content with TXT DNS link prefix -[ -n "${IPFS_GATEWAY_NODNSLINK}" ] && ipfs config --bool Gateway.NoDNSLink "${IPFS_GATEWAY_NODNSLINK}" -## false = trustless gateway -[ -n "${IPFS_GATEWAY_DESERIALIZEDRESPONSES}" ] && ipfs config --json Gateway.DeserializedResponses "${IPFS_GATEWAY_DESERIALIZEDRESPONSES}" -## pretty html errors -[ -n "${IPFS_GATEWAY_DISABLEHTMLERRORS}" ] && ipfs config --json Gateway.DisableHTMLErrors "${IPFS_GATEWAY_DISABLEHTMLERRORS}" -## someguy -[ -n "${IPFS_GATEWAY_EXPOSEROUTINGAPI}" ] && ipfs config --json Gateway.ExposeRoutingAPI "${IPFS_GATEWAY_EXPOSEROUTINGAPI}" -## gateway http headers -[ -n "${IPFS_GATEWAY_HTTPHEADERS}${IPFS_GATEWAY_HTTPHEADERS_ACA_CREDENTIALS}${IPFS_GATEWAY_HTTPHEADERS_ACA_HEADERS}${IPFS_GATEWAY_HTTPHEADERS_ACA_METHODS}${IPFS_GATEWAY_HTTPHEADERS_ACA_ORIGIN}" ] \ - && ipfs config --json Gateway.HTTPHeaders "${IPFS_GATEWAY_HTTPHEADERS:-{ -\"Access-Control-Allow-Credentials\": ${IPFS_GATEWAY_HTTPHEADERS_ACA_CREDENTIALS:-null}, -\"Access-Control-Allow-Headers\": ${IPFS_GATEWAY_HTTPHEADERS_ACA_HEADERS:-null}, -\"Access-Control-Allow-Methods\": ${IPFS_GATEWAY_HTTPHEADERS_ACA_METHODS:-null}, -\"Access-Control-Allow-Origin\": ${IPFS_GATEWAY_HTTPHEADERS_ACA_ORIGIN:-null} -}}" -## redirect / -[ -n "${IPFS_GATEWAY_ROOTREDIRECT}" ] && ipfs config Gateway.RootRedirect "${IPFS_GATEWAY_ROOTREDIRECT}" -## public gateways: { "localhost": { "Paths": ["/ipfs", "/ipns"], "UseSubdomains": true } } -[ -n "${IPFS_GATEWAY_PUBLICGATEWAYS}" ] && ipfs config --json Gateway.PublicGateways "${IPFS_GATEWAY_PUBLICGATEWAYS}" - -## ipns -[ -n "${IPFS_IPNS_REPUBLISHPERIOD}" ] && ipfs config Ipns.RepublishPeriod "${IPFS_IPNS_REPUBLISHPERIOD}" -[ -n "${IPFS_IPNS_RECORDLIFETIME}" ] && ipfs config Ipns.RecordLifetime "${IPFS_IPNS_RECORDLIFETIME}" -[ -n "${IPFS_IPNS_RESOLVECACHESIZE}" ] && ipfs config Ipns.ResolveCacheSize "${IPFS_IPNS_RESOLVECACHESIZE}" -[ -n "${IPFS_IPNS_MAXCACHETTL}" ] && ipfs config Ipns.MaxCacheTTL "${IPFS_IPNS_MAXCACHETTL}" -[ -n "${IPFS_IPNS_USEPUBSUB}" ] && ipfs config --json Ipns.UsePubsub "${IPFS_IPNS_USEPUBSUB}" - -## pinning -[ -n "${IPFS_PINNING_REMOTESERVICES}" ] && ipfs config --json Pinning.RemoteServices "${IPFS_PINNING_REMOTESERVICES}" - -## peering :) -[ -n "${IPFS_PEERING_PEERS}" ] && ipfs config --json Peering.Peers "${IPFS_PEERING_PEERS}" - -## reproviding local content to routing system -[ -n "${IPFS_REPROVIDER_INTERVAL}" ] && ipfs config Reprovider.Interval "${IPFS_REPROVIDER_INTERVAL}" -[ -n "${IPFS_REPROVIDER_STRATEGY}" ] && ipfs config Reprovider.Strategy "${IPFS_REPROVIDER_STRATEGY}" - -## routing -[ -n "${IPFS_ROUTING_TYPE}" ] && ipfs config Routing.Type "${IPFS_ROUTING_TYPE}" -[ -n "${IPFS_ROUTING_ACCELERATEDDHTCLIENT}" ] && ipfs config --json Routing.AcceleratedDHTClient "${IPFS_ROUTING_ACCELERATEDDHTCLIENT}" -[ -n "${IPFS_ROUTING_LOOPBACKADDRESSESONLANDHT}" ] && ipfs config --bool Routing.LoopbackAddressesOnLanDHT "${IPFS_ROUTING_LOOPBACKADDRESSESONLANDHT}" -[ -n "${IPFS_ROUTING_METHODS}" ] && ipfs config --json Routing.Methods "${IPFS_ROUTING_METHODS}" -[ -n "${IPFS_ROUTING_ROUTERS}" ] && ipfs config --json Routing.Routers "${IPFS_ROUTING_ROUTERS}" - -## swarm config -[ -n "${IPFS_SWARM_ADDRFILTERS}" ] && ipfs config --json Swarm.AddrFilters "${IPFS_SWARM_ADDRFILTERS}" -[ -n "${IPFS_DOCKER_NETWORK}" ] && ipfs config --json Swarm.AddrFilters "$(ipfs config Swarm.AddrFilters |sed '/${IPFS_DOCKER_NETWORK}"/d')" -[ -n "${IPFS_SWARM_DISABLEBANDWIDTHMETRICS}" ] && ipfs config --bool Swarm.DisableBandwidthMetrics "${SWARM_DISABLEBANDWIDTHMETRICS}" -[ -n "${IPFS_SWARM_DISABLENATPORTMAP}" ] && ipfs config --bool Swarm.DisableNatPortMap "${SWARM_DISABLENATPORTMAP}" -[ -n "${IPFS_SWARM_ENABLEHOLEPUNCHING}" ] && ipfs config --json Swarm.EnableHolePunching "${SWARM_ENABLEHOLEPUNCHING}" -[ -n "${IPFS_SWARM_RELAYCLIENT_ENABLED}" ] && ipfs config --json Swarm.RelayClient.Enabled "${SWARM_RELAYCLIENT_ENABLED}" -[ -n "${IPFS_SWARM_RELAYCLIENT_STATICRELAYS}" ] && ipfs config --json Swarm.RelayClient.StaticRelays "${SWARM_RELAYCLIENT_STATICRELAYS}" -[ -n "${IPFS_SWARM_RELAYSERVICE_ENABLED}" ] && ipfs config --json Swarm.RelayService.Enabled "${SWARM_RELAYSERVICE_ENABLED}" -[ -n "${IPFS_SWARM_RELAYSERVICE_LIMIT}" ] && ipfs config --json Swarm.RelayService.Limit "${SWARM_RELAYSERVICE_LIMIT}" -[ -n "${IPFS_SWARM_RELAYSERVICE_CONNECTIONDURATIONLIMIT}" ] && ipfs config Swarm.RelayService.ConnectionDurationLimit "${SWARM_RELAYSERVICE_CONNECTIONDURATIONLIMIT}" -[ -n "${IPFS_SWARM_RELAYSERVICE_CONNECTIONDATALIMIT}" ] && ipfs config Swarm.RelayService.ConnectionDataLimit "${SWARM_RELAYSERVICE_CONNECTIONDATALIMIT}" -[ -n "${IPFS_SWARM_RELAYSERVICE_RESERVATIONTTL}" ] && ipfs config Swarm.RelayService.ConnectionDataLimit "${SWARM_RELAYSERVICE_RESERVATIONTTL}" -[ -n "${IPFS_SWARM_RELAYSERVICE_MAXRESERVATIONS}" ] && ipfs config Swarm.RelayService.MaxReservations "${SWARM_RELAYSERVICE_MAXRESERVATIONS}" -[ -n "${IPFS_SWARM_RELAYSERVICE_MAXCIRCUITS}" ] && ipfs config Swarm.RelayService.MaxCircuits "${SWARM_RELAYSERVICE_MAXCIRCUITS}" -[ -n "${IPFS_SWARM_RELAYSERVICE_BUFFERSIZE}" ] && ipfs config Swarm.RelayService.BufferSize "${SWARM_RELAYSERVICE_BUFFERSIZE}" -[ -n "${IPFS_SWARM_RELAYSERVICE_MAXRESERVATIONSPERASN}" ] && ipfs config Swarm.RelayService.MaxReservationsPerASN "${SWARM_RELAYSERVICE_MAXRESERVATIONSPERASN}" -[ -n "${IPFS_SWARM_RELAYSERVICE_MAXRESERVATIONSPERIP}" ] && ipfs config Swarm.RelayService.MaxReservationsPerIp "${SWARM_RELAYSERVICE_MAXRESERVATIONSPERIP}" -[ -n "${IPFS_SWARM_CONNMGR_TYPE}" ] && ipfs config Swarm.ConnMgr.Type "${IPFS_SWARM_CONNMGR_TYPE}" -[ -n "${IPFS_SWARM_CONNMGR_HIGHWATER}" ] && ipfs config Swarm.ConnMgr.HighWater "${IPFS_SWARM_CONNMGR_HIGHWATER}" -[ -n "${IPFS_SWARM_CONNMGR_LOWWATER}" ] && ipfs config Swarm.ConnMgr.LowWater "${IPFS_SWARM_CONNMGR_LOWWATER}" -[ -n "${IPFS_SWARM_CONNMGR_GRACEPERIOD}" ] && ipfs config Swarm.ConnMgr.GracePeriod "${IPFS_SWARM_CONNMGR_GRACEPERIOD}" -[ -n "${IPFS_SWARM_RESOURCEMGR_ENABLED}" ] && ipfs config --json Swarm.ResourceMgr.Enabled "${IPFS_SWARM_RESOURCEMGR_ENABLED}" -[ -n "${IPFS_SWARM_RESOURCEMGR_MAXMEMORY}" ] && ipfs config Swarm.ResourceMgr.MaxMemory "${IPFS_SWARM_RESOURCEMGR_MAXMEMORY}" -[ -n "${IPFS_SWARM_RESOURCEMGR_MAXFILEDESCRIPTORS}" ] && ipfs config Swarm.ResourceMgr.MaxFileDescriptors "${IPFS_SWARM_RESOURCEMGR_MAXFILEDESCRIPTORS}" -[ -n "${IPFS_SWARM_RESOURCEMGR_ALLOWLIST}" ] && ipfs config --json Swarm.ResourceMgr.Allowlist "${IPFS_SWARM_RESOURCEMGR_ALLOWLIST}" - -## swarm transports -[ -n "${IPFS_SWARM_TRANSPORTS_NETWORK_TCP}" ] && ipfs config --json Swarm.Transports.Network.TCP "${SWARM_TRANSPORTS_NETWORK_TCP}" -[ -n "${IPFS_SWARM_TRANSPORTS_NETWORK_WEBSOCKET}" ] && ipfs config --json Swarm.Transports.Network.Websocket "${SWARM_TRANSPORTS_NETWORK_WEBSOCKET}" -[ -n "${IPFS_SWARM_TRANSPORTS_NETWORK_QUIC}" ] && ipfs config --json Swarm.Transports.Network.QUIC "${SWARM_TRANSPORTS_NETWORK_QUIC}" -[ -n "${IPFS_SWARM_TRANSPORTS_NETWORK_RELAY}" ] && ipfs config --json Swarm.Transports.Network.Relay "${SWARM_TRANSPORTS_NETWORK_RELAY}" -[ -n "${IPFS_SWARM_TRANSPORTS_NETWORK_WEBTRANSPORT}" ] && ipfs config --json Swarm.Transports.Network.WebTransport "${SWARM_TRANSPORTS_NETWORK_WEBTRANSPORT}" -[ -n "${IPFS_SWARM_TRANSPORTS_NETWORK_WEBRTCDIRECT}" ] && ipfs config --json Swarm.Transports.Network.WebRTCDirect "${SWARM_TRANSPORTS_NETWORK_WEBRTCDIRECT}" -[ -n "${IPFS_SWARM_TRANSPORTS_NETWORK_WEBRTCDIRECT}" ] && ipfs config --json Swarm.Transports.Network.WebRTCDirect "${SWARM_TRANSPORTS_NETWORK_WEBRTCDIRECT}" -[ -n "${IPFS_SWARM_TRANSPORTS_SECURITY_TLS}" ] && ipfs config Swarm.Transports.Security.TLS "${SWARM_TRANSPORTS_SECURITY_TLS}" -[ -n "${IPFS_SWARM_TRANSPORTS_SECURITY_NOISE}" ] && ipfs config Swarm.Transports.Security.Noise "${SWARM_TRANSPORTS_SECURITY_NOISE}" -[ -n "${IPFS_SWARM_TRANSPORTS_MULTIPLEXERS_YAMUX}" ] && ipfs config Swarm.Transports.Multiplexers.Yamux "${SWARM_TRANSPORTS_MULTIPLEXERS_YAMUX}" - -## dns -[ -n "${IPFS_DNS_RESOLVERS}" ] && ipfs config --json DNS.Resolvers "${IPFS_DNS_RESOLVERS}" -[ -n "${IPFS_DNS_MAXCACHETTL}" ] && ipfs config DNS.MaxCacheTTL "${IPFS_DNS_MAXCACHETTL}" - -## experimental features -[ -n "${IPFS_EXPERIMENTAL_FILESTOREENABLED}" ] && ipfs config --json Experimental.FilestoreEnabled "${IPFS_EXPERIMENTAL_FILESTOREENABLED}" -[ -n "${IPFS_EXPERIMENTAL_URLSTOREENABLED}" ] && ipfs config --json Experimental.UrlstoreEnabled "${IPFS_EXPERIMENTAL_URLSTOREENABLED}" -[ -n "${IPFS_EXPERIMENTAL_URLSTORE}" ] && ipfs urlstore add "${IPFS_EXPERIMENTAL_URLSTORE}" -[ -n "${IPFS_EXPERIMENTAL_LIBP2PSTREAMMOUNTING}" ] && ipfs config --json Experimental.Libp2pStreamMounting "${IPFS_EXPERIMENTAL_LIBP2PSTREAMMOUNTING}" -[ -n "${IPFS_EXPERIMENTAL_P2PHTTPPROXY}" ] && ipfs config --json Experimental.P2pHttpProxy "${IPFS_EXPERIMENTAL_P2PHTTPPROXY}" -[ -n "${IPFS_EXPERIMENTAL_STRATEGICPROVIDING}" ] && ipfs config --json Experimental.StrategicProviding "${IPFS_EXPERIMENTAL_STRATEGICPROVIDING}" -[ -n "${IPFS_EXPERIMENTAL_OPTIMISTICPROVIDE}" ] && ipfs config --json Experimental.OptimisticProvide "${IPFS_EXPERIMENTAL_OPTIMISTICPROVIDE}" -[ -n "${IPFS_EXPERIMENTAL_GATEWAYOVERLIBP2P}" ] && ipfs config --json Experimental.GatewayOverLibp2p "${IPFS_EXPERIMENTAL_GATEWAYOVERLIBP2P}" - -## REMOVE IPFS BOOTSTRAP for private usage -[ ${IPFS_NETWORK:-public} = "public" ] || ipfs bootstrap rm --all -[ ${IPFS_NETWORK:-public} = "private" ] && export LIBP2P_FORCE_PNET=1 ||: diff --git a/docker/myos/.bash_profile b/docker/myos/.bash_profile deleted file mode 100644 index ebf1f8b..0000000 --- a/docker/myos/.bash_profile +++ /dev/null @@ -1,19 +0,0 @@ -# shellcheck shell=bash source=/dev/null -# ~/.bash_profile: executed by the command interpreter for bash login shell. - -# bash-completion -if ! shopt -oq posix && [ -z "${BASH_COMPLETION_VERSINFO-}" ]; then - if [ "${BASH_VERSINFO[0]}" -gt 4 ] \ - || { [ "${BASH_VERSINFO[0]}" -eq 4 ] && [ "${BASH_VERSINFO[1]}" -ge 1 ] ;}; then - shopt -q progcomp && for file in \ - /{*/local,usr}/share/bash-completion/bash_completion \ - /etc/bash_completion; do - [ -r "$file" ] && . "$file" - done - fi - if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion" ]; then - . "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion" - fi -fi - -[ -f ~/.sh_profile ] && . ~/.sh_profile diff --git a/docker/myos/.screenrc b/docker/myos/.screenrc deleted file mode 100644 index 344dec4..0000000 --- a/docker/myos/.screenrc +++ /dev/null @@ -1,3 +0,0 @@ -hardstatus alwayslastline "%{= kw}[%{G}%H%{-}] \# %?%-Lw%?[%{G}%n%f %t%{-}]%?%+Lw%?%?%=%-17< [%{B}%l%{-}]" -defscrollback 1048576 -shell -$SHELL diff --git a/docker/myos/.sh_profile b/docker/myos/.sh_profile deleted file mode 100644 index 0506b86..0000000 --- a/docker/myos/.sh_profile +++ /dev/null @@ -1,39 +0,0 @@ -# shellcheck shell=sh source=/dev/null -# ~/.sh_profile: executed by the command interpreter for login shells. - -# source ~/.*aliases and ~/.*functions files -for source in aliases functions; do - for file in "$HOME"/.*"$source"; do - [ -f "$file" ] || continue - # remove $HOME/. prefix from file - file="${file#${HOME}/.}" - # remove _$source suffix from $file - command="${file%_$source}" - # source file if command exists, ie ~/.bash_aliases - command -v "$command" >/dev/null 2>&1 && . "${HOME}/.$file" - # remove $source suffix from $file, ie ~/.aliases - command="${file%$source}" - # source file if command empty, ie ~/.aliases - [ -z "$command" ] && . "${HOME}/.$file" - done -done - -# source ~/.*shrc -for file in "$HOME"/.*shrc; do - [ -f "$file" ] || continue - # remove $HOME/. prefix from file - file="${file#${HOME}/.}" - # source file if match current shell - [ "$(basename "${SHELL}")" = "${file%rc}" ] && . "${HOME}/.$file" -done - -# set PATH to include user's bin -for path in /*/local/sbin /*/local/bin /*/local/*/bin "${HOME}"/.*/bin; do - [ -d "$path" ] || continue - case ":${PATH}:" in - *:"$path":*) ;; - *) export PATH="${path}:$PATH" ;; - esac -done - -[ -f ~/.profile ] && . ~/.profile diff --git a/docker/myos/.shrc b/docker/myos/.shrc deleted file mode 100644 index 6ffc0a6..0000000 --- a/docker/myos/.shrc +++ /dev/null @@ -1,5 +0,0 @@ -export EDITOR=vim -export GIT_PS1_SHOWUPSTREAM=auto -export GIT_PS1_SHOWDIRTYSTATE=true -export GIT_PS1_HIDE_IF_PWD_IGNORED=true -export PAGER=less diff --git a/docker/myos/.tmux.conf b/docker/myos/.tmux.conf deleted file mode 100644 index 5957741..0000000 --- a/docker/myos/.tmux.conf +++ /dev/null @@ -1,32 +0,0 @@ -# this is aya's tmux configuration ! -bind r source-file ~/.tmux.conf\; display-message "tmux.conf reloaded!" -bind R move-window -r -bind C-n switch-client -n\; refresh-client -S -bind C-p switch-client -p\; refresh-client -S -bind Escape copy-mode -bind Y run "tmux save-buffer - |xsel -i" -bind P run "xsel -o |tmux load-buffer -; tmux paste-buffer" -bind C-c run "tmux save-buffer - | xclip -i -sel clipboard >/dev/null" -bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer" -bind -n S-down new-window -bind -n S-left prev -bind -n S-right next -bind -n C-left swap-window -t -1 -bind -n C-right swap-window -t +1 -set -g aggressive-resize on -set -g status-keys vi -setw -g mode-keys vi -setw -g window-status-current-bg blue -setw -g window-status-current-fg white -setw -g monitor-activity on -set -g visual-activity on -setw -g automatic-rename on -set -g default-terminal "screen" -set -g history-limit 4242 -set -g status-bg black -set -g status-fg white -set -g status-interval 60 -set -g status-left-length 30 -set -g status-left '<#[fg=green]#S#[default]> ' -set -g status-right '#[fg=yellow] %d/%m %H:%M#[default]' -set -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION" diff --git a/docker/myos/Dockerfile b/docker/myos/Dockerfile deleted file mode 100644 index 0a72a96..0000000 --- a/docker/myos/Dockerfile +++ /dev/null @@ -1,179 +0,0 @@ -FROM alpine:latest as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR - -ARG DOCKER_MACHINE=x86_64 -ARG DOCKER_SYSTEM=Linux -ARG GIT_AUTHOR_EMAIL -ARG GIT_AUTHOR_NAME - -ENV GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL} -ENV GIT_AUTHOR_NAME=${GIT_AUTHOR_NAME} -ENV GIT_COMMITTER_EMAIL=${GIT_AUTHOR_EMAIL} -ENV GIT_COMMITTER_NAME=${GIT_AUTHOR_NAME} - -RUN apk upgrade --no-cache \ - && apk add --no-cache \ - bash \ - curl \ - gettext \ - git \ - gpg \ - gpg-agent \ - make \ - nano \ - netcat-openbsd \ - openssh \ - screen \ - socat \ - tmux \ - wget \ - xz - -RUN git clone https://github.com/ingydotnet/git-subrepo \ - && cd git-subrepo \ - && git fetch origin +refs/heads/release/0.4.0: \ - && git checkout release/0.4.0 \ - && git fetch origin pull/314/head \ - && git rebase 9cbe7ba2f61552ce97fb312c8133813f970ab4a5 \ - && sed -i 's/install -C/install/' Makefile \ - && make install \ - && cd .. \ - && rm -rf git-subrepo - -ARG COMPOSE_REMOTE=https://github.com/docker/compose -ARG COMPOSE_VERSION=2.5.0 -ARG IPFS_VERSION=0.24.0 - -RUN OS="$(echo ${DOCKER_SYSTEM} |awk '{print tolower($0)}')" \ - && ARCH="$(echo ${DOCKER_MACHINE} |awk '{print /armv7l/ ? "armv7" : $0}')" \ - && wget -qO /usr/bin/docker-compose ${COMPOSE_REMOTE}/releases/download/v${COMPOSE_VERSION}/docker-compose-${OS}-${ARCH} \ - && chmod +x /usr/bin/docker-compose \ - && OS="$(echo ${DOCKER_SYSTEM} |awk '{print tolower($0)}')" \ - && ARCH="$(echo ${DOCKER_MACHINE})" \ - && wget -qO - https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.${OS}.${ARCH}.tar.xz \ - |tar --strip-components 1 -C /usr/local/bin -xJf - shellcheck-stable/shellcheck \ - && ARCH="$(echo ${DOCKER_MACHINE} |awk '{print /x86_64/ ? "amd64" : /arch64/ ? "arm64" : /armv(6|7)/ ? "arm" : $0}')" \ - && wget -qO - https://github.com/ipfs/kubo/releases/download/v${IPFS_VERSION}/kubo_v${IPFS_VERSION}_${OS}-${ARCH}.tar.gz \ - |tar --strip-components 1 -C /usr/local/bin -xzf - kubo/ipfs \ - && mkdir -p /usr/local/lib/shellspec \ - && wget -qO - https://github.com/shellspec/shellspec/archive/refs/heads/master.tar.gz \ - |tar --strip-components 1 -C /usr/local/lib/shellspec -xzf - \ - && ln -s /usr/local/lib/shellspec/shellspec /usr/local/bin/shellspec - -ADD https://raw.github.com/kvz/cronlock/master/cronlock /usr/local/bin/cronlock -RUN chmod +rx /usr/local/bin/cronlock - -# Setup environment variables; export SSH_AUTH_SOCK from socket directory -ENV SOCKET_DIR /tmp/ssh-agent -ENV SSH_AUTH_SOCK ${SOCKET_DIR}/socket -ENV SSH_AUTH_PROXY_SOCK ${SOCKET_DIR}/proxy-socket - -COPY ${DOCKER_BUILD_DIR}/docker-entrypoint.sh /docker-entrypoint.sh -ENTRYPOINT ["/docker-entrypoint.sh"] - -CMD ["start"] - -FROM dist as master -ARG DOCKER_BUILD_DIR -ARG DOCKER_GID -ARG SHELL=/bin/bash -ARG SSH_BASTION_HOSTNAME -ARG SSH_BASTION_USERNAME -ARG SSH_PRIVATE_IP_RANGE -ARG SSH_PUBLIC_HOSTS -ARG UID -ARG USER -ENV UID=${UID} -ENV GID=${UID} -ENV USER=${USER} - -RUN apk add --no-cache \ - docker \ - mysql-client \ - postgresql-client \ - sudo \ - vim \ - zsh - -# If we provide a numeric UID -RUN [ "$UID" -eq "$UID" ] 2>/dev/null \ -# Remove user with $UID if it is not our $USER - && if [ "$(getent passwd $UID |awk -F: '{print $1}')" != "$USER" ]; then \ - sed -i '/^'$(getent passwd $UID |awk -F: '{print $1}')':x:'$UID':/d' /etc/passwd; \ - sed -i '/^'$(getent group $GID |awk -F: '{print $1}')':x:'$GID':/d' /etc/group; \ - fi \ -# Force $UID if our $USER already exists - && sed -i 's/^'$USER':x:[0-9]\+:[0-9]\+:/'$USER':x:'$UID':'$GID':/' /etc/passwd \ - && sed -i 's/^'$USER':x:[0-9]\+:/'$USER':x:'$GID':/' /etc/group \ -# Create $USER if it does not exist - && if [ "$(getent passwd $UID)" = "" ]; then \ - echo "$USER:x:$UID:$GID::/home/$USER:$SHELL" >> /etc/passwd; \ - echo "$USER:\!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \ - echo "$USER:x:$GID:" >> /etc/group; \ - fi \ - && mkdir -p /home/$USER \ - && chown $UID:$GID /home/$USER \ - || true - -# If we provide a numeric DOCKER_GID -RUN [ "$DOCKER_GID" -eq "$DOCKER_GID" ] 2>/dev/null \ - && if [ "$(getent group docker |awk -F: '{print $3}')" != "$DOCKER_GID" ]; then \ - sed -i 's/^docker:x:[0-9]\+:/docker:x:'$DOCKER_GID':/' /etc/group; \ - fi \ -|| true - -## User groups -RUN adduser $USER wheel \ -# && adduser $USER docker \ - && echo '%wheel ALL=(ALL:ALL) NOPASSWD: ALL' >> /etc/sudoers - -RUN echo -e "\n\ -Host *\n\ - LogLevel quiet\n\ - Compression yes\n\ -" >> /etc/ssh/ssh_config \ - && if [ -n "${SSH_PRIVATE_IP_RANGE}" ] && [ -n "${SSH_BASTION_HOSTNAME}" ]; then \ - echo -e "\ -Host ${SSH_PRIVATE_IP_RANGE}\n\ - ProxyCommand ssh -q ssh-bastion nc -q0 %h 22\n\ - HostName %h\n\ - StrictHostKeyChecking no\n\ - UserKnownHostsFile /dev/null\n\ -Host ssh-bastion\n\ - HostName ${SSH_BASTION_HOSTNAME}\ -" >> /etc/ssh/ssh_config; \ - if [ -n "${SSH_BASTION_USERNAME}" ]; then \ - echo -e "\ - User ${SSH_BASTION_USERNAME}\n\ -" >> /etc/ssh/ssh_config; \ - fi \ - fi - -# Custom rc functions -COPY ${DOCKER_BUILD_DIR}/rc*.sh /etc/profile.d/ - -RUN mkdir -p $SOCKET_DIR && chown $USER $SOCKET_DIR - -VOLUME ${SOCKET_DIR} - -USER $USER -ENV SHELL=${SHELL} -WORKDIR /home/$USER - -# git config -RUN mkdir -p ~/.ssh ~/.config/git \ - && ssh-keyscan -t rsa -H ${SSH_PUBLIC_HOSTS} >> ~/.ssh/known_hosts \ - && echo -e "\ -.DS_Store\n\ -.idea/\n\ -.nfs*\n\ -.theia/settings.json\n\ -*~\n\ -*.log\n\ -*.swp\n\ -Thumbs.db\n\ -" > ~/.config/git/ignore - -# dot files -COPY ${DOCKER_BUILD_DIR}/.* /home/$USER/ diff --git a/docker/myos/docker-entrypoint.sh b/docker/myos/docker-entrypoint.sh deleted file mode 100755 index adc05ba..0000000 --- a/docker/myos/docker-entrypoint.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env sh -set -euo errexit - -# Print a debug message if debug mode is on ($DEBUG is not empty) -# @param message -debug_msg () -{ - if [ -n "${DEBUG:-}" -a "${DEBUG:-}" != "false" ]; then - echo "$@" - fi -} - -case "${1:-start}" in - - start) - debug_msg "Starting..." - - # Create proxy-socket for ssh-agent (to give everyone access to the ssh-agent socket) - debug_msg "Create proxy socket..." - rm -f ${SSH_AUTH_SOCK} ${SSH_AUTH_PROXY_SOCK} > /dev/null 2>&1 - socat UNIX-LISTEN:${SSH_AUTH_PROXY_SOCK},perm=0666,fork UNIX-CONNECT:${SSH_AUTH_SOCK} & - - debug_msg "Launch ssh-agent..." - exec /usr/bin/ssh-agent -a ${SSH_AUTH_SOCK} -D >/dev/null - ;; - - *) - debug_msg "Exec: $@" - exec "$@" - ;; -esac diff --git a/docker/myos/rc.sh b/docker/myos/rc.sh deleted file mode 100644 index 87dd6a7..0000000 --- a/docker/myos/rc.sh +++ /dev/null @@ -1,45 +0,0 @@ -# shellcheck shell=sh -# file rc.sh: Call user defined functions -## author: Yann "aya" Autissier -## license: GPL -## version: 20220630 - -case $- in - # if this is an interactive shell - *i*) - # load user stuff from ~/.rc.d/* files - for file in "${HOME}"/.rc.d/*; do - # read files only - if [ -f "${file}" ]; then - func_name=$(basename "${file}") - func_args=$(cat "${file}") - # at this stage, func_name can start with numbers to allow ordering function calls with file names starting with numbers - # func_name must start with a letter, remove all other characters at the beginning of func_name until a letter is found - while [ "${func_name}" != "" ] && [ "${func_name#[a-z]}" = "${func_name}" ]; do - # remove first char of func_name - func_name="${func_name#?}" - done - # call user function with args passed from the content of the file - command -v "${func_name}" >/dev/null 2>&1 && "${func_name}" "${func_args}" - fi - done - # load user stuff from RC_* env vars - IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}"; for line in $(printenv 2>/dev/null |awk '$0 ~ /^RC_[0-9A-Z_]*=/' |sort); do - func_name=$(printf '%s\n' "${line%%=*}" |awk '{print tolower(substr($0,4))}') - eval func_args=\$"${line%%=*}" - [ "${func_args}" = "false" ] && continue - [ "${func_args}" = "true" ] && unset func_args - # at this stage, func_name can start with numbers to allow ordering function calls with file names starting with numbers - # func_name must start with a letter, remove all other characters at the beginning of func_name until a letter is found - while [ "${func_name}" != "" ] && [ "${func_name#[a-z]}" = "${func_name}" ]; do - # remove first char of func_name - func_name="${func_name#?}" - done - # call user function with args passed from the value of the env var - command -v "${func_name}" >/dev/null 2>&1 && "${func_name}" "${func_args}" - done - unset IFS - ;; -esac - -# vim:ts=2:sw=2:sts=2:et diff --git a/docker/myos/rc_functions.sh b/docker/myos/rc_functions.sh deleted file mode 100644 index 7d40707..0000000 --- a/docker/myos/rc_functions.sh +++ /dev/null @@ -1,286 +0,0 @@ -# shellcheck shell=sh -# file rc_functions.sh: Define shell functions -## author: Yann "aya" Autissier -## license: GPL -## version: 20221229 - -# function force: Run a command sine die -force() { - if [ $# -gt 0 ]; then - while true; do - "$@" - sleep 1 - done - fi -} - -# function force8: Run a command sine die if not already running -force8() { - if [ $# -gt 0 ]; then - while true; do - # awk expression to match $@ - [ "$(ps wwx -o args 2>/dev/null |awk -v field="${PS_X_FIELD:-1}" ' - BEGIN { nargs=split("'"$*"'",args); } - # first field matched - $field == args[1] { - matched=1; - # match following fields - for (i=1;i<=NF-field;i++) { - if ($(i+field) == args[i+1]) { matched++; } - }; - # all fields matched - if (matched == nargs) { found++; } - } - END { print found+0; }' - )" = 0 ] && "$@" - sleep 1 - done - fi -} - -# function lang_set; Export default LANG -lang_set() { - export $(awk -F'=' '$1 == "LANG"' /etc/default/locale 2>/dev/null) >/dev/null -} - -# function load_average; Print the current load average -load_average() { - uptime 2>/dev/null |awk '{printf "%.1f\n", $(NF-2)}' -} - -# function process_count: Print number of "processes"/"running processes"/"D-state" -process_count() { - ps ax -o stat 2>/dev/null |awk ' - $1 ~ /R/ {process_running++}; - $1 ~ /D/ {process_dstate++}; - END { print NR-1"/"process_running+0"/"process_dstate+0; }' -} - -# function prompt_set: Export custom PROMPT_COMMAND -prompt_set() { - case "${TERM}" in - screen*) - ESCAPE_CODE_DCS="\033k" - ESCAPE_CODE_ST="\033\\" - ;; - linux*|xterm*|rxvt*) - ESCAPE_CODE_DCS="\033]0;" - ESCAPE_CODE_ST="\007" - ;; - *) - ;; - esac - # in a screen - if [ -n "${STY}" ]; then - export PROMPT_COMMAND='printf\ - "${ESCAPE_CODE_DCS:-\033]0;}%s${ESCAPE_CODE_ST:-\007}"\ - "${PWD##*/}"' - else - export PROMPT_COMMAND='printf\ - "${ESCAPE_CODE_DCS:-\033]0;}%s@%s:%s${ESCAPE_CODE_ST:-\007}"\ - "${USER}"\ - "${HOSTNAME%%.*}"\ - "${PWD##*/}"' - fi - unset ESCAPE_CODE_DCS ESCAPE_CODE_ST -} - -# function ps1_set: Export custom PS1 -ps1_set() { - case "$0" in - *sh) - COLOR_DGRAY="\[\033[1;30m\]" - COLOR_RED="\[\033[01;31m\]" - COLOR_GREEN="\[\033[01;32m\]" - COLOR_BROWN="\[\033[0;33m\]" - COLOR_YELLOW="\[\033[01;33m\]" - COLOR_BLUE="\[\033[01;34m\]" - COLOR_CYAN="\[\033[0;36m\]" - COLOR_GRAY="\[\033[0;37m\]" - COLOR_RESET="\[\033[0m\]" - ;; - *) - ;; - esac - - PS1_STATUS="\$?" - PS1_COUNT="${COLOR_DGRAY}[\` - case \"$PS1_STATUS\" in - 0) - printf \"${COLOR_BLUE}${PS1_STATUS}\";; - 1) - printf \"${COLOR_YELLOW}${PS1_STATUS}\";; - *) - printf \"${COLOR_RED}${PS1_STATUS}\";; - esac - type process_count >/dev/null 2>&1 && printf\ - \"${COLOR_DGRAY}|${COLOR_BLUE}%s\"\ - \"\$(process_count 2>/dev/null)\" - type user_count >/dev/null 2>&1 && printf\ - \"${PS1_COUNT}${COLOR_DGRAY}|${COLOR_BLUE}%s\"\ - \"\$(user_count 2>/dev/null)\" - type load_average >/dev/null 2>&1 && printf\ - \"${PS1_COUNT}${COLOR_DGRAY}|${COLOR_BLUE}%s\"\ - \"\$(load_average 2>/dev/null)\" - \`${COLOR_DGRAY}]${COLOR_RESET}" - PS1_END="${COLOR_DGRAY}\$( - if [ \"\$(id -u)\" = 0 ]; then - printf \"#\"; - else - printf \"\$\"; - fi - )${COLOR_RESET}" - PS1_GIT="\$( - if type __git_ps1 >/dev/null 2>&1; then - printf \"\$(__git_ps1 2>/dev/null \" (%s)\")\" - else - printf \"\$(BRANCH=\$(git rev-parse --abbrev-ref HEAD 2>/dev/null);\ - [ -n \"\${BRANCH}\" ] && printf \" (\${BRANCH})\")\" - fi - )" - PS1_GIT="${COLOR_CYAN}${PS1_GIT}${COLOR_RESET}" - PS1_HOSTNAME_COLOR="\`case \"\${ENV}${HOSTNAME%%.*}\" in - *[Pp][Rr][0Oo][Dd]*|*[Pp][Rr][Dd]*) - printf \"${COLOR_RED}\";; - *) - if [ -n \"\${ENV}\" ]; then - printf \"${COLOR_YELLOW}\"; - else - printf \"${COLOR_GREEN}\"; - fi;; - esac\`" - PS1_HOSTNAME="${PS1_HOSTNAME_COLOR}\$(hostname |sed 's/\..*//')${COLOR_RESET}" - PS1_USER_COLOR="\$( - if [ \"\$(id -u)\" = 0 ]; then - printf \"${COLOR_RED}\"; - else - printf \"${COLOR_BROWN}\"; - fi - )" - PS1_USER="${PS1_USER_COLOR}\$(id -nu):\$(id -u)${COLOR_RESET}" - PS1_WORKDIR="${COLOR_GRAY}\$( - pwd |sed 's|^'\${HOME}'\(/.*\)*$|~\1|' - )${COLOR_RESET}" - PS1="${PS1_COUNT}${PS1_USER}${COLOR_DGRAY}@${PS1_HOSTNAME}" - PS1="${PS1}${COLOR_DGRAY}:${PS1_WORKDIR}${PS1_GIT}${PS1_END} " - export 'PS1' - unset PS1_COUNT PS1_END PS1_GIT PS1_HOSTNAME PS1_HOSTNAME_COLOR\ - PS1_USER PS1_USER_COLOR PS1_STATUS PS1_WORKDIR -} - -# function screen_attach: Attach existing screen session or Create a new one -screen_attach() { - command -v screen >/dev/null 2>&1 || return - SCREEN_SESSION="$(id -nu)@$(hostname |sed 's/\..*//')" - if [ -z "${STY}" ]; then - # attach screen in tmux window 0 only ;) - [ -n "${TMUX}" ] \ - && [ "$(tmux list-window 2>/dev/null |awk '$NF == "(active)" {print $1}'\ - |sed 's/:$//')" != "0" ] \ - && return - printf 'Attaching screen.' && sleep 1\ - && printf '.' && sleep 1\ - && printf '.' && sleep 1 - exec screen -xRR -S "${SCREEN_SESSION}" - fi - unset SCREEN_SESSION -} - -# function screen_detach: Detach current screen session -screen_detach() { - screen -d -} - -# function ssh_add: Load all private keys in ~/.ssh/ to ssh agent -ssh_add() { - command -v ssh-agent >/dev/null 2>&1 && command -v ssh-add >/dev/null 2>&1 || return - SSH_AGENT_DIR="/tmp/ssh-$(id -u)" - SSH_AGENT_SOCK="${SSH_AGENT_DIR}/agent@$(hostname |sed 's/\..*//')" - # launch a new agent - if [ -z "${SSH_AUTH_SOCK}" ]; then - [ ! -d "${SSH_AGENT_DIR}" ] \ - && mkdir -p "${SSH_AGENT_DIR}" 2>/dev/null\ - && chmod 0700 "${SSH_AGENT_DIR}" - # search for an already running agent - if ps wwx -o args |awk '$1 ~ "ssh-agent$" && $3 == "'"${SSH_AGENT_SOCK}"'"' |wc -l |grep -q 0; then - rm -f "${SSH_AGENT_SOCK}" - ssh-agent -a "${SSH_AGENT_SOCK}" >/dev/null 2>&1 - fi - fi - # attach to agent - export SSH_AUTH_SOCK="${SSH_AUTH_SOCK:-${SSH_AGENT_SOCK}}" - # list private keys to add - # shellcheck disable=SC2068 - for dir in ${@:-${HOME}/.ssh}; do - if [ "${SSH_ADD_RECURSIVE:-}" = true ]; then - GREP_RECURSIVE_FLAG="r" - else - GREP_RECURSIVE_CHAR="*" - fi - SSH_PRIVATE_KEYS="${SSH_PRIVATE_KEYS:-} ${dir}/id_ed25519 ${dir}/id_rsa $(grep -l${GREP_RECURSIVE_FLAG:-} 'PRIVATE KEY' "${dir}/"${GREP_RECURSIVE_CHAR:-} 2>/dev/null |grep -vwE "${dir}/id_(rsa|ed25519)")" - done - # shellcheck disable=SC2086 - printf '%s\n' ${SSH_PRIVATE_KEYS} |while read -r file; do - [ -r "${file}" ] || continue - # add private key to agent - ssh-add -l |grep -q "$(ssh-keygen -lf "${file}" 2>/dev/null |awk '{print $2}')" 2>/dev/null || ssh-add "${file}" - done - unset GREP_RECURSIVE_CHAR GREP_RECURSIVE_FLAG SSH_AGENT_DIR SSH_AGENT_SOCK SSH_PRIVATE_KEYS -} - -# function ssh_del: removes all private keys in ~/.ssh/ from ssh agent -ssh_del() { - command -v ssh-add >/dev/null 2>&1 || return - # attach to agent - if [ -z "${SSH_AUTH_SOCK}" ]; then - return - fi - # list private keys to del - # shellcheck disable=SC2068 - for dir in ${@:-${HOME}/.ssh}; do - if [ "${SSH_DEL_RECURSIVE:-}" = true ]; then - GREP_RECURSIVE_FLAG="r" - else - GREP_RECURSIVE_CHAR="*" - fi - SSH_PRIVATE_KEYS="${SSH_PRIVATE_KEYS:-} ${dir}/id_ed25519 ${dir}/id_rsa $(grep -l${GREP_RECURSIVE_FLAG:-} 'PRIVATE KEY' "${dir}/"${GREP_RECURSIVE_CHAR:-} 2>/dev/null |grep -vwE "${dir}/id_(rsa|ed25519)")" - done - # shellcheck disable=SC2086 - printf '%s\n' ${SSH_PRIVATE_KEYS} |while read -r file; do - [ -r "${file}" ] || continue - # remove private key from agent - ssh-add -l |grep -q "$(ssh-keygen -lf "${file}" 2>/dev/null |awk '{print $2}')" 2>/dev/null && ssh-add -d "${file}" - done - unset GREP_RECURSIVE_CHAR GREP_RECURSIVE_FLAG SSH_PRIVATE_KEYS -} - -# function tmux_attach: Attach existing tmux session or Create a new one -tmux_attach() { - command -v tmux >/dev/null 2>&1 || return - TMUX_SESSION="$(id -nu)@$(hostname |sed 's/\..*//')" - # do not attach tmux in screen ;) - if [ -z "${TMUX}" -a -z "${STY}" ]; then - printf 'Attaching tmux.' && sleep 1\ - && printf '.' && sleep 1\ - && printf '.' && sleep 1 - exec tmux -L"${TMUX_SESSION}" new-session -A -s"${TMUX_SESSION}" - fi - unset TMUX_SESSION -} - -# function tmux_detach: Detach current tmux session -tmux_detach() { - tmux detach -} - -# function user_count: Print number of "users sessions"/"users"/"logged users" -user_count() { - ps ax -o pid,user,tty,comm 2>/dev/null |awk ' - $3 ~ /^(pts\/|tty[sS]?|[0-9]+,)[0-9]+$/ && $4 != "getty" { users_sessions++; logged[$2]++; }; - $1 ~ /^[0-9]+$/ { count[$2]++; } - END { - for (uc in count) { c = c" "uc; }; users_count=split(c,v," "); - for (ul in logged) { l = l" "ul; }; users_logged=split(l,v," "); - print users_sessions+0"/"users_count+0"/"users_logged+0; - }' -} diff --git a/docker/mysql/5.6/Dockerfile b/docker/mysql/5.6/Dockerfile deleted file mode 100644 index 6997ff6..0000000 --- a/docker/mysql/5.6/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM mysql:5.6.44 as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR - -# config -COPY ${DOCKER_BUILD_DIR}/conf.d/all.cnf /etc/mysql/conf.d/ - -# install goss -ADD https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 /usr/bin/goss -RUN chmod +rx /usr/bin/goss -COPY ${DOCKER_BUILD_DIR}/goss.yml /tests/goss.yml - -HEALTHCHECK CMD goss -g /tests/goss.yml validate --format tap - -FROM dist as master -ARG DOCKER_BUILD_DIR - -# config -COPY ${DOCKER_BUILD_DIR}/conf.d/master.cnf /etc/mysql/conf.d/ diff --git a/docker/mysql/5.6/conf.d/all.cnf b/docker/mysql/5.6/conf.d/all.cnf deleted file mode 100644 index 82445c7..0000000 --- a/docker/mysql/5.6/conf.d/all.cnf +++ /dev/null @@ -1,22 +0,0 @@ -[mysqld] -binlog_cache_size = 32768 -character_set_server = utf8mb4 -collation_server = utf8mb4_unicode_ci -innodb_file_per_table = 1 -innodb_flush_method = O_DIRECT -innodb_log_buffer_size = 8388608 -innodb_log_file_size = 134217728 -key_buffer_size = 16777216 -# local_infile = 1 -log_bin_trust_function_creators = 1 -log_output = FILE -max_allowed_packet = 1G -max_binlog_size = 128M -query_cache_limit = 16M -query_cache_size = 128M -query_cache_type = 1 -read_buffer_size = 262144 -read_rnd_buffer_size = 524288 -slow_query_log = 1 -table_open_cache_instances = 16 -wait_timeout = 31536000 diff --git a/docker/mysql/5.6/conf.d/master.cnf b/docker/mysql/5.6/conf.d/master.cnf deleted file mode 100644 index 1707395..0000000 --- a/docker/mysql/5.6/conf.d/master.cnf +++ /dev/null @@ -1,8 +0,0 @@ -[mysqld] -innodb_buffer_pool_size = 1G -max_connections = 128 -sort_buffer_size = 1M - -innodb_strict_mode = 1 -local_infile = 0 -; sql-mode = "TRADITIONAL" diff --git a/docker/mysql/5.6/goss.yml b/docker/mysql/5.6/goss.yml deleted file mode 100644 index 9163f89..0000000 --- a/docker/mysql/5.6/goss.yml +++ /dev/null @@ -1,23 +0,0 @@ -file: - /usr/sbin/mysqld: - exists: true - filetype: file - mode: "0755" - owner: root - sha256: bf5ba9081d08792048ef8459e1ea6ddd155b82bc1a22cd5c8666e47050cd6208 -package: - mysql-server: - installed: true - mysql-common: - installed: true -port: - tcp6:3306: - listening: true - ip: -process: - mysqld: - running: true -user: - mysql: - exists: true - uid: 999 diff --git a/docker/nginx/Dockerfile b/docker/nginx/Dockerfile deleted file mode 100644 index e116661..0000000 --- a/docker/nginx/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM pinidh/nginx-proxy:alpine -ARG DOCKER_BUILD_DIR - -RUN sed -i 's/\(function _resolvers() {\)$/function _nginx_config() {\n\t\/app\/nginx-config.sh\n}\n\n\1/;s/\(\t_default_certificate\)$/\1\n\n\t_nginx_config/' /app/docker-entrypoint.sh \ - && sed -i 's|\(include /etc/nginx/vhost.d/default_location;\)|\1\n {{- end }}\n {{- if (and (exists "/etc/nginx/vhost.d/default_location_php") ($.Env.DEFAULT_LOCATION_PHP)) }}\n include /etc/nginx/vhost.d/default_location_php;\n {{- end }}\n {{- if (and (exists "/etc/nginx/vhost.d/default_location_ipfs") ($.Env.DEFAULT_LOCATION_IPFS)) }}\n include /etc/nginx/vhost.d/default_location_ipfs;|' /app/nginx.tmpl \ - && sed -i 's|\( return 503;\)$|{{- if (exists (printf "/etc/nginx/vhost.d/%s" (or $.Env.DEFAULT "default"))) }}\n include {{ (printf "/etc/nginx/vhost.d/%s" (or $.Env.DEFAULT "default")) }};\n{{- if (and (exists "/etc/nginx/vhost.d/default_location") ($.Env.DEFAULT_LOCATION)) }}\n include /etc/nginx/vhost.d/default_location;\n{{- end }}\n{{- if (and (exists "/etc/nginx/vhost.d/default_location_php") ($.Env.DEFAULT_LOCATION_PHP)) }}\n include /etc/nginx/vhost.d/default_location_php;\n{{- end }}\n{{- if (and (exists "/etc/nginx/vhost.d/default_location_ipfs") ($.Env.DEFAULT_LOCATION_IPFS)) }}\n include /etc/nginx/vhost.d/default_location_ipfs;\n{{- end }}\n{{- else }}\n\1\n{{- end }}|' /app/nginx.tmpl \ - && sed -i 's|\({{-\? if (exists "/etc/nginx/proxy.conf") }}\)|{{- if (exists "/etc/nginx/vhost.d/nginx.conf") }}\ninclude /etc/nginx/vhost.d/nginx.conf;\n{{ end }}\n\n\1|' /app/nginx.tmpl \ - && sed -i 's|exists "/etc/nginx/vhost.d/default"|exists (printf "/etc/nginx/vhost.d/%s" (or $.Env.DEFAULT "default"))|;s|include /etc/nginx/vhost.d/default;|include {{ (printf "/etc/nginx/vhost.d/%s" (or $.Env.DEFAULT "default")) }};|' /app/nginx.tmpl \ - && awk '/proxy_pass \{\{ trim \$proto \}\}/{sub(/else/, "else if ne \$proto \"local\"", last)} NR>1{print last} {last=$0} END {print last}' /app/nginx.tmpl > /tmp/nginx.tmpl && mv /tmp/nginx.tmpl /app/ - -COPY ${DOCKER_BUILD_DIR}/nginx* /app - -HEALTHCHECK CMD curl -sk https://localhost > /dev/null && echo OK diff --git a/docker/nginx/nginx-config.sh b/docker/nginx/nginx-config.sh deleted file mode 100755 index 5ddf2d1..0000000 --- a/docker/nginx/nginx-config.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -set -eu - -## -# CONFIG - -sed -i 's/fastcgi_param * SERVER_SOFTWARE *.*/fastcgi_param SERVER_SOFTWARE nstix;/' /etc/nginx/fastcgi_params - -## -# DEFAULT - -mkdir -p /etc/nginx/htpasswd /etc/nginx/vhost.d -[ -f "/etc/nginx/htpasswd/default" ] || echo "default:{PLAIN}$(head -c 15 /dev/random |base64)" > /etc/nginx/htpasswd/default -[ -f "/etc/nginx/vhost.d/default" ] || cp /app/nginx_default /etc/nginx/vhost.d/default -[ -f "/etc/nginx/vhost.d/default_dns" ] || cp /app/nginx_default_dns /etc/nginx/vhost.d/default_dns -[ -f "/etc/nginx/vhost.d/default_location" ] || cp /app/nginx_default_location /etc/nginx/vhost.d/default_location -[ -f "/etc/nginx/vhost.d/default_location_php" ] || cp /app/nginx_default_location_php /etc/nginx/vhost.d/default_location_php -[ -f "/etc/nginx/vhost.d/default_location_ipfs" ] || cp /app/nginx_default_location_ipfs /etc/nginx/vhost.d/default_location_ipfs -[ -f "/etc/nginx/vhost.d/nginx.conf" ] || cp /app/nginx.conf /etc/nginx/vhost.d/nginx.conf diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf deleted file mode 100644 index 6da33d2..0000000 --- a/docker/nginx/nginx.conf +++ /dev/null @@ -1,16 +0,0 @@ -map $host $host_dir { - hostnames; - ~(?:(?[a-z0-9-]+)\.)(?:(?[a-z0-9-]+)\.)(?:(?[a-z0-9-]+)\.)(?:(?[a-z0-9-]+)\.)(?:(?[a-z0-9-]+)\.)(?[a-z0-9-]+)\.(?[a-z0-9-]+)$ ${tld}/${dom}/${sd}/${ssd}/${sssd}/${ssssd}/${sssssd}; - ~(?:(?[a-z0-9-]+)\.)(?:(?[a-z0-9-]+)\.)(?:(?[a-z0-9-]+)\.)(?:(?[a-z0-9-]+)\.)(?[a-z0-9-]+)\.(?[a-z0-9-]+)$ ${tld}/${dom}/${sd}/${ssd}/${sssd}/${ssssd}; - ~(?:(?[a-z0-9-]+)\.)(?:(?[a-z0-9-]+)\.)(?:(?[a-z0-9-]+)\.)(?[a-z0-9-]+)\.(?[a-z0-9-]+)$ ${tld}/${dom}/${sd}/${ssd}/${sssd}; - ~(?:(?[a-z0-9-]+)\.)(?:(?[a-z0-9-]+)\.)(?[a-z0-9-]+)\.(?[a-z0-9-]+)$ ${tld}/${dom}/${sd}/${ssd}; - ~(?:(?[a-z0-9-]+)\.)(?[a-z0-9-]+)\.(?[a-z0-9-]+)$ ${tld}/${dom}/${sd}; - ~(?[a-z0-9-]+)\.(?[a-z0-9-]+)$ ${tld}/${dom}; -} - -set_real_ip_from 192.168.0.0/16; -set_real_ip_from 172.16.0.0/12; -set_real_ip_from 10.0.0.0/8; -set_real_ip_from 2001:0db8::/32; -real_ip_header X-Forwarded-For; -real_ip_recursive on; diff --git a/docker/nginx/nginx_default b/docker/nginx/nginx_default deleted file mode 100644 index 030e5a3..0000000 --- a/docker/nginx/nginx_default +++ /dev/null @@ -1 +0,0 @@ -root /var/www/$host; diff --git a/docker/nginx/nginx_default_dns b/docker/nginx/nginx_default_dns deleted file mode 100644 index 51f745d..0000000 --- a/docker/nginx/nginx_default_dns +++ /dev/null @@ -1 +0,0 @@ -root /dns/$host_dir; diff --git a/docker/nginx/nginx_default_location b/docker/nginx/nginx_default_location deleted file mode 100644 index 40aef0a..0000000 --- a/docker/nginx/nginx_default_location +++ /dev/null @@ -1,23 +0,0 @@ -error_page 403 /localhost/403.html; -error_page 404 /localhost/404.html; -error_page 500 /localhost/500.html; -error_page 502 503 504 /localhost/50x.html; -index index.php index.html index.htm; -try_files $uri $uri/ =404; - -location /localhost/ { - alias /usr/share/nginx/html/; -} - -location ^~ /.well-known/acme-challenge/ { - auth_basic off; - auth_request off; - allow all; - root /usr/share/nginx/html; - try_files $uri =404; - break; -} - -location ~ /\. { - deny all; -} diff --git a/docker/nginx/nginx_default_location_ipfs b/docker/nginx/nginx_default_location_ipfs deleted file mode 100644 index b485d0d..0000000 --- a/docker/nginx/nginx_default_location_ipfs +++ /dev/null @@ -1,3 +0,0 @@ -location ~ /ip(f|n)s { - proxy_pass http://$host:8080; -} diff --git a/docker/nginx/nginx_default_location_php b/docker/nginx/nginx_default_location_php deleted file mode 100644 index 41597b6..0000000 --- a/docker/nginx/nginx_default_location_php +++ /dev/null @@ -1,10 +0,0 @@ -location ~ ^(.+\.php)(.*)$ { - fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_pass php; - fastcgi_split_path_info ^(.+\.php)(.*)$; - include fastcgi_params; - try_files $uri index.php$uri =404; -} - -fastcgi_intercept_errors on; diff --git a/docker/openstack/Dockerfile b/docker/openstack/Dockerfile deleted file mode 100644 index 8008105..0000000 --- a/docker/openstack/Dockerfile +++ /dev/null @@ -1,49 +0,0 @@ -FROM alpine:latest as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR - -RUN apk --no-cache add libffi openssl python3 py3-pip py3-netifaces - -RUN apk --no-cache add --virtual .build-deps \ - build-base \ - libffi-dev \ - openssl-dev \ - python3-dev \ - && pip install --upgrade pip \ - && pip install python-openstackclient \ - && apk del .build-deps - -RUN apk --no-cache upgrade - -ENTRYPOINT ["/usr/bin/openstack"] -CMD ["help"] - -FROM dist as master -ARG DOCKER_BUILD_DIR -ARG UID -ARG USER -ENV UID=${UID} -ENV GID=${UID} -ENV USER=${USER} - -# If we provide a numeric UID -RUN [ "$UID" -eq "$UID" ] 2>/dev/null \ -# Remove user with $UID if it is not our $USER - && if [ "$(getent passwd $UID |awk -F: '{print $1}')" != "$USER" ]; then \ - sed -i '/^'$(getent passwd $UID |awk -F: '{print $1}')':x:'$UID':/d' /etc/passwd; \ - sed -i '/^'$(getent group $GID |awk -F: '{print $1}')':x:'$GID':/d' /etc/group; \ - fi \ -# Force $UID if our $USER already exists - && sed -i 's/^'$USER':x:[0-9]\+:[0-9]\+:/'$USER':x:'$UID':'$GID':/' /etc/passwd \ - && sed -i 's/^'$USER':x:[0-9]\+:/'$USER':x:'$GID':/' /etc/group \ -# Create $USER if it does not exist - && if [ "$(getent passwd $UID)" = "" ]; then \ - echo "$USER:x:$UID:$GID::/home/$USER:$SHELL" >> /etc/passwd; \ - echo "$USER:\!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \ - echo "$USER:x:$GID:" >> /etc/group; \ - fi \ - && mkdir -p /home/$USER \ - && chown $UID:$GID /home/$USER \ - || true - -USER $USER diff --git a/docker/packer/Dockerfile b/docker/packer/Dockerfile deleted file mode 100644 index be33229..0000000 --- a/docker/packer/Dockerfile +++ /dev/null @@ -1,66 +0,0 @@ -FROM alpine:latest as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR - -ARG DOCKER_SYSTEM="Linux" -ARG DOCKER_MACHINE="x86_64" - -RUN apk --no-cache add \ - ansible \ - bash \ - dirmngr \ - git \ - gpg \ - gpg-agent \ - qemu \ - qemu-system-x86_64 \ - qemu-img \ - openssh-client \ - openssl \ - socat \ - wget - -ARG PACKER_VERSION=1.8.3 - -RUN OS="$(echo ${DOCKER_SYSTEM} |awk '{print tolower($0)}')" \ - && ARCH="$(echo ${DOCKER_MACHINE} |awk '{print /x86_64/ ? "amd64" : /arch64/ ? "arm64" : /armv(6|7)/ ? "arm" : $0}')" \ - && wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_${OS}_${ARCH}.zip \ - && wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_SHA256SUMS \ - && wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_SHA256SUMS.sig \ - && GNUPGHOME="./.gnupg" gpg --batch --recv-keys C874011F0AB405110D02105534365D9472D7468F \ - && GNUPGHOME="./.gnupg" gpg --batch --verify packer_${PACKER_VERSION}_SHA256SUMS.sig packer_${PACKER_VERSION}_SHA256SUMS \ - && grep packer_${PACKER_VERSION}_${OS}_${ARCH}.zip packer_${PACKER_VERSION}_SHA256SUMS |sha256sum -c - \ - && unzip "packer_${PACKER_VERSION}_${OS}_${ARCH}.zip" -d /usr/local/bin \ - && rm -rf "packer_${PACKER_VERSION}_${OS}_${ARCH}.zip" packer_${PACKER_VERSION}_SHA256SUMS.sig packer_${PACKER_VERSION}_SHA256SUMS ./.gnupg - -ENTRYPOINT ["/usr/local/bin/packer"] - -FROM dist as master -ARG DOCKER_BUILD_DIR -ARG UID -ARG USER -ENV UID=${UID} -ENV GID=${UID} -ENV USER=${USER} - -# If we provide a specific UID -RUN let $UID >/dev/null 2>&1 \ -# Remove user with $UID if it is not our $USER - && if [ "$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')" != "$USER" ]; then \ - sed -i '/^'$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')':x:'$UID':/d' /etc/passwd; \ - sed -i '/^'$(getent group $GID |awk 'BEGIN {FS=":"} {print $1}')':x:'$GID':/d' /etc/group; \ - fi \ -# Force $UID if our $USER already exists - && sed -i 's/^'$USER':x:[0-9]\+:[0-9]\+:/'$USER':x:'$UID':'$GID':/' /etc/passwd \ - && sed -i 's/^'$USER':x:[0-9]\+:/'$USER':x:'$GID':/' /etc/group \ -# Create $USER if it does not exist - && if [ "$(getent passwd $UID)" = "" ]; then \ - echo "$USER:x:$UID:$GID::/home/$USER:/bin/false" >> /etc/passwd; \ - echo "$USER:!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \ - echo "$USER:x:$GID:" >> /etc/group; \ - fi \ - && mkdir -p /home/$USER \ - && chown $UID:$GID /home/$USER \ - || true - -USER $USER diff --git a/docker/pdns-server/.gitrepo b/docker/pdns-server/.gitrepo deleted file mode 100644 index 6e2f8e9..0000000 --- a/docker/pdns-server/.gitrepo +++ /dev/null @@ -1,12 +0,0 @@ -; DO NOT EDIT (unless you know what you are doing) -; -; This subdirectory is a git "subrepo", and this file is maintained by the -; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme -; -[subrepo] - remote = ssh://git@github.com/aynicos/docker-pdns-server - branch = master - commit = 6d3c4ce70cbb38d237be757206bfbf082ce2ba3e - parent = 9de6b77b0d944fe6efa7b020ba7c2dbbba5df4f8 - method = merge - cmdver = 0.4.0 diff --git a/docker/pdns-server/Dockerfile b/docker/pdns-server/Dockerfile deleted file mode 100644 index 887fd32..0000000 --- a/docker/pdns-server/Dockerfile +++ /dev/null @@ -1,67 +0,0 @@ -FROM alpine:3.11 as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR -ARG VERSION_PDNS_REC=4.2.1 -ARG VERSION_PDNS_AUTH=4.2.1 -ARG VERSION_PDNS_DNSDIST=1.4.0 - -RUN apk upgrade --no-cache \ - && apk add --no-cache --virtual .build-deps \ - autoconf \ - automake \ - bison \ - boost-dev \ - boost-program_options \ - boost-serialization \ - build-base \ - curl \ - curl-dev \ - file \ - flex \ - g++ \ - git \ - py-virtualenv \ - libedit-dev \ - libressl-dev \ - libstdc++ \ - libtool \ - lua-dev \ - make \ - musl \ - ragel \ - && git clone https://github.com/PowerDNS/pdns \ - && cd pdns \ - && git checkout tags/auth-${VERSION_PDNS_AUTH} -b auth-${VERSION_PDNS_AUTH} \ - && autoreconf -vi \ - && ./configure --enable-static --disable-systemd --without-systemd --with-modules="" \ - && make install clean \ - && git checkout tags/rec-${VERSION_PDNS_REC} -b rec-${VERSION_PDNS_REC} \ - && cd pdns/recursordist \ - && autoreconf -vi \ - && ./configure --enable-static --disable-systemd --without-systemd \ - && make install clean \ - && cd ../.. \ - && git checkout tags/dnsdist-${VERSION_PDNS_DNSDIST} -b dnsdist-${VERSION_PDNS_DNSDIST} \ - && cd pdns/dnsdistdist \ - && autoreconf -vi \ - && ./configure --enable-static --disable-systemd --without-systemd \ - && make install clean \ - && cd ../../.. \ - && rm -fr pdns \ - && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr/local \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | xargs -r apk info --installed \ - | sort -u \ - )" \ - && apk del .build-deps \ - && apk add --no-cache --virtual .run-deps $runDeps \ - lua - -COPY ${DOCKER_BUILD_DIR}/docker-entrypoint.sh / -ENTRYPOINT ["/docker-entrypoint.sh"] - -EXPOSE 53/udp 53/tcp - -FROM dist as master -ARG DOCKER_BUILD_DIR diff --git a/docker/pdns-server/README.md b/docker/pdns-server/README.md deleted file mode 100644 index 75ae238..0000000 --- a/docker/pdns-server/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# docker-pdns - -Alpine based Dockerfile running a powerdns authoritative and/or recursive DNS server. - -## Usage - -Following environment variables can be customized. - -## Example - -Build a docker image named "pdns". - -```shell -$ docker build -t pdns . -``` - -Start a docker from this image. - -```shell -$ docker run --net host pdns -``` - diff --git a/docker/pdns-server/docker-entrypoint.sh b/docker/pdns-server/docker-entrypoint.sh deleted file mode 100755 index 1e6ee7e..0000000 --- a/docker/pdns-server/docker-entrypoint.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/ash -set -euo pipefail -set -o errexit - -trap 'kill -SIGQUIT $PID' INT - -# Launch pdns_recursor by default -[ $# -eq 0 ] && /usr/local/sbin/pdns_recursor || exec "$@" & -PID=$! && wait diff --git a/docker/phabricator-daemon/Dockerfile b/docker/phabricator-daemon/Dockerfile deleted file mode 100644 index 25756b9..0000000 --- a/docker/phabricator-daemon/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM phabricator/daemon:latest as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR - -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - openssh-client \ - && rm -rf /var/lib/apt/lists/* - -FROM dist as master -ARG DOCKER_BUILD_DIR diff --git a/docker/phabricator/Dockerfile b/docker/phabricator/Dockerfile deleted file mode 100644 index 9a0fce0..0000000 --- a/docker/phabricator/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM phabricator/phabricator:latest as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR - -RUN { \ - echo 'mysqli.allow_local_infile = 0'; \ - } > /usr/local/etc/php/conf.d/mysql.ini - -FROM dist as master -ARG DOCKER_BUILD_DIR diff --git a/docker/php/5.6-fpm-alpine/Dockerfile b/docker/php/5.6-fpm-alpine/Dockerfile deleted file mode 100644 index ac9df52..0000000 --- a/docker/php/5.6-fpm-alpine/Dockerfile +++ /dev/null @@ -1,239 +0,0 @@ -FROM php:5.6-fpm-alpine as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR -ARG AMQP_VERSION=stable -ARG APCU_VERSION=4.0.11 -ARG BLACKFIRE_VERSION=1.31.0 -ARG CACHETOOL_VERSION=3.2.1 -ARG IMAGICK_VERSION=stable -ARG GEOIP_VERSION=stable -ARG MEMCACHE_VERSION=3.0.8 -ARG MEMCACHED_VERSION=2.2.0 -ARG MONGODB_VERSION=1.6.1 -ARG NEWRELIC_VERSION=9.6.1.256 -ARG RAR_VERSION=stable -ARG REDIS_VERSION=4.3.0 -ARG UUID_VERSION=1.0.4 -ARG SUHOSIN_VERSION=0.9.38 -ARG TWIG_VERSION=1.35.3 -ARG XCACHE_VERSION=3.2.0 -ARG XDEBUG_VERSION=2.5.5 - -RUN apk --no-cache upgrade \ - && apk add --no-cache --virtual .build-deps \ - $PHPIZE_DEPS \ - aspell-dev \ - bison \ - bzip2-dev \ - curl-dev \ - flex \ - freetype-dev \ - gawk \ - geoip-dev \ - gettext-dev \ - gmp-dev \ - icu-dev \ - imagemagick-dev \ - imap-dev \ - libjpeg-turbo-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libpng-dev \ - libressl-dev \ - libxml2-dev \ - libxslt-dev \ - make \ - net-snmp-dev \ - openldap-dev \ - postgresql-dev \ - python \ - rabbitmq-c-dev \ - zlib-dev \ - && wget https://packages.blackfire.io/binaries/blackfire-php/${BLACKFIRE_VERSION}/blackfire-php-alpine_amd64-php-$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;").so -O $(php -r "echo ini_get('extension_dir');")/blackfire.so \ - && wget https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz -O /tmp/newrelic-${NEWRELIC_VERSION}.tar.gz \ - && mkdir -p /tmp/newrelic-${NEWRELIC_VERSION} \ - && tar xzf /tmp/newrelic-${NEWRELIC_VERSION}.tar.gz -C /tmp/newrelic-${NEWRELIC_VERSION} --strip-components=1 \ - && rm /tmp/newrelic-${NEWRELIC_VERSION}.tar.gz \ - && mv /tmp/newrelic-${NEWRELIC_VERSION}/agent/x64/newrelic-20131226.so $(php -r "echo ini_get('extension_dir');")/newrelic.so \ - && wget --no-check-certificate https://download.suhosin.org/suhosin-${SUHOSIN_VERSION}.tar.gz -O /tmp/suhosin-${SUHOSIN_VERSION}.tar.gz \ - && mkdir -p /tmp/suhosin-${SUHOSIN_VERSION} \ - && tar xzf /tmp/suhosin-${SUHOSIN_VERSION}.tar.gz -C /tmp/suhosin-${SUHOSIN_VERSION} --strip-components=1 \ - && rm /tmp/suhosin-${SUHOSIN_VERSION}.tar.gz \ - && cd /tmp/suhosin-${SUHOSIN_VERSION} \ - && sed -i '1i#include ' log.c \ - && wget https://github.com/twigphp/Twig/archive/v${TWIG_VERSION}.tar.gz -O /tmp/twig-${TWIG_VERSION}.tar.gz \ - && mkdir -p /tmp/twig-${TWIG_VERSION} \ - && tar xzf /tmp/twig-${TWIG_VERSION}.tar.gz -C /tmp/twig-${TWIG_VERSION} --strip-components=1 \ - && rm /tmp/twig-${TWIG_VERSION}.tar.gz \ - && wget https://web.archive.org/web/20181118151821if_/http://xcache.lighttpd.net/pub/Releases/${XCACHE_VERSION}/xcache-${XCACHE_VERSION}.tar.gz -O /tmp/xcache-${XCACHE_VERSION}.tar.gz \ - && mkdir -p /tmp/xcache-${XCACHE_VERSION} \ - && tar xzf /tmp/xcache-${XCACHE_VERSION}.tar.gz -C /tmp/xcache-${XCACHE_VERSION} --strip-components=1 \ - && rm /tmp/xcache-${XCACHE_VERSION}.tar.gz \ - && docker-php-ext-configure /tmp/xcache-${XCACHE_VERSION} --enable-xcache --enable-xcache-constant --enable-xcache-optimizer --enable-xcache-coverager \ - && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/ \ - && docker-php-ext-install -j$(nproc) \ - /tmp/suhosin-${SUHOSIN_VERSION} \ - /tmp/twig-${TWIG_VERSION}/ext/twig \ - /tmp/xcache-${XCACHE_VERSION} \ - bcmath \ - bz2 \ - calendar \ - dba \ - exif \ - gd \ - gettext \ - gmp \ - imap \ - intl \ - ldap \ - mcrypt \ - mysql \ - mysqli \ - opcache \ - pcntl \ - pdo_mysql \ - pdo_pgsql \ - pgsql \ - pspell \ - shmop \ - snmp \ - soap \ - sockets \ - sysvmsg \ - sysvsem \ - sysvshm \ - xmlrpc \ - xsl \ - zip \ - && rm /usr/local/etc/php/conf.d/docker-php-ext-* \ - && rm -rf /tmp/newrelic-* \ - && rm -rf /tmp/suhosin-* \ - && rm -rf /tmp/twig-* \ - && rm -rf /tmp/xcache-* \ - && pecl install amqp-${AMQP_VERSION} \ - && pecl install apcu-${APCU_VERSION} \ - && pecl install geoip-${GEOIP_VERSION} \ - && pecl install imagick-${IMAGICK_VERSION} \ - && pecl install memcache-${MEMCACHE_VERSION} \ - && pecl install memcached-${MEMCACHED_VERSION} \ - && pecl install mongodb-${MONGODB_VERSION} \ - && pecl install rar-${RAR_VERSION} \ - && pecl install redis-${REDIS_VERSION} \ - && echo |pecl install uuid-${UUID_VERSION} \ - && pecl install xdebug-${XDEBUG_VERSION} \ - && pecl clear-cache \ - && runDeps="$( scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - )" \ - && apk del .build-deps \ - && apk add --no-cache --virtual .run-deps $runDeps - -RUN wget http://gordalina.github.io/cachetool/downloads/cachetool-${CACHETOOL_VERSION}.phar -O /usr/local/bin/cachetool \ - && chmod +x /usr/local/bin/cachetool \ - && echo -e "\ -adapter: fastcgi \n\ -fastcgi: 127.0.0.1:9000 \n\ -" > /etc/cachetool.yml - -RUN mkdir -p /etc/ssh && echo -e "\ -Host * \n\ - Compression yes \n\ -" >> /etc/ssh/ssh_config - -RUN apk add --no-cache \ - bash \ - bzip2 \ - coreutils \ - gettext \ - git \ - imagemagick \ - lftp \ - mailx \ - make \ - mysql-client \ - nano \ - openssh-client \ - ssmtp \ - vim - -# Iconv fix: https://github.com/docker-library/php/issues/240#issuecomment-305038173 -RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ gnu-libiconv -ENV LD_PRELOAD=/usr/lib/preloadable_libiconv.so - -# enable php modules -# available modules : amqp apcu bcmath blackfire bz2 calendar curl dba exif gettext gd geoip gmp imap imagick intl json ldap mbstring mcrypt memcache memcached mongodb mysql mysqli newrelic opcache pcntl pdo_mysql pdo_pgsql pgsql pspell rar redis shmop simplexml snmp soap sockets suhosin sysvmsg sysvsem sysvshm tokenizer twig uuid xcache xdebug xmlrpc xsl zip -# fix: disabled memcache to avoid relocation errors -ARG PHP_EXT_ENABLE="amqp apcu bcmath blackfire bz2 calendar gd geoip imagick intl mcrypt memcached mysql mysqli opcache pdo_mysql redis soap sockets twig uuid zip" -RUN docker-php-ext-enable ${PHP_EXT_ENABLE} - -# copy *.ini -COPY ${DOCKER_BUILD_DIR}/*.ini /usr/local/etc/php/conf.d/ -COPY ${DOCKER_BUILD_DIR}/php-fpm-*.conf /usr/local/etc/php-fpm.d/ - -# custom php config -ARG PHP_INI_CONFIG -RUN echo -e ${PHP_INI_CONFIG// /\\n} >> /usr/local/etc/php/conf.d/config.ini - -# custom php cli -ARG PHP_CLI_CONFIG="apc.enable_cli=0 max_execution_time=-1 memory_limit=-1 opcache.enable_cli=0 xdebug.default_enable=0" -RUN echo '#!/usr/bin/env sh' > /usr/local/bin/php-cli \ - && chmod +x /usr/local/bin/php-cli \ - && echo -e "\ -/usr/local/bin/php -d ${PHP_CLI_CONFIG// / -d } \"\$@\"\ -" >> /usr/local/bin/php-cli - -# install cronlock -ADD https://raw.github.com/kvz/cronlock/master/cronlock /usr/bin/cronlock -RUN chmod +rx /usr/bin/cronlock - -# config ssmtp -RUN echo "FromLineOverride=YES" >> /etc/ssmtp/ssmtp.conf - -# https://bugs.php.net/bug.php?id=71880 -ENV LOG_STREAM="/tmp/stdout" -RUN mkfifo $LOG_STREAM && chmod 777 $LOG_STREAM - -# default www-data homedir to /var/www for crontabs -RUN sed -i 's|/home/www-data|/var/www|' /etc/passwd -WORKDIR /var/www - -# redirect LOG_STREAM to stdout and start php-fpm with environment variables from .env -CMD [ "sh", "-c", "(exec 3<>$LOG_STREAM; cat <&3 >&1 & IFS=$'\n'; exec env $(cat .env 2>/dev/null) php-fpm)" ] - -FROM dist as master -ARG UID -ARG USER -ENV UID=${UID} -ENV GID=${UID} -ENV USER=${USER} - -# If we provide a specific UID -RUN let $UID >/dev/null 2>&1 \ -# Remove user with $UID if it is not our $USER - && if [ "$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')" != "$USER" ]; then \ - sed -i '/^'$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')':x:'$UID':/d' /etc/passwd; \ - sed -i '/^'$(getent group $GID |awk 'BEGIN {FS=":"} {print $1}')':x:'$GID':/d' /etc/group; \ - fi \ -# Force $UID if our $USER already exists - && sed -i 's/^'$USER':x:[0-9]\+:[0-9]\+:/'$USER':x:'$UID':'$GID':/' /etc/passwd \ - && sed -i 's/^'$USER':x:[0-9]\+:/'$USER':x:'$GID':/' /etc/group \ -# Create $USER if it does not exist - && if [ "$(getent passwd $UID)" = "" ]; then \ - echo "$USER:x:$UID:$GID::/home/$USER:/bin/false" >> /etc/passwd; \ - echo "$USER:!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \ - echo "$USER:x:$GID:" >> /etc/group; \ - fi \ - && mkdir -p /home/$USER \ - && chown $UID:$GID /home/$USER \ - || true - -RUN chown -R $USER /usr/local/etc/php/conf.d/ - -USER $USER - -ARG SSH_REMOTE_HOSTS - -RUN mkdir -p ~/.ssh \ - && ssh-keyscan -t rsa -H $SSH_REMOTE_HOSTS >> ~/.ssh/known_hosts diff --git a/docker/php/5.6-fpm-alpine/apc.ini b/docker/php/5.6-fpm-alpine/apc.ini deleted file mode 100644 index 448cee9..0000000 --- a/docker/php/5.6-fpm-alpine/apc.ini +++ /dev/null @@ -1,5 +0,0 @@ -apc.enable_cli = 0 -apc.enabled = 1 -apc.shm_segments = 1 -apc.shm_size = 32M - diff --git a/docker/php/5.6-fpm-alpine/blackfire.ini b/docker/php/5.6-fpm-alpine/blackfire.ini deleted file mode 100644 index 566668c..0000000 --- a/docker/php/5.6-fpm-alpine/blackfire.ini +++ /dev/null @@ -1 +0,0 @@ -blackfire.agent_socket=tcp://blackfire:8707 diff --git a/docker/php/5.6-fpm-alpine/newrelic.ini b/docker/php/5.6-fpm-alpine/newrelic.ini deleted file mode 100644 index d90b2dc..0000000 --- a/docker/php/5.6-fpm-alpine/newrelic.ini +++ /dev/null @@ -1,4 +0,0 @@ -[newrelic] -newrelic.logfile = /dev/self/fd/2 -newrelic.daemon.logfile = /dev/self/fd/2 - diff --git a/docker/php/5.6-fpm-alpine/opcache.ini b/docker/php/5.6-fpm-alpine/opcache.ini deleted file mode 100644 index b0244ec..0000000 --- a/docker/php/5.6-fpm-alpine/opcache.ini +++ /dev/null @@ -1,8 +0,0 @@ -opcache.enable = 1 -opcache.enable_cli = 0 -opcache.error_log = /proc/self/fd/2 -opcache.interned_strings_buffer = 16 -opcache.log_verbosity_level = 2 -opcache.max_accelerated_files = 20000 -opcache.memory_consumption = 256 -opcache.validate_timestamps = 1 diff --git a/docker/php/5.6-fpm-alpine/php-fpm-pool.conf b/docker/php/5.6-fpm-alpine/php-fpm-pool.conf deleted file mode 100644 index c1e5fc8..0000000 --- a/docker/php/5.6-fpm-alpine/php-fpm-pool.conf +++ /dev/null @@ -1,412 +0,0 @@ -; Start a new pool named 'www'. -; the variable $pool can we used in any directive and will be replaced by the -; pool name ('www' here) -[www] - -; Per pool prefix -; It only applies on the following directives: -; - 'access.log' -; - 'slowlog' -; - 'listen' (unixsocket) -; - 'chroot' -; - 'chdir' -; - 'php_values' -; - 'php_admin_values' -; When not set, the global prefix (or /usr) applies instead. -; Note: This directive can also be relative to the global prefix. -; Default Value: none -;prefix = /path/to/pools/$pool - -; Unix user/group of processes -; Note: The user is mandatory. If the group is not set, the default user's group -; will be used. -user = www-data -group = www-data - -; The address on which to accept FastCGI requests. -; Valid syntaxes are: -; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on -; a specific port; -; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on -; a specific port; -; 'port' - to listen on a TCP socket to all IPv4 addresses on a -; specific port; -; '[::]:port' - to listen on a TCP socket to all addresses -; (IPv6 and IPv4-mapped) on a specific port; -; '/path/to/unix/socket' - to listen on a unix socket. -; Note: This value is mandatory. -;listen = /var/run/php5-fpm.sock -listen = 0.0.0.0:9000 - -; Set listen(2) backlog. -; Default Value: 65535 (-1 on FreeBSD and OpenBSD) -listen.backlog = 1023 - -; Set permissions for unix socket, if one is used. In Linux, read/write -; permissions must be set in order to allow connections from a web server. Many -; BSD-derived systems allow connections regardless of permissions. -; Default Values: user and group are set as the running user -; mode is set to 0660 -;listen.owner = www-data -;listen.group = www-data -;listen.mode = 0660 -; When POSIX Access Control Lists are supported you can set them using -; these options, value is a comma separated list of user/group names. -; When set, listen.owner and listen.group are ignored -;listen.acl_users = -;listen.acl_groups = - -; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect. -; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original -; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address -; must be separated by a comma. If this value is left blank, connections will be -; accepted from any ip address. -; Default Value: any -;listen.allowed_clients = 0.0.0.0 - -; Specify the nice(2) priority to apply to the pool processes (only if set) -; The value can vary from -19 (highest priority) to 20 (lower priority) -; Note: - It will only work if the FPM master process is launched as root -; - The pool processes will inherit the master process priority -; unless it specified otherwise -; Default Value: no set -; process.priority = -19 - -; Choose how the process manager will control the number of child processes. -; Possible Values: -; static - a fixed number (pm.max_children) of child processes; -; dynamic - the number of child processes are set dynamically based on the -; following directives. With this process management, there will be -; always at least 1 children. -; pm.max_children - the maximum number of children that can -; be alive at the same time. -; pm.start_servers - the number of children created on startup. -; pm.min_spare_servers - the minimum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is less than this -; number then some children will be created. -; pm.max_spare_servers - the maximum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is greater than this -; number then some children will be killed. -; ondemand - no children are created at startup. Children will be forked when -; new requests will connect. The following parameter are used: -; pm.max_children - the maximum number of children that -; can be alive at the same time. -; pm.process_idle_timeout - The number of seconds after which -; an idle process will be killed. -; Note: This value is mandatory. -pm = dynamic - -; The number of child processes to be created when pm is set to 'static' and the -; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. -; This value sets the limit on the number of simultaneous requests that will be -; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. -; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP -; CGI. The below defaults are based on a server without much resources. Don't -; forget to tweak pm.* to fit your needs. -; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' -; Note: This value is mandatory. -pm.max_children = 8 - -; The number of child processes created on startup. -; Note: Used only when pm is set to 'dynamic' -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 -pm.start_servers = 2 - -; The desired minimum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = 1 - -; The desired maximum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = 3 - -; The number of seconds after which an idle process will be killed. -; Note: Used only when pm is set to 'ondemand' -; Default Value: 10s -;pm.process_idle_timeout = 10s; - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. For -; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default Value: 0 -;pm.max_requests = 500 - -; The URI to view the FPM status page. If this value is not set, no URI will be -; recognized as a status page. It shows the following informations: -; pool - the name of the pool; -; process manager - static, dynamic or ondemand; -; start time - the date and time FPM has started; -; start since - number of seconds since FPM has started; -; accepted conn - the number of request accepted by the pool; -; listen queue - the number of request in the queue of pending -; connections (see backlog in listen(2)); -; max listen queue - the maximum number of requests in the queue -; of pending connections since FPM has started; -; listen queue len - the size of the socket queue of pending connections; -; idle processes - the number of idle processes; -; active processes - the number of active processes; -; total processes - the number of idle + active processes; -; max active processes - the maximum number of active processes since FPM -; has started; -; max children reached - number of times, the process limit has been reached, -; when pm tries to start more children (works only for -; pm 'dynamic' and 'ondemand'); -; Value are updated in real time. -; Example output: -; pool: www -; process manager: static -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 62636 -; accepted conn: 190460 -; listen queue: 0 -; max listen queue: 1 -; listen queue len: 42 -; idle processes: 4 -; active processes: 11 -; total processes: 15 -; max active processes: 12 -; max children reached: 0 -; -; By default the status page output is formatted as text/plain. Passing either -; 'html', 'xml' or 'json' in the query string will return the corresponding -; output syntax. Example: -; http://www.foo.bar/status -; http://www.foo.bar/status?json -; http://www.foo.bar/status?html -; http://www.foo.bar/status?xml -; -; By default the status page only outputs short status. Passing 'full' in the -; query string will also return status for each pool process. -; Example: -; http://www.foo.bar/status?full -; http://www.foo.bar/status?json&full -; http://www.foo.bar/status?html&full -; http://www.foo.bar/status?xml&full -; The Full status returns for each process: -; pid - the PID of the process; -; state - the state of the process (Idle, Running, ...); -; start time - the date and time the process has started; -; start since - the number of seconds since the process has started; -; requests - the number of requests the process has served; -; request duration - the duration in µs of the requests; -; request method - the request method (GET, POST, ...); -; request URI - the request URI with the query string; -; content length - the content length of the request (only with POST); -; user - the user (PHP_AUTH_USER) (or '-' if not set); -; script - the main script called (or '-' if not set); -; last request cpu - the %cpu the last request consumed -; it's always 0 if the process is not in Idle state -; because CPU calculation is done when the request -; processing has terminated; -; last request memory - the max amount of memory the last request consumed -; it's always 0 if the process is not in Idle state -; because memory calculation is done when the request -; processing has terminated; -; If the process is in Idle state, then informations are related to the -; last request the process has served. Otherwise informations are related to -; the current request being served. -; Example output: -; ************************ -; pid: 31330 -; state: Running -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 63087 -; requests: 12808 -; request duration: 1250261 -; request method: GET -; request URI: /test_mem.php?N=10000 -; content length: 0 -; user: - -; script: /home/fat/web/docs/php/test_mem.php -; last request cpu: 0.00 -; last request memory: 0 -; -; Note: There is a real-time FPM status monitoring sample web page available -; It's available in: /usr/share/php5/fpm/status.html -; -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -pm.status_path = /php-fpm-status - -; The ping URI to call the monitoring page of FPM. If this value is not set, no -; URI will be recognized as a ping page. This could be used to test from outside -; that FPM is alive and responding, or to -; - create a graph of FPM availability (rrd or such); -; - remove a server from a group if it is not responding (load balancing); -; - trigger alerts for the operating team (24/7). -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -ping.path = /php-fpm-ping - -; This directive may be used to customize the response of a ping request. The -; response is formatted as text/plain with a 200 response code. -; Default Value: pong -;ping.response = pong - -; The access log file -; Default: not set -;access.log = log/$pool.access.log - -; The access log format. -; The following syntax is allowed -; %%: the '%' character -; %C: %CPU used by the request -; it can accept the following format: -; - %{user}C for user CPU only -; - %{system}C for system CPU only -; - %{total}C for user + system CPU (default) -; %d: time taken to serve the request -; it can accept the following format: -; - %{seconds}d (default) -; - %{miliseconds}d -; - %{mili}d -; - %{microseconds}d -; - %{micro}d -; %e: an environment variable (same as $_ENV or $_SERVER) -; it must be associated with embraces to specify the name of the env -; variable. Some exemples: -; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e -; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e -; %f: script filename -; %l: content-length of the request (for POST request only) -; %m: request method -; %M: peak of memory allocated by PHP -; it can accept the following format: -; - %{bytes}M (default) -; - %{kilobytes}M -; - %{kilo}M -; - %{megabytes}M -; - %{mega}M -; %n: pool name -; %o: output header -; it must be associated with embraces to specify the name of the header: -; - %{Content-Type}o -; - %{X-Powered-By}o -; - %{Transfert-Encoding}o -; - .... -; %p: PID of the child that serviced the request -; %P: PID of the parent of the child that serviced the request -; %q: the query string -; %Q: the '?' character if query string exists -; %r: the request URI (without the query string, see %q and %Q) -; %R: remote IP address -; %s: status (response code) -; %t: server time the request was received -; it can accept a strftime(3) format: -; %d/%b/%Y:%H:%M:%S %z (default) -; %T: time the log has been written (the request has finished) -; it can accept a strftime(3) format: -; %d/%b/%Y:%H:%M:%S %z (default) -; %u: remote user -; -; Default: "%R - %u %t \"%m %r\" %s" -;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" - -; The log file for slow requests -; Default Value: not set -; Note: slowlog is mandatory if request_slowlog_timeout is set -;slowlog = log/$pool.log.slow - -; The timeout for serving a single request after which a PHP backtrace will be -; dumped to the 'slowlog' file. A value of '0s' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -;request_slowlog_timeout = 0 - -; The timeout for serving a single request after which the worker process will -; be killed. This option should be used when the 'max_execution_time' ini option -; does not stop script execution for some reason. A value of '0' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -;request_terminate_timeout = 5m - -; Set open file descriptor rlimit. -; Default Value: system defined value -;rlimit_files = 1024 - -; Set max core size rlimit. -; Possible Values: 'unlimited' or an integer greater or equal to 0 -; Default Value: system defined value -;rlimit_core = 0 - -; Chroot to this directory at the start. This value must be defined as an -; absolute path. When this value is not set, chroot is not used. -; Note: you can prefix with '$prefix' to chroot to the pool prefix or one -; of its subdirectories. If the pool prefix is not set, the global prefix -; will be used instead. -; Note: chrooting is a great security feature and should be used whenever -; possible. However, all PHP paths will be relative to the chroot -; (error_log, sessions.save_path, ...). -; Default Value: not set -;chroot = - -; Chdir to this directory at the start. -; Note: relative path can be used. -; Default Value: current directory or / when chroot -chdir = / - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - -; Clear environment in FPM workers -; Prevents arbitrary environment variables from reaching FPM worker processes -; by clearing the environment in workers before env vars specified in this -; pool configuration are added. -; Setting to "no" will make all environment variables available to PHP code -; via getenv(), $_ENV and $_SERVER. -; Default Value: yes -;clear_env = no - -; Limits the extensions of the main script FPM will allow to parse. This can -; prevent configuration mistakes on the web server side. You should only limit -; FPM to .php extensions to prevent malicious users to use other extensions to -; exectute php code. -; Note: set an empty value to allow all extensions. -; Default Value: .php -;security.limit_extensions = .php .php3 .php4 .php5 - -; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from -; the current environment. -; Default Value: clean env -;env[HOSTNAME] = $HOSTNAME -;env[PATH] = /usr/local/bin:/usr/bin:/bin -;env[TMP] = /tmp -;env[TMPDIR] = /tmp -;env[TEMP] = /tmp - -; Additional php.ini defines, specific to this pool of workers. These settings -; overwrite the values previously defined in the php.ini. The directives are the -; same as the PHP SAPI: -; php_value/php_flag - you can set classic ini defines which can -; be overwritten from PHP call 'ini_set'. -; php_admin_value/php_admin_flag - these directives won't be overwritten by -; PHP call 'ini_set' -; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. - -; Defining 'extension' will load the corresponding shared extension from -; extension_dir. Defining 'disable_functions' or 'disable_classes' will not -; overwrite previously defined php.ini values, but will append the new value -; instead. - -; Note: path INI options can be relative and will be expanded with the prefix -; (pool, global or /usr) - -; Default Value: nothing is defined by default except the values in php.ini and -; specified at startup with the -d argument -;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com -;php_flag[display_errors] = off -;php_admin_value[error_log] = /var/log/fpm-php.www.log -;php_admin_flag[log_errors] = on -;php_admin_value[memory_limit] = 32M diff --git a/docker/php/5.6-fpm-alpine/php.ini b/docker/php/5.6-fpm-alpine/php.ini deleted file mode 100644 index f631e55..0000000 --- a/docker/php/5.6-fpm-alpine/php.ini +++ /dev/null @@ -1,56 +0,0 @@ -[PHP] -expose_php = Off -disable_functions = exec,system,popen,passthru,apache_child_terminate,apache_get_modules,apache_get_version,apache_getenv,apache_note,apache_setenv,virtual,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority -enable_dl = Off -allow_url_fopen = On -allow_url_include = Off -engine = On -short_open_tag = On -output_buffering = 4096 -realpath_cache_size = 4096k -realpath_cache_ttl = 600 -include_path = .:/usr/share/php -date.timezone = Europe/Paris -default_socket_timeout = 10 -max_execution_time = 30 -max_input_time = 60 -max_input_vars = 1000 -memory_limit = 512M -post_max_size = 32M -file_uploads = On -upload_tmp_dir = /tmp -upload_max_filesize = 32M -max_file_uploads = 20 -error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT -display_errors = Off -display_startup_errors = Off -log_errors = On -html_errors = On -SMTP = mailcatcher -smtp_port = 1025 -sendmail_path = /usr/sbin/sendmail -t -i -mail_log = syslog -session.save_handler = memcached -session.save_path = memcached:11211 -session.use_cookies = 1 -session.cookie_secure = -session.use_only_cookies = 1 -session.name = PHPSESSID -session.auto_start = 0 -session.cookie_lifetime = 0 -session.cookie_path = / -session.cookie_domain = -session.cookie_httponly = -session.serialize_handler = php -session.gc_probability = 0 -session.gc_divisor = 1000 -session.gc_maxlifetime = 2592000 -session.bug_compat_42 = Off -session.bug_compat_warn = Off -session.referer_check = -session.entropy_length = 512 -session.entropy_file = /dev/urandom -session.cache_limiter = nocache -session.cache_expire = 180 -session.use_trans_sid = 0 -session.hash_function = 0 diff --git a/docker/php/5.6-fpm-alpine/suhosin.ini b/docker/php/5.6-fpm-alpine/suhosin.ini deleted file mode 100644 index 3863c34..0000000 --- a/docker/php/5.6-fpm-alpine/suhosin.ini +++ /dev/null @@ -1 +0,0 @@ -suhosin.executor.disable_eval = On diff --git a/docker/php/5.6-fpm-alpine/xdebug.ini b/docker/php/5.6-fpm-alpine/xdebug.ini deleted file mode 100644 index efb017f..0000000 --- a/docker/php/5.6-fpm-alpine/xdebug.ini +++ /dev/null @@ -1,13 +0,0 @@ -xdebug.collect_params = 1 -xdebug.collect_return = 1 -xdebug.default_enable = 1 -xdebug.force_display_errors = 1 -xdebug.force_error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED -xdebug.halt_level = E_WARNING -xdebug.idekey = PHPSTORM -xdebug.max_nesting_level = 1024 -xdebug.remote_enable = 1 -xdebug.remote_connect_back = 1 -xdebug.scream = 0 -xdebug.show_error_trace = 1 -xdebug.show_exception_trace = 1 diff --git a/docker/php/7.0-fpm-alpine/Dockerfile b/docker/php/7.0-fpm-alpine/Dockerfile deleted file mode 100644 index b931efa..0000000 --- a/docker/php/7.0-fpm-alpine/Dockerfile +++ /dev/null @@ -1,270 +0,0 @@ -FROM php:7.0-fpm-alpine as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR -ARG AMQP_VERSION=stable -ARG AST_VERSION=stable -ARG APCU_VERSION=stable -ARG BLACKFIRE_VERSION=1.34.3 -ARG CACHETOOL_VERSION=4.0.1 -ARG DS_VERSION=stable -ARG EVENT_VERSION=stable -ARG IGBINARY_VERSION=stable -ARG IMAGICK_VERSION=stable -ARG GEOIP_VERSION=beta -ARG GRPC_VERSION=stable -ARG MCRYPT_VERSION=stable -ARG MEMCACHE_VERSION=4.0.1-php73 -ARG MEMCACHED_VERSION=stable -ARG MONGODB_VERSION=1.6.1 -ARG NEWRELIC_VERSION=9.11.0.267 -ARG OAUTH_VERSION=stable -ARG RAR_VERSION=stable -ARG REDIS_VERSION=stable -ARG SNUFFLEUPAGUS_VERSION=0.5.1 -ARG UUID_VERSION=stable -ARG XDEBUG_VERSION=2.7.2 -ARG XHPROF_VERSION=2.2.0 -ARG YAML_VERSION=stable - -RUN apk --no-cache upgrade \ - && apk add --no-cache --virtual .build-deps \ - $PHPIZE_DEPS \ - aspell-dev \ - bison \ - bzip2-dev \ - curl-dev \ - enchant-dev \ - flex \ - freetype-dev \ - gawk \ - geoip-dev \ - gettext-dev \ - gmp-dev \ - icu-dev \ - imagemagick-dev \ - imap-dev \ - libevent-dev \ - libjpeg-turbo-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libpng-dev \ - libressl-dev \ - libxml2-dev \ - libxslt-dev \ - linux-headers \ - make \ - net-snmp-dev \ - openldap-dev \ - postgresql-dev \ - pcre-dev \ - rabbitmq-c-dev \ - tidyhtml-dev \ - yaml-dev \ - zlib-dev \ - # blackfire \ - && wget https://packages.blackfire.io/binaries/blackfire-php/${BLACKFIRE_VERSION}/blackfire-php-alpine_amd64-php-$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;").so -O $(php -r "echo ini_get('extension_dir');")/blackfire.so \ - # gd \ - && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/ \ - # memcache \ - && wget https://github.com/websupport-sk/pecl-memcache/archive/v${MEMCACHE_VERSION}.tar.gz -O /tmp/memcache-${MEMCACHE_VERSION}.tar.gz \ - && mkdir -p /tmp/memcache-${MEMCACHE_VERSION} \ - && tar xzf /tmp/memcache-${MEMCACHE_VERSION}.tar.gz -C /tmp/memcache-${MEMCACHE_VERSION} --strip-components=1 \ - # https://github.com/websupport-sk/pecl-memcache/pull/39 \ - && sed -i '399s/);/, char *);/' /tmp/memcache-${MEMCACHE_VERSION}/php7/memcache_pool.h \ - # https://github.com/websupport-sk/pecl-memcache/pull/40 \ - && sed -i '47i#if PHP_VERSION_ID < 70200\n register size_t newlen;\n#endif' /tmp/memcache-${MEMCACHE_VERSION}/php7/memcache_pool.c \ - # newrelic \ - && wget https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz -O /tmp/newrelic-${NEWRELIC_VERSION}.tar.gz \ - && mkdir -p /tmp/newrelic-${NEWRELIC_VERSION} \ - && tar xzf /tmp/newrelic-${NEWRELIC_VERSION}.tar.gz -C /tmp/newrelic-${NEWRELIC_VERSION} --strip-components=1 \ - && rm /tmp/newrelic-${NEWRELIC_VERSION}.tar.gz \ - && mv /tmp/newrelic-${NEWRELIC_VERSION}/agent/x64/newrelic-20151012.so $(php -r "echo ini_get('extension_dir');")/newrelic.so \ - # snuffleupagus \ - && wget https://github.com/jvoisin/snuffleupagus/archive/v${SNUFFLEUPAGUS_VERSION}.tar.gz -O /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}.tar.gz \ - && mkdir -p /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION} \ - && tar xzf /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}.tar.gz -C /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION} --strip-components=1 \ - && docker-php-ext-configure /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}/src --prefix=/usr --enable-snuffleupagus \ - # xhprof \ - && wget https://github.com/longxinH/xhprof/archive/v${XHPROF_VERSION}.tar.gz -O /tmp/xhprof-${XHPROF_VERSION}.tar.gz \ - && mkdir -p /tmp/xhprof-${XHPROF_VERSION} \ - && tar xzf /tmp/xhprof-${XHPROF_VERSION}.tar.gz -C /tmp/xhprof-${XHPROF_VERSION} --strip-components=1 \ - && docker-php-ext-configure /tmp/xhprof-${XHPROF_VERSION}/extension --with-php-config=/usr/local/bin/php-config \ - # tidy \ - && docker-php-source extract \ - && cd /usr/src/php \ - && sed -i 's/buffio.h/tidybuffio.h/' ext/tidy/*.c \ - && docker-php-ext-install -j$(nproc) \ - bcmath \ - bz2 \ - calendar \ - dba \ - enchant \ - exif \ - gd \ - gettext \ - gmp \ - imap \ - intl \ - ldap \ - mcrypt \ - /tmp/memcache-${MEMCACHE_VERSION} \ - mysqli \ - opcache \ - pcntl \ - pdo_mysql \ - pdo_pgsql \ - pgsql \ - pspell \ - shmop \ - snmp \ - soap \ - sockets \ - sysvmsg \ - sysvsem \ - sysvshm \ - tidy \ - /tmp/xhprof-${XHPROF_VERSION}/extension \ - xmlrpc \ - xsl \ - zip \ - # docker-php-ext-install fails after snuffleupagus is enabled - /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}/src \ - && docker-php-source delete \ - && rm /usr/local/etc/php/conf.d/docker-php-ext-* \ - && rm -rf /tmp/memcache-* \ - && rm -rf /tmp/newrelic-* \ - && rm -rf /tmp/snuffleupagus-* \ - && rm -rf /tmp/xhprof-* \ - && pecl install amqp-${AMQP_VERSION} \ - && pecl install apcu-${APCU_VERSION} \ - && pecl install ast-${AST_VERSION} \ - && pecl install ds-${DS_VERSION} \ - && pecl install event-${EVENT_VERSION} \ - && pecl install geoip-${GEOIP_VERSION} \ - && pecl install grpc-${GRPC_VERSION} \ - && pecl install igbinary-${IGBINARY_VERSION} \ - && pecl install imagick-${IMAGICK_VERSION} \ - && pecl install memcached-${MEMCACHED_VERSION} \ - && pecl install mongodb-${MONGODB_VERSION} \ - && pecl install oauth-${OAUTH_VERSION} \ - && pecl install rar-${RAR_VERSION} \ - && pecl install redis-${REDIS_VERSION} \ - && echo |pecl install uuid-${UUID_VERSION} \ - && pecl install xdebug-${XDEBUG_VERSION} \ - && pecl install yaml-${YAML_VERSION} \ - && pecl clear-cache \ - && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr/local \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | xargs -r apk info --installed \ - | sort -u \ - )" \ - && apk del .build-deps \ - && apk add --no-cache --virtual .run-deps $runDeps - -RUN wget http://gordalina.github.io/cachetool/downloads/cachetool-${CACHETOOL_VERSION}.phar -O /usr/local/bin/cachetool \ - && chmod +x /usr/local/bin/cachetool \ - && echo -e "\ -adapter: fastcgi \n\ -fastcgi: 127.0.0.1:9000 \n\ -" > /etc/cachetool.yml - -RUN mkdir -p /etc/ssh && echo -e "\ -Host * \n\ - Compression yes \n\ -" >> /etc/ssh/ssh_config - -RUN apk add --no-cache \ - bash \ - bzip2 \ - coreutils \ - gettext \ - git \ - imagemagick \ - lftp \ - mailx \ - make \ - mysql-client \ - nano \ - openssh-client \ - ssmtp \ - vim - -# Iconv fix: https://github.com/docker-library/php/issues/240#issuecomment-305038173 -RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ gnu-libiconv -ENV LD_PRELOAD=/usr/lib/preloadable_libiconv.so - -# builtin modules : Core ctype curl date dom fileinfo filter ftp hash iconv json libxml mbstring mysqlnd openssl pcre PDO pdo_sqlite Phar posix readline Reflection session SimpleXML SPL sqlite3 standard tokenizer xml xmlreader xmlwriter zlib -# available modules : amqp apcu ast bcmath blackfire bz2 calendar dba ds enchant event exif gd geoip gmp grpc igbinary imap imagick intl ldap mcrypt memcache memcached mongodb mysqli newrelic oauth opcache pcntl pdo_mysql pdo_pgsql pgsql pspell rar redis shmop snmp snuffleupagus soap sockets sysvmsg sysvsem sysvshm xhprof tidy uuid wddx xdebug xhprof xmlrpc xsl yaml zip -ARG PHP_EXT_ENABLE="amqp apcu bcmath bz2 calendar gd geoip imagick intl mcrypt memcached mysqli oauth opcache pdo_mysql redis soap sockets uuid yaml zip" -RUN docker-php-ext-enable ${PHP_EXT_ENABLE} - -# copy *.ini -COPY ${DOCKER_BUILD_DIR}/*.ini /usr/local/etc/php/conf.d/ -COPY ${DOCKER_BUILD_DIR}/php-fpm-*.conf /usr/local/etc/php-fpm.d/ - -# custom php config -ARG PHP_INI_CONFIG -RUN echo -e ${PHP_INI_CONFIG// /\\n} >> /usr/local/etc/php/conf.d/config.ini - -# custom php cli -ARG PHP_CLI_CONFIG="apc.enable_cli=0 max_execution_time=-1 memory_limit=-1 opcache.enable_cli=0 xdebug.default_enable=0" -RUN echo '#!/usr/bin/env sh' > /usr/local/bin/php-cli \ - && chmod +x /usr/local/bin/php-cli \ - && echo -e "\ -/usr/local/bin/php -d ${PHP_CLI_CONFIG// / -d } \"\$@\"\ -" >> /usr/local/bin/php-cli - -# install cronlock -ADD https://raw.github.com/kvz/cronlock/master/cronlock /usr/bin/cronlock -RUN chmod +rx /usr/bin/cronlock - -# config ssmtp -RUN echo "FromLineOverride=YES" >> /etc/ssmtp/ssmtp.conf - -# https://bugs.php.net/bug.php?id=71880 -ENV LOG_STREAM="/tmp/stdout" -RUN mkfifo $LOG_STREAM && chmod 777 $LOG_STREAM - -# default www-data homedir to /var/www for crontabs -RUN sed -i 's|/home/www-data|/var/www|' /etc/passwd -WORKDIR /var/www - -# redirect LOG_STREAM to stdout and start php-fpm with environment variables from .env -CMD [ "sh", "-c", "(exec 3<>$LOG_STREAM; cat <&3 >&1 & IFS=$'\n'; exec env $(cat .env 2>/dev/null) php-fpm)" ] - -FROM dist as master -ARG UID -ARG USER -ENV UID=${UID} -ENV GID=${UID} -ENV USER=${USER} - -# If we provide a specific UID -RUN let $UID >/dev/null 2>&1 \ -# Remove user with $UID if it is not our $USER - && if [ "$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')" != "$USER" ]; then \ - sed -i '/^'$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')':x:'$UID':/d' /etc/passwd; \ - sed -i '/^'$(getent group $GID |awk 'BEGIN {FS=":"} {print $1}')':x:'$GID':/d' /etc/group; \ - fi \ -# Force $UID if our $USER already exists - && sed -i 's/^'$USER':x:[0-9]\+:[0-9]\+:/'$USER':x:'$UID':'$GID':/' /etc/passwd \ - && sed -i 's/^'$USER':x:[0-9]\+:/'$USER':x:'$GID':/' /etc/group \ -# Create $USER if it does not exist - && if [ "$(getent passwd $UID)" = "" ]; then \ - echo "$USER:x:$UID:$GID::/home/$USER:/bin/false" >> /etc/passwd; \ - echo "$USER:!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \ - echo "$USER:x:$GID:" >> /etc/group; \ - fi \ - && mkdir -p /home/$USER \ - && chown $UID:$GID /home/$USER \ - || true - -RUN chown -R $USER /usr/local/etc/php/conf.d/ - -USER $USER - -ARG SSH_REMOTE_HOSTS - -RUN mkdir -p ~/.ssh \ - && ssh-keyscan -t rsa -H $SSH_REMOTE_HOSTS >> ~/.ssh/known_hosts diff --git a/docker/php/7.0-fpm-alpine/apc.ini b/docker/php/7.0-fpm-alpine/apc.ini deleted file mode 100644 index 448cee9..0000000 --- a/docker/php/7.0-fpm-alpine/apc.ini +++ /dev/null @@ -1,5 +0,0 @@ -apc.enable_cli = 0 -apc.enabled = 1 -apc.shm_segments = 1 -apc.shm_size = 32M - diff --git a/docker/php/7.0-fpm-alpine/blackfire.ini b/docker/php/7.0-fpm-alpine/blackfire.ini deleted file mode 100644 index 566668c..0000000 --- a/docker/php/7.0-fpm-alpine/blackfire.ini +++ /dev/null @@ -1 +0,0 @@ -blackfire.agent_socket=tcp://blackfire:8707 diff --git a/docker/php/7.0-fpm-alpine/memcached.ini b/docker/php/7.0-fpm-alpine/memcached.ini deleted file mode 100644 index 361f58b..0000000 --- a/docker/php/7.0-fpm-alpine/memcached.ini +++ /dev/null @@ -1 +0,0 @@ -memcached.sess_locking = Off \ No newline at end of file diff --git a/docker/php/7.0-fpm-alpine/newrelic.ini b/docker/php/7.0-fpm-alpine/newrelic.ini deleted file mode 100644 index d90b2dc..0000000 --- a/docker/php/7.0-fpm-alpine/newrelic.ini +++ /dev/null @@ -1,4 +0,0 @@ -[newrelic] -newrelic.logfile = /dev/self/fd/2 -newrelic.daemon.logfile = /dev/self/fd/2 - diff --git a/docker/php/7.0-fpm-alpine/opcache.ini b/docker/php/7.0-fpm-alpine/opcache.ini deleted file mode 100644 index b0244ec..0000000 --- a/docker/php/7.0-fpm-alpine/opcache.ini +++ /dev/null @@ -1,8 +0,0 @@ -opcache.enable = 1 -opcache.enable_cli = 0 -opcache.error_log = /proc/self/fd/2 -opcache.interned_strings_buffer = 16 -opcache.log_verbosity_level = 2 -opcache.max_accelerated_files = 20000 -opcache.memory_consumption = 256 -opcache.validate_timestamps = 1 diff --git a/docker/php/7.0-fpm-alpine/php-fpm-pool.conf b/docker/php/7.0-fpm-alpine/php-fpm-pool.conf deleted file mode 100644 index bfc8efa..0000000 --- a/docker/php/7.0-fpm-alpine/php-fpm-pool.conf +++ /dev/null @@ -1,412 +0,0 @@ -; Start a new pool named 'www'. -; the variable $pool can we used in any directive and will be replaced by the -; pool name ('www' here) -[www] - -; Per pool prefix -; It only applies on the following directives: -; - 'access.log' -; - 'slowlog' -; - 'listen' (unixsocket) -; - 'chroot' -; - 'chdir' -; - 'php_values' -; - 'php_admin_values' -; When not set, the global prefix (or /usr) applies instead. -; Note: This directive can also be relative to the global prefix. -; Default Value: none -;prefix = /path/to/pools/$pool - -; Unix user/group of processes -; Note: The user is mandatory. If the group is not set, the default user's group -; will be used. -user = www-data -group = www-data - -; The address on which to accept FastCGI requests. -; Valid syntaxes are: -; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on -; a specific port; -; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on -; a specific port; -; 'port' - to listen on a TCP socket to all IPv4 addresses on a -; specific port; -; '[::]:port' - to listen on a TCP socket to all addresses -; (IPv6 and IPv4-mapped) on a specific port; -; '/path/to/unix/socket' - to listen on a unix socket. -; Note: This value is mandatory. -;listen = /var/run/php5-fpm.sock -listen = 0.0.0.0:9000 - -; Set listen(2) backlog. -; Default Value: 65535 (-1 on FreeBSD and OpenBSD) -listen.backlog = 1023 - -; Set permissions for unix socket, if one is used. In Linux, read/write -; permissions must be set in order to allow connections from a web server. Many -; BSD-derived systems allow connections regardless of permissions. -; Default Values: user and group are set as the running user -; mode is set to 0660 -;listen.owner = www-data -;listen.group = www-data -;listen.mode = 0660 -; When POSIX Access Control Lists are supported you can set them using -; these options, value is a comma separated list of user/group names. -; When set, listen.owner and listen.group are ignored -;listen.acl_users = -;listen.acl_groups = - -; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect. -; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original -; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address -; must be separated by a comma. If this value is left blank, connections will be -; accepted from any ip address. -; Default Value: any -;listen.allowed_clients = 0.0.0.0 - -; Specify the nice(2) priority to apply to the pool processes (only if set) -; The value can vary from -19 (highest priority) to 20 (lower priority) -; Note: - It will only work if the FPM master process is launched as root -; - The pool processes will inherit the master process priority -; unless it specified otherwise -; Default Value: no set -; process.priority = -19 - -; Choose how the process manager will control the number of child processes. -; Possible Values: -; static - a fixed number (pm.max_children) of child processes; -; dynamic - the number of child processes are set dynamically based on the -; following directives. With this process management, there will be -; always at least 1 children. -; pm.max_children - the maximum number of children that can -; be alive at the same time. -; pm.start_servers - the number of children created on startup. -; pm.min_spare_servers - the minimum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is less than this -; number then some children will be created. -; pm.max_spare_servers - the maximum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is greater than this -; number then some children will be killed. -; ondemand - no children are created at startup. Children will be forked when -; new requests will connect. The following parameter are used: -; pm.max_children - the maximum number of children that -; can be alive at the same time. -; pm.process_idle_timeout - The number of seconds after which -; an idle process will be killed. -; Note: This value is mandatory. -pm = dynamic - -; The number of child processes to be created when pm is set to 'static' and the -; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. -; This value sets the limit on the number of simultaneous requests that will be -; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. -; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP -; CGI. The below defaults are based on a server without much resources. Don't -; forget to tweak pm.* to fit your needs. -; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' -; Note: This value is mandatory. -pm.max_children = 16 - -; The number of child processes created on startup. -; Note: Used only when pm is set to 'dynamic' -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 -pm.start_servers = 2 - -; The desired minimum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = 1 - -; The desired maximum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = 3 - -; The number of seconds after which an idle process will be killed. -; Note: Used only when pm is set to 'ondemand' -; Default Value: 10s -;pm.process_idle_timeout = 10s; - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. For -; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default Value: 0 -;pm.max_requests = 500 - -; The URI to view the FPM status page. If this value is not set, no URI will be -; recognized as a status page. It shows the following informations: -; pool - the name of the pool; -; process manager - static, dynamic or ondemand; -; start time - the date and time FPM has started; -; start since - number of seconds since FPM has started; -; accepted conn - the number of request accepted by the pool; -; listen queue - the number of request in the queue of pending -; connections (see backlog in listen(2)); -; max listen queue - the maximum number of requests in the queue -; of pending connections since FPM has started; -; listen queue len - the size of the socket queue of pending connections; -; idle processes - the number of idle processes; -; active processes - the number of active processes; -; total processes - the number of idle + active processes; -; max active processes - the maximum number of active processes since FPM -; has started; -; max children reached - number of times, the process limit has been reached, -; when pm tries to start more children (works only for -; pm 'dynamic' and 'ondemand'); -; Value are updated in real time. -; Example output: -; pool: www -; process manager: static -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 62636 -; accepted conn: 190460 -; listen queue: 0 -; max listen queue: 1 -; listen queue len: 42 -; idle processes: 4 -; active processes: 11 -; total processes: 15 -; max active processes: 12 -; max children reached: 0 -; -; By default the status page output is formatted as text/plain. Passing either -; 'html', 'xml' or 'json' in the query string will return the corresponding -; output syntax. Example: -; http://www.foo.bar/status -; http://www.foo.bar/status?json -; http://www.foo.bar/status?html -; http://www.foo.bar/status?xml -; -; By default the status page only outputs short status. Passing 'full' in the -; query string will also return status for each pool process. -; Example: -; http://www.foo.bar/status?full -; http://www.foo.bar/status?json&full -; http://www.foo.bar/status?html&full -; http://www.foo.bar/status?xml&full -; The Full status returns for each process: -; pid - the PID of the process; -; state - the state of the process (Idle, Running, ...); -; start time - the date and time the process has started; -; start since - the number of seconds since the process has started; -; requests - the number of requests the process has served; -; request duration - the duration in µs of the requests; -; request method - the request method (GET, POST, ...); -; request URI - the request URI with the query string; -; content length - the content length of the request (only with POST); -; user - the user (PHP_AUTH_USER) (or '-' if not set); -; script - the main script called (or '-' if not set); -; last request cpu - the %cpu the last request consumed -; it's always 0 if the process is not in Idle state -; because CPU calculation is done when the request -; processing has terminated; -; last request memory - the max amount of memory the last request consumed -; it's always 0 if the process is not in Idle state -; because memory calculation is done when the request -; processing has terminated; -; If the process is in Idle state, then informations are related to the -; last request the process has served. Otherwise informations are related to -; the current request being served. -; Example output: -; ************************ -; pid: 31330 -; state: Running -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 63087 -; requests: 12808 -; request duration: 1250261 -; request method: GET -; request URI: /test_mem.php?N=10000 -; content length: 0 -; user: - -; script: /home/fat/web/docs/php/test_mem.php -; last request cpu: 0.00 -; last request memory: 0 -; -; Note: There is a real-time FPM status monitoring sample web page available -; It's available in: /usr/share/php5/fpm/status.html -; -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -pm.status_path = /php-fpm-status - -; The ping URI to call the monitoring page of FPM. If this value is not set, no -; URI will be recognized as a ping page. This could be used to test from outside -; that FPM is alive and responding, or to -; - create a graph of FPM availability (rrd or such); -; - remove a server from a group if it is not responding (load balancing); -; - trigger alerts for the operating team (24/7). -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -ping.path = /php-fpm-ping - -; This directive may be used to customize the response of a ping request. The -; response is formatted as text/plain with a 200 response code. -; Default Value: pong -;ping.response = pong - -; The access log file -; Default: not set -;access.log = log/$pool.access.log - -; The access log format. -; The following syntax is allowed -; %%: the '%' character -; %C: %CPU used by the request -; it can accept the following format: -; - %{user}C for user CPU only -; - %{system}C for system CPU only -; - %{total}C for user + system CPU (default) -; %d: time taken to serve the request -; it can accept the following format: -; - %{seconds}d (default) -; - %{miliseconds}d -; - %{mili}d -; - %{microseconds}d -; - %{micro}d -; %e: an environment variable (same as $_ENV or $_SERVER) -; it must be associated with embraces to specify the name of the env -; variable. Some exemples: -; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e -; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e -; %f: script filename -; %l: content-length of the request (for POST request only) -; %m: request method -; %M: peak of memory allocated by PHP -; it can accept the following format: -; - %{bytes}M (default) -; - %{kilobytes}M -; - %{kilo}M -; - %{megabytes}M -; - %{mega}M -; %n: pool name -; %o: output header -; it must be associated with embraces to specify the name of the header: -; - %{Content-Type}o -; - %{X-Powered-By}o -; - %{Transfert-Encoding}o -; - .... -; %p: PID of the child that serviced the request -; %P: PID of the parent of the child that serviced the request -; %q: the query string -; %Q: the '?' character if query string exists -; %r: the request URI (without the query string, see %q and %Q) -; %R: remote IP address -; %s: status (response code) -; %t: server time the request was received -; it can accept a strftime(3) format: -; %d/%b/%Y:%H:%M:%S %z (default) -; %T: time the log has been written (the request has finished) -; it can accept a strftime(3) format: -; %d/%b/%Y:%H:%M:%S %z (default) -; %u: remote user -; -; Default: "%R - %u %t \"%m %r\" %s" -;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" - -; The log file for slow requests -; Default Value: not set -; Note: slowlog is mandatory if request_slowlog_timeout is set -;slowlog = log/$pool.log.slow - -; The timeout for serving a single request after which a PHP backtrace will be -; dumped to the 'slowlog' file. A value of '0s' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -;request_slowlog_timeout = 0 - -; The timeout for serving a single request after which the worker process will -; be killed. This option should be used when the 'max_execution_time' ini option -; does not stop script execution for some reason. A value of '0' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -;request_terminate_timeout = 5m - -; Set open file descriptor rlimit. -; Default Value: system defined value -;rlimit_files = 1024 - -; Set max core size rlimit. -; Possible Values: 'unlimited' or an integer greater or equal to 0 -; Default Value: system defined value -;rlimit_core = 0 - -; Chroot to this directory at the start. This value must be defined as an -; absolute path. When this value is not set, chroot is not used. -; Note: you can prefix with '$prefix' to chroot to the pool prefix or one -; of its subdirectories. If the pool prefix is not set, the global prefix -; will be used instead. -; Note: chrooting is a great security feature and should be used whenever -; possible. However, all PHP paths will be relative to the chroot -; (error_log, sessions.save_path, ...). -; Default Value: not set -;chroot = - -; Chdir to this directory at the start. -; Note: relative path can be used. -; Default Value: current directory or / when chroot -chdir = / - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - -; Clear environment in FPM workers -; Prevents arbitrary environment variables from reaching FPM worker processes -; by clearing the environment in workers before env vars specified in this -; pool configuration are added. -; Setting to "no" will make all environment variables available to PHP code -; via getenv(), $_ENV and $_SERVER. -; Default Value: yes -;clear_env = no - -; Limits the extensions of the main script FPM will allow to parse. This can -; prevent configuration mistakes on the web server side. You should only limit -; FPM to .php extensions to prevent malicious users to use other extensions to -; exectute php code. -; Note: set an empty value to allow all extensions. -; Default Value: .php -;security.limit_extensions = .php .php3 .php4 .php5 - -; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from -; the current environment. -; Default Value: clean env -;env[HOSTNAME] = $HOSTNAME -;env[PATH] = /usr/local/bin:/usr/bin:/bin -;env[TMP] = /tmp -;env[TMPDIR] = /tmp -;env[TEMP] = /tmp - -; Additional php.ini defines, specific to this pool of workers. These settings -; overwrite the values previously defined in the php.ini. The directives are the -; same as the PHP SAPI: -; php_value/php_flag - you can set classic ini defines which can -; be overwritten from PHP call 'ini_set'. -; php_admin_value/php_admin_flag - these directives won't be overwritten by -; PHP call 'ini_set' -; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. - -; Defining 'extension' will load the corresponding shared extension from -; extension_dir. Defining 'disable_functions' or 'disable_classes' will not -; overwrite previously defined php.ini values, but will append the new value -; instead. - -; Note: path INI options can be relative and will be expanded with the prefix -; (pool, global or /usr) - -; Default Value: nothing is defined by default except the values in php.ini and -; specified at startup with the -d argument -;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com -;php_flag[display_errors] = off -;php_admin_value[error_log] = /var/log/fpm-php.www.log -;php_admin_flag[log_errors] = on -;php_admin_value[memory_limit] = 32M diff --git a/docker/php/7.0-fpm-alpine/php.ini b/docker/php/7.0-fpm-alpine/php.ini deleted file mode 100644 index f631e55..0000000 --- a/docker/php/7.0-fpm-alpine/php.ini +++ /dev/null @@ -1,56 +0,0 @@ -[PHP] -expose_php = Off -disable_functions = exec,system,popen,passthru,apache_child_terminate,apache_get_modules,apache_get_version,apache_getenv,apache_note,apache_setenv,virtual,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority -enable_dl = Off -allow_url_fopen = On -allow_url_include = Off -engine = On -short_open_tag = On -output_buffering = 4096 -realpath_cache_size = 4096k -realpath_cache_ttl = 600 -include_path = .:/usr/share/php -date.timezone = Europe/Paris -default_socket_timeout = 10 -max_execution_time = 30 -max_input_time = 60 -max_input_vars = 1000 -memory_limit = 512M -post_max_size = 32M -file_uploads = On -upload_tmp_dir = /tmp -upload_max_filesize = 32M -max_file_uploads = 20 -error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT -display_errors = Off -display_startup_errors = Off -log_errors = On -html_errors = On -SMTP = mailcatcher -smtp_port = 1025 -sendmail_path = /usr/sbin/sendmail -t -i -mail_log = syslog -session.save_handler = memcached -session.save_path = memcached:11211 -session.use_cookies = 1 -session.cookie_secure = -session.use_only_cookies = 1 -session.name = PHPSESSID -session.auto_start = 0 -session.cookie_lifetime = 0 -session.cookie_path = / -session.cookie_domain = -session.cookie_httponly = -session.serialize_handler = php -session.gc_probability = 0 -session.gc_divisor = 1000 -session.gc_maxlifetime = 2592000 -session.bug_compat_42 = Off -session.bug_compat_warn = Off -session.referer_check = -session.entropy_length = 512 -session.entropy_file = /dev/urandom -session.cache_limiter = nocache -session.cache_expire = 180 -session.use_trans_sid = 0 -session.hash_function = 0 diff --git a/docker/php/7.0-fpm-alpine/xdebug.ini b/docker/php/7.0-fpm-alpine/xdebug.ini deleted file mode 100644 index efb017f..0000000 --- a/docker/php/7.0-fpm-alpine/xdebug.ini +++ /dev/null @@ -1,13 +0,0 @@ -xdebug.collect_params = 1 -xdebug.collect_return = 1 -xdebug.default_enable = 1 -xdebug.force_display_errors = 1 -xdebug.force_error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED -xdebug.halt_level = E_WARNING -xdebug.idekey = PHPSTORM -xdebug.max_nesting_level = 1024 -xdebug.remote_enable = 1 -xdebug.remote_connect_back = 1 -xdebug.scream = 0 -xdebug.show_error_trace = 1 -xdebug.show_exception_trace = 1 diff --git a/docker/php/7.1-fpm-alpine/Dockerfile b/docker/php/7.1-fpm-alpine/Dockerfile deleted file mode 100644 index 525a769..0000000 --- a/docker/php/7.1-fpm-alpine/Dockerfile +++ /dev/null @@ -1,262 +0,0 @@ -FROM php:7.1-fpm-alpine as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR -ARG AMQP_VERSION=stable -ARG AST_VERSION=stable -ARG APCU_VERSION=stable -ARG BLACKFIRE_VERSION=1.34.3 -ARG CACHETOOL_VERSION=4.0.1 -ARG DS_VERSION=stable -ARG EVENT_VERSION=stable -ARG IGBINARY_VERSION=stable -ARG IMAGICK_VERSION=stable -ARG GEOIP_VERSION=beta -ARG GRPC_VERSION=stable -ARG MCRYPT_VERSION=stable -ARG MEMCACHE_VERSION=4.0.1-php73 -ARG MEMCACHED_VERSION=stable -ARG MONGODB_VERSION=stable -ARG NEWRELIC_VERSION=9.11.0.267 -ARG OAUTH_VERSION=stable -ARG RAR_VERSION=stable -ARG REDIS_VERSION=stable -ARG SNUFFLEUPAGUS_VERSION=0.5.1 -ARG UUID_VERSION=stable -ARG XDEBUG_VERSION=stable -ARG XHPROF_VERSION=2.2.0 -ARG YAML_VERSION=stable - -RUN apk --no-cache upgrade \ - && apk add --no-cache --virtual .build-deps \ - $PHPIZE_DEPS \ - aspell-dev \ - bison \ - bzip2-dev \ - curl-dev \ - enchant-dev \ - flex \ - freetype-dev \ - gawk \ - geoip-dev \ - gettext-dev \ - gmp-dev \ - icu-dev \ - imagemagick-dev \ - imap-dev \ - libevent-dev \ - libjpeg-turbo-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libpng-dev \ - libressl-dev \ - libxml2-dev \ - libxslt-dev \ - make \ - net-snmp-dev \ - openldap-dev \ - postgresql-dev \ - pcre-dev \ - rabbitmq-c-dev \ - yaml-dev \ - zlib-dev \ - # blackfire \ - && wget https://packages.blackfire.io/binaries/blackfire-php/${BLACKFIRE_VERSION}/blackfire-php-alpine_amd64-php-$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;").so -O $(php -r "echo ini_get('extension_dir');")/blackfire.so \ - # gd \ - && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/ \ - # memcache \ - && wget https://github.com/websupport-sk/pecl-memcache/archive/v${MEMCACHE_VERSION}.tar.gz -O /tmp/memcache-${MEMCACHE_VERSION}.tar.gz \ - && mkdir -p /tmp/memcache-${MEMCACHE_VERSION} \ - && tar xzf /tmp/memcache-${MEMCACHE_VERSION}.tar.gz -C /tmp/memcache-${MEMCACHE_VERSION} --strip-components=1 \ - # https://github.com/websupport-sk/pecl-memcache/pull/39 \ - && sed -i '399s/);/, char *);/' /tmp/memcache-${MEMCACHE_VERSION}/php7/memcache_pool.h \ - # https://github.com/websupport-sk/pecl-memcache/pull/40 \ - && sed -i '47i#if PHP_VERSION_ID < 70200\n register size_t newlen;\n#endif' /tmp/memcache-${MEMCACHE_VERSION}/php7/memcache_pool.c \ - # newrelic \ - && wget https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz -O /tmp/newrelic-${NEWRELIC_VERSION}.tar.gz \ - && mkdir -p /tmp/newrelic-${NEWRELIC_VERSION} \ - && tar xzf /tmp/newrelic-${NEWRELIC_VERSION}.tar.gz -C /tmp/newrelic-${NEWRELIC_VERSION} --strip-components=1 \ - && mv /tmp/newrelic-${NEWRELIC_VERSION}/agent/x64/newrelic-20160303.so $(php -r "echo ini_get('extension_dir');")/newrelic.so \ - # snuffleupagus \ - && wget https://github.com/jvoisin/snuffleupagus/archive/v${SNUFFLEUPAGUS_VERSION}.tar.gz -O /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}.tar.gz \ - && mkdir -p /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION} \ - && tar xzf /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}.tar.gz -C /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION} --strip-components=1 \ - && docker-php-ext-configure /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}/src --prefix=/usr --enable-snuffleupagus \ - # xhprof \ - && wget https://github.com/longxinH/xhprof/archive/v${XHPROF_VERSION}.tar.gz -O /tmp/xhprof-${XHPROF_VERSION}.tar.gz \ - && mkdir -p /tmp/xhprof-${XHPROF_VERSION} \ - && tar xzf /tmp/xhprof-${XHPROF_VERSION}.tar.gz -C /tmp/xhprof-${XHPROF_VERSION} --strip-components=1 \ - && docker-php-ext-configure /tmp/xhprof-${XHPROF_VERSION}/extension --with-php-config=/usr/local/bin/php-config \ - && docker-php-ext-install -j$(nproc) \ - bcmath \ - bz2 \ - calendar \ - dba \ - enchant \ - exif \ - gd \ - gettext \ - gmp \ - imap \ - intl \ - ldap \ - mcrypt \ - /tmp/memcache-${MEMCACHE_VERSION} \ - mysqli \ - opcache \ - pcntl \ - pdo_mysql \ - pdo_pgsql \ - pgsql \ - pspell \ - shmop \ - snmp \ - soap \ - sockets \ - sysvmsg \ - sysvsem \ - sysvshm \ - /tmp/xhprof-${XHPROF_VERSION}/extension \ - xmlrpc \ - xsl \ - zip \ - # docker-php-ext-install fails after snuffleupagus is enabled - /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}/src \ - && docker-php-source delete \ - && rm /usr/local/etc/php/conf.d/docker-php-ext-* \ - && rm -rf /tmp/memcache-* \ - && rm -rf /tmp/newrelic-* \ - && rm -rf /tmp/snuffleupagus-* \ - && rm -rf /tmp/xhprof-* \ - && pecl install amqp-${AMQP_VERSION} \ - && pecl install apcu-${APCU_VERSION} \ - && pecl install ast-${AST_VERSION} \ - && pecl install ds-${DS_VERSION} \ - && pecl install event-${EVENT_VERSION} \ - && pecl install geoip-${GEOIP_VERSION} \ - && pecl install grpc-${GRPC_VERSION} \ - && pecl install igbinary-${IGBINARY_VERSION} \ - && pecl install imagick-${IMAGICK_VERSION} \ - && pecl install memcached-${MEMCACHED_VERSION} \ - && pecl install mongodb-${MONGODB_VERSION} \ - && pecl install oauth-${OAUTH_VERSION} \ - && pecl install rar-${RAR_VERSION} \ - && pecl install redis-${REDIS_VERSION} \ - && echo |pecl install uuid-${UUID_VERSION} \ - && pecl install xdebug-${XDEBUG_VERSION} \ - && pecl install yaml-${YAML_VERSION} \ - && pecl clear-cache \ - && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr/local \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | xargs -r apk info --installed \ - | sort -u \ - )" \ - && apk del .build-deps \ - && apk add --no-cache --virtual .run-deps $runDeps - -RUN wget http://gordalina.github.io/cachetool/downloads/cachetool-${CACHETOOL_VERSION}.phar -O /usr/local/bin/cachetool \ - && chmod +x /usr/local/bin/cachetool \ - && echo -e "\ -adapter: fastcgi \n\ -fastcgi: 127.0.0.1:9000 \n\ -" > /etc/cachetool.yml - -RUN mkdir -p /etc/ssh && echo -e "\ -Host * \n\ - Compression yes \n\ -" >> /etc/ssh/ssh_config - -RUN apk add --no-cache \ - bash \ - bzip2 \ - coreutils \ - gettext \ - git \ - imagemagick \ - lftp \ - mailx \ - make \ - mysql-client \ - nano \ - openssh-client \ - ssmtp \ - vim - -# Iconv fix: https://github.com/docker-library/php/issues/240#issuecomment-305038173 -RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ gnu-libiconv -ENV LD_PRELOAD=/usr/lib/preloadable_libiconv.so - -# builtin modules : Core ctype curl date dom fileinfo filter ftp hash iconv json libxml mbstring mysqlnd openssl pcre PDO pdo_sqlite Phar posix readline Reflection session SimpleXML SPL sqlite3 standard tokenizer xml xmlreader xmlwriter zlib -# available modules : amqp apcu ast bcmath blackfire bz2 calendar dba ds enchant event exif gd geoip gmp grpc igbinary imap imagick intl ldap mcrypt memcache memcached mongodb mysqli newrelic oauth opcache pcntl pdo_mysql pdo_pgsql pgsql pspell rar redis shmop snmp snuffleupagus soap sockets sysvmsg sysvsem sysvshm xhprof uuid wddx xdebug xhprof xmlrpc xsl yaml zip -ARG PHP_EXT_ENABLE="amqp apcu bcmath bz2 calendar gd geoip imagick intl mcrypt memcached mysqli oauth opcache pdo_mysql redis soap sockets uuid yaml zip" -RUN docker-php-ext-enable ${PHP_EXT_ENABLE} - -# copy *.ini -COPY ${DOCKER_BUILD_DIR}/*.ini /usr/local/etc/php/conf.d/ -COPY ${DOCKER_BUILD_DIR}/php-fpm-*.conf /usr/local/etc/php-fpm.d/ - -# custom php config -ARG PHP_INI_CONFIG -RUN echo -e ${PHP_INI_CONFIG// /\\n} >> /usr/local/etc/php/conf.d/config.ini - -# custom php cli -ARG PHP_CLI_CONFIG="apc.enable_cli=0 max_execution_time=-1 memory_limit=-1 opcache.enable_cli=0 xdebug.default_enable=0" -RUN echo '#!/usr/bin/env sh' > /usr/local/bin/php-cli \ - && chmod +x /usr/local/bin/php-cli \ - && echo -e "\ -/usr/local/bin/php -d ${PHP_CLI_CONFIG// / -d } \"\$@\"\ -" >> /usr/local/bin/php-cli - -# install cronlock -ADD https://raw.github.com/kvz/cronlock/master/cronlock /usr/bin/cronlock -RUN chmod +rx /usr/bin/cronlock - -# config ssmtp -RUN echo "FromLineOverride=YES" >> /etc/ssmtp/ssmtp.conf - -# https://bugs.php.net/bug.php?id=71880 -ENV LOG_STREAM="/tmp/stdout" -RUN mkfifo $LOG_STREAM && chmod 777 $LOG_STREAM - -# default www-data homedir to /var/www for crontabs -RUN sed -i 's|/home/www-data|/var/www|' /etc/passwd -WORKDIR /var/www - -# redirect LOG_STREAM to stdout and start php-fpm with environment variables from .env -CMD [ "sh", "-c", "(exec 3<>$LOG_STREAM; cat <&3 >&1 & IFS=$'\n'; exec env $(cat .env 2>/dev/null) php-fpm)" ] - -FROM dist as master -ARG UID -ARG USER -ENV UID=${UID} -ENV GID=${UID} -ENV USER=${USER} - -# If we provide a specific UID -RUN let $UID >/dev/null 2>&1 \ -# Remove user with $UID if it is not our $USER - && if [ "$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')" != "$USER" ]; then \ - sed -i '/^'$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')':x:'$UID':/d' /etc/passwd; \ - sed -i '/^'$(getent group $GID |awk 'BEGIN {FS=":"} {print $1}')':x:'$GID':/d' /etc/group; \ - fi \ -# Force $UID if our $USER already exists - && sed -i 's/^'$USER':x:[0-9]\+:[0-9]\+:/'$USER':x:'$UID':'$GID':/' /etc/passwd \ - && sed -i 's/^'$USER':x:[0-9]\+:/'$USER':x:'$GID':/' /etc/group \ -# Create $USER if it does not exist - && if [ "$(getent passwd $UID)" = "" ]; then \ - echo "$USER:x:$UID:$GID::/home/$USER:/bin/false" >> /etc/passwd; \ - echo "$USER:!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \ - echo "$USER:x:$GID:" >> /etc/group; \ - fi \ - && mkdir -p /home/$USER \ - && chown $UID:$GID /home/$USER \ - || true - -RUN chown -R $USER /usr/local/etc/php/conf.d/ - -USER $USER - -ARG SSH_REMOTE_HOSTS - -RUN mkdir -p ~/.ssh \ - && ssh-keyscan -t rsa -H $SSH_REMOTE_HOSTS >> ~/.ssh/known_hosts diff --git a/docker/php/7.1-fpm-alpine/apc.ini b/docker/php/7.1-fpm-alpine/apc.ini deleted file mode 100644 index 448cee9..0000000 --- a/docker/php/7.1-fpm-alpine/apc.ini +++ /dev/null @@ -1,5 +0,0 @@ -apc.enable_cli = 0 -apc.enabled = 1 -apc.shm_segments = 1 -apc.shm_size = 32M - diff --git a/docker/php/7.1-fpm-alpine/blackfire.ini b/docker/php/7.1-fpm-alpine/blackfire.ini deleted file mode 100644 index 566668c..0000000 --- a/docker/php/7.1-fpm-alpine/blackfire.ini +++ /dev/null @@ -1 +0,0 @@ -blackfire.agent_socket=tcp://blackfire:8707 diff --git a/docker/php/7.1-fpm-alpine/memcached.ini b/docker/php/7.1-fpm-alpine/memcached.ini deleted file mode 100644 index 361f58b..0000000 --- a/docker/php/7.1-fpm-alpine/memcached.ini +++ /dev/null @@ -1 +0,0 @@ -memcached.sess_locking = Off \ No newline at end of file diff --git a/docker/php/7.1-fpm-alpine/newrelic.ini b/docker/php/7.1-fpm-alpine/newrelic.ini deleted file mode 100644 index d90b2dc..0000000 --- a/docker/php/7.1-fpm-alpine/newrelic.ini +++ /dev/null @@ -1,4 +0,0 @@ -[newrelic] -newrelic.logfile = /dev/self/fd/2 -newrelic.daemon.logfile = /dev/self/fd/2 - diff --git a/docker/php/7.1-fpm-alpine/opcache.ini b/docker/php/7.1-fpm-alpine/opcache.ini deleted file mode 100644 index b0244ec..0000000 --- a/docker/php/7.1-fpm-alpine/opcache.ini +++ /dev/null @@ -1,8 +0,0 @@ -opcache.enable = 1 -opcache.enable_cli = 0 -opcache.error_log = /proc/self/fd/2 -opcache.interned_strings_buffer = 16 -opcache.log_verbosity_level = 2 -opcache.max_accelerated_files = 20000 -opcache.memory_consumption = 256 -opcache.validate_timestamps = 1 diff --git a/docker/php/7.1-fpm-alpine/php-fpm-pool.conf b/docker/php/7.1-fpm-alpine/php-fpm-pool.conf deleted file mode 100644 index bfc8efa..0000000 --- a/docker/php/7.1-fpm-alpine/php-fpm-pool.conf +++ /dev/null @@ -1,412 +0,0 @@ -; Start a new pool named 'www'. -; the variable $pool can we used in any directive and will be replaced by the -; pool name ('www' here) -[www] - -; Per pool prefix -; It only applies on the following directives: -; - 'access.log' -; - 'slowlog' -; - 'listen' (unixsocket) -; - 'chroot' -; - 'chdir' -; - 'php_values' -; - 'php_admin_values' -; When not set, the global prefix (or /usr) applies instead. -; Note: This directive can also be relative to the global prefix. -; Default Value: none -;prefix = /path/to/pools/$pool - -; Unix user/group of processes -; Note: The user is mandatory. If the group is not set, the default user's group -; will be used. -user = www-data -group = www-data - -; The address on which to accept FastCGI requests. -; Valid syntaxes are: -; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on -; a specific port; -; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on -; a specific port; -; 'port' - to listen on a TCP socket to all IPv4 addresses on a -; specific port; -; '[::]:port' - to listen on a TCP socket to all addresses -; (IPv6 and IPv4-mapped) on a specific port; -; '/path/to/unix/socket' - to listen on a unix socket. -; Note: This value is mandatory. -;listen = /var/run/php5-fpm.sock -listen = 0.0.0.0:9000 - -; Set listen(2) backlog. -; Default Value: 65535 (-1 on FreeBSD and OpenBSD) -listen.backlog = 1023 - -; Set permissions for unix socket, if one is used. In Linux, read/write -; permissions must be set in order to allow connections from a web server. Many -; BSD-derived systems allow connections regardless of permissions. -; Default Values: user and group are set as the running user -; mode is set to 0660 -;listen.owner = www-data -;listen.group = www-data -;listen.mode = 0660 -; When POSIX Access Control Lists are supported you can set them using -; these options, value is a comma separated list of user/group names. -; When set, listen.owner and listen.group are ignored -;listen.acl_users = -;listen.acl_groups = - -; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect. -; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original -; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address -; must be separated by a comma. If this value is left blank, connections will be -; accepted from any ip address. -; Default Value: any -;listen.allowed_clients = 0.0.0.0 - -; Specify the nice(2) priority to apply to the pool processes (only if set) -; The value can vary from -19 (highest priority) to 20 (lower priority) -; Note: - It will only work if the FPM master process is launched as root -; - The pool processes will inherit the master process priority -; unless it specified otherwise -; Default Value: no set -; process.priority = -19 - -; Choose how the process manager will control the number of child processes. -; Possible Values: -; static - a fixed number (pm.max_children) of child processes; -; dynamic - the number of child processes are set dynamically based on the -; following directives. With this process management, there will be -; always at least 1 children. -; pm.max_children - the maximum number of children that can -; be alive at the same time. -; pm.start_servers - the number of children created on startup. -; pm.min_spare_servers - the minimum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is less than this -; number then some children will be created. -; pm.max_spare_servers - the maximum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is greater than this -; number then some children will be killed. -; ondemand - no children are created at startup. Children will be forked when -; new requests will connect. The following parameter are used: -; pm.max_children - the maximum number of children that -; can be alive at the same time. -; pm.process_idle_timeout - The number of seconds after which -; an idle process will be killed. -; Note: This value is mandatory. -pm = dynamic - -; The number of child processes to be created when pm is set to 'static' and the -; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. -; This value sets the limit on the number of simultaneous requests that will be -; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. -; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP -; CGI. The below defaults are based on a server without much resources. Don't -; forget to tweak pm.* to fit your needs. -; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' -; Note: This value is mandatory. -pm.max_children = 16 - -; The number of child processes created on startup. -; Note: Used only when pm is set to 'dynamic' -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 -pm.start_servers = 2 - -; The desired minimum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = 1 - -; The desired maximum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = 3 - -; The number of seconds after which an idle process will be killed. -; Note: Used only when pm is set to 'ondemand' -; Default Value: 10s -;pm.process_idle_timeout = 10s; - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. For -; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default Value: 0 -;pm.max_requests = 500 - -; The URI to view the FPM status page. If this value is not set, no URI will be -; recognized as a status page. It shows the following informations: -; pool - the name of the pool; -; process manager - static, dynamic or ondemand; -; start time - the date and time FPM has started; -; start since - number of seconds since FPM has started; -; accepted conn - the number of request accepted by the pool; -; listen queue - the number of request in the queue of pending -; connections (see backlog in listen(2)); -; max listen queue - the maximum number of requests in the queue -; of pending connections since FPM has started; -; listen queue len - the size of the socket queue of pending connections; -; idle processes - the number of idle processes; -; active processes - the number of active processes; -; total processes - the number of idle + active processes; -; max active processes - the maximum number of active processes since FPM -; has started; -; max children reached - number of times, the process limit has been reached, -; when pm tries to start more children (works only for -; pm 'dynamic' and 'ondemand'); -; Value are updated in real time. -; Example output: -; pool: www -; process manager: static -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 62636 -; accepted conn: 190460 -; listen queue: 0 -; max listen queue: 1 -; listen queue len: 42 -; idle processes: 4 -; active processes: 11 -; total processes: 15 -; max active processes: 12 -; max children reached: 0 -; -; By default the status page output is formatted as text/plain. Passing either -; 'html', 'xml' or 'json' in the query string will return the corresponding -; output syntax. Example: -; http://www.foo.bar/status -; http://www.foo.bar/status?json -; http://www.foo.bar/status?html -; http://www.foo.bar/status?xml -; -; By default the status page only outputs short status. Passing 'full' in the -; query string will also return status for each pool process. -; Example: -; http://www.foo.bar/status?full -; http://www.foo.bar/status?json&full -; http://www.foo.bar/status?html&full -; http://www.foo.bar/status?xml&full -; The Full status returns for each process: -; pid - the PID of the process; -; state - the state of the process (Idle, Running, ...); -; start time - the date and time the process has started; -; start since - the number of seconds since the process has started; -; requests - the number of requests the process has served; -; request duration - the duration in µs of the requests; -; request method - the request method (GET, POST, ...); -; request URI - the request URI with the query string; -; content length - the content length of the request (only with POST); -; user - the user (PHP_AUTH_USER) (or '-' if not set); -; script - the main script called (or '-' if not set); -; last request cpu - the %cpu the last request consumed -; it's always 0 if the process is not in Idle state -; because CPU calculation is done when the request -; processing has terminated; -; last request memory - the max amount of memory the last request consumed -; it's always 0 if the process is not in Idle state -; because memory calculation is done when the request -; processing has terminated; -; If the process is in Idle state, then informations are related to the -; last request the process has served. Otherwise informations are related to -; the current request being served. -; Example output: -; ************************ -; pid: 31330 -; state: Running -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 63087 -; requests: 12808 -; request duration: 1250261 -; request method: GET -; request URI: /test_mem.php?N=10000 -; content length: 0 -; user: - -; script: /home/fat/web/docs/php/test_mem.php -; last request cpu: 0.00 -; last request memory: 0 -; -; Note: There is a real-time FPM status monitoring sample web page available -; It's available in: /usr/share/php5/fpm/status.html -; -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -pm.status_path = /php-fpm-status - -; The ping URI to call the monitoring page of FPM. If this value is not set, no -; URI will be recognized as a ping page. This could be used to test from outside -; that FPM is alive and responding, or to -; - create a graph of FPM availability (rrd or such); -; - remove a server from a group if it is not responding (load balancing); -; - trigger alerts for the operating team (24/7). -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -ping.path = /php-fpm-ping - -; This directive may be used to customize the response of a ping request. The -; response is formatted as text/plain with a 200 response code. -; Default Value: pong -;ping.response = pong - -; The access log file -; Default: not set -;access.log = log/$pool.access.log - -; The access log format. -; The following syntax is allowed -; %%: the '%' character -; %C: %CPU used by the request -; it can accept the following format: -; - %{user}C for user CPU only -; - %{system}C for system CPU only -; - %{total}C for user + system CPU (default) -; %d: time taken to serve the request -; it can accept the following format: -; - %{seconds}d (default) -; - %{miliseconds}d -; - %{mili}d -; - %{microseconds}d -; - %{micro}d -; %e: an environment variable (same as $_ENV or $_SERVER) -; it must be associated with embraces to specify the name of the env -; variable. Some exemples: -; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e -; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e -; %f: script filename -; %l: content-length of the request (for POST request only) -; %m: request method -; %M: peak of memory allocated by PHP -; it can accept the following format: -; - %{bytes}M (default) -; - %{kilobytes}M -; - %{kilo}M -; - %{megabytes}M -; - %{mega}M -; %n: pool name -; %o: output header -; it must be associated with embraces to specify the name of the header: -; - %{Content-Type}o -; - %{X-Powered-By}o -; - %{Transfert-Encoding}o -; - .... -; %p: PID of the child that serviced the request -; %P: PID of the parent of the child that serviced the request -; %q: the query string -; %Q: the '?' character if query string exists -; %r: the request URI (without the query string, see %q and %Q) -; %R: remote IP address -; %s: status (response code) -; %t: server time the request was received -; it can accept a strftime(3) format: -; %d/%b/%Y:%H:%M:%S %z (default) -; %T: time the log has been written (the request has finished) -; it can accept a strftime(3) format: -; %d/%b/%Y:%H:%M:%S %z (default) -; %u: remote user -; -; Default: "%R - %u %t \"%m %r\" %s" -;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" - -; The log file for slow requests -; Default Value: not set -; Note: slowlog is mandatory if request_slowlog_timeout is set -;slowlog = log/$pool.log.slow - -; The timeout for serving a single request after which a PHP backtrace will be -; dumped to the 'slowlog' file. A value of '0s' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -;request_slowlog_timeout = 0 - -; The timeout for serving a single request after which the worker process will -; be killed. This option should be used when the 'max_execution_time' ini option -; does not stop script execution for some reason. A value of '0' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -;request_terminate_timeout = 5m - -; Set open file descriptor rlimit. -; Default Value: system defined value -;rlimit_files = 1024 - -; Set max core size rlimit. -; Possible Values: 'unlimited' or an integer greater or equal to 0 -; Default Value: system defined value -;rlimit_core = 0 - -; Chroot to this directory at the start. This value must be defined as an -; absolute path. When this value is not set, chroot is not used. -; Note: you can prefix with '$prefix' to chroot to the pool prefix or one -; of its subdirectories. If the pool prefix is not set, the global prefix -; will be used instead. -; Note: chrooting is a great security feature and should be used whenever -; possible. However, all PHP paths will be relative to the chroot -; (error_log, sessions.save_path, ...). -; Default Value: not set -;chroot = - -; Chdir to this directory at the start. -; Note: relative path can be used. -; Default Value: current directory or / when chroot -chdir = / - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - -; Clear environment in FPM workers -; Prevents arbitrary environment variables from reaching FPM worker processes -; by clearing the environment in workers before env vars specified in this -; pool configuration are added. -; Setting to "no" will make all environment variables available to PHP code -; via getenv(), $_ENV and $_SERVER. -; Default Value: yes -;clear_env = no - -; Limits the extensions of the main script FPM will allow to parse. This can -; prevent configuration mistakes on the web server side. You should only limit -; FPM to .php extensions to prevent malicious users to use other extensions to -; exectute php code. -; Note: set an empty value to allow all extensions. -; Default Value: .php -;security.limit_extensions = .php .php3 .php4 .php5 - -; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from -; the current environment. -; Default Value: clean env -;env[HOSTNAME] = $HOSTNAME -;env[PATH] = /usr/local/bin:/usr/bin:/bin -;env[TMP] = /tmp -;env[TMPDIR] = /tmp -;env[TEMP] = /tmp - -; Additional php.ini defines, specific to this pool of workers. These settings -; overwrite the values previously defined in the php.ini. The directives are the -; same as the PHP SAPI: -; php_value/php_flag - you can set classic ini defines which can -; be overwritten from PHP call 'ini_set'. -; php_admin_value/php_admin_flag - these directives won't be overwritten by -; PHP call 'ini_set' -; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. - -; Defining 'extension' will load the corresponding shared extension from -; extension_dir. Defining 'disable_functions' or 'disable_classes' will not -; overwrite previously defined php.ini values, but will append the new value -; instead. - -; Note: path INI options can be relative and will be expanded with the prefix -; (pool, global or /usr) - -; Default Value: nothing is defined by default except the values in php.ini and -; specified at startup with the -d argument -;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com -;php_flag[display_errors] = off -;php_admin_value[error_log] = /var/log/fpm-php.www.log -;php_admin_flag[log_errors] = on -;php_admin_value[memory_limit] = 32M diff --git a/docker/php/7.1-fpm-alpine/php.ini b/docker/php/7.1-fpm-alpine/php.ini deleted file mode 100644 index f631e55..0000000 --- a/docker/php/7.1-fpm-alpine/php.ini +++ /dev/null @@ -1,56 +0,0 @@ -[PHP] -expose_php = Off -disable_functions = exec,system,popen,passthru,apache_child_terminate,apache_get_modules,apache_get_version,apache_getenv,apache_note,apache_setenv,virtual,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority -enable_dl = Off -allow_url_fopen = On -allow_url_include = Off -engine = On -short_open_tag = On -output_buffering = 4096 -realpath_cache_size = 4096k -realpath_cache_ttl = 600 -include_path = .:/usr/share/php -date.timezone = Europe/Paris -default_socket_timeout = 10 -max_execution_time = 30 -max_input_time = 60 -max_input_vars = 1000 -memory_limit = 512M -post_max_size = 32M -file_uploads = On -upload_tmp_dir = /tmp -upload_max_filesize = 32M -max_file_uploads = 20 -error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT -display_errors = Off -display_startup_errors = Off -log_errors = On -html_errors = On -SMTP = mailcatcher -smtp_port = 1025 -sendmail_path = /usr/sbin/sendmail -t -i -mail_log = syslog -session.save_handler = memcached -session.save_path = memcached:11211 -session.use_cookies = 1 -session.cookie_secure = -session.use_only_cookies = 1 -session.name = PHPSESSID -session.auto_start = 0 -session.cookie_lifetime = 0 -session.cookie_path = / -session.cookie_domain = -session.cookie_httponly = -session.serialize_handler = php -session.gc_probability = 0 -session.gc_divisor = 1000 -session.gc_maxlifetime = 2592000 -session.bug_compat_42 = Off -session.bug_compat_warn = Off -session.referer_check = -session.entropy_length = 512 -session.entropy_file = /dev/urandom -session.cache_limiter = nocache -session.cache_expire = 180 -session.use_trans_sid = 0 -session.hash_function = 0 diff --git a/docker/php/7.1-fpm-alpine/xdebug.ini b/docker/php/7.1-fpm-alpine/xdebug.ini deleted file mode 100644 index efb017f..0000000 --- a/docker/php/7.1-fpm-alpine/xdebug.ini +++ /dev/null @@ -1,13 +0,0 @@ -xdebug.collect_params = 1 -xdebug.collect_return = 1 -xdebug.default_enable = 1 -xdebug.force_display_errors = 1 -xdebug.force_error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED -xdebug.halt_level = E_WARNING -xdebug.idekey = PHPSTORM -xdebug.max_nesting_level = 1024 -xdebug.remote_enable = 1 -xdebug.remote_connect_back = 1 -xdebug.scream = 0 -xdebug.show_error_trace = 1 -xdebug.show_exception_trace = 1 diff --git a/docker/php/7.2-fpm-alpine/Dockerfile b/docker/php/7.2-fpm-alpine/Dockerfile deleted file mode 100644 index a9bea93..0000000 --- a/docker/php/7.2-fpm-alpine/Dockerfile +++ /dev/null @@ -1,267 +0,0 @@ -FROM php:7.2-fpm-alpine as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR -ARG AMQP_VERSION=stable -ARG AST_VERSION=stable -ARG APCU_VERSION=stable -ARG BLACKFIRE_VERSION=1.34.3 -ARG CACHETOOL_VERSION=4.0.1 -ARG DS_VERSION=stable -ARG EVENT_VERSION=stable -ARG IGBINARY_VERSION=stable -ARG IMAGICK_VERSION=stable -ARG GEOIP_VERSION=beta -ARG GRPC_VERSION=stable -ARG MCRYPT_VERSION=stable -ARG MEMCACHE_VERSION=4.0.1-php73 -ARG MEMCACHED_VERSION=stable -ARG MONGODB_VERSION=stable -ARG NEWRELIC_VERSION=9.11.0.267 -ARG OAUTH_VERSION=stable -ARG RAR_VERSION=stable -ARG REDIS_VERSION=stable -ARG SNUFFLEUPAGUS_VERSION=0.5.1 -ARG UUID_VERSION=stable -ARG XDEBUG_VERSION=stable -ARG XHPROF_VERSION=2.2.0 -ARG YAML_VERSION=stable - -RUN apk --no-cache upgrade \ - && apk add --no-cache --virtual .build-deps \ - $PHPIZE_DEPS \ - aspell-dev \ - bison \ - bzip2-dev \ - curl-dev \ - enchant2-dev \ - flex \ - freetype-dev \ - gawk \ - geoip-dev \ - gettext-dev \ - gmp-dev \ - icu-dev \ - imagemagick-dev \ - imap-dev \ - libevent-dev \ - libjpeg-turbo-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libpng-dev \ - libressl-dev \ - libxml2-dev \ - libxslt-dev \ - make \ - net-snmp-dev \ - openldap-dev \ - patch \ - postgresql-dev \ - pcre-dev \ - rabbitmq-c-dev \ - yaml-dev \ - zlib-dev \ - # blackfire \ - && wget https://packages.blackfire.io/binaries/blackfire-php/${BLACKFIRE_VERSION}/blackfire-php-alpine_amd64-php-$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;").so -O $(php -r "echo ini_get('extension_dir');")/blackfire.so \ - # enchant \ - && docker-php-source extract \ - && wget "https://git.alpinelinux.org/aports/plain/community/php7/enchant-2.patch?id=3f8d7d2e5e558a975f79b6470423b32e01c0bfbc" -O /usr/src/php-enchant-2.patch \ - && cd /usr/src/php && patch -p1 < ../php-enchant-2.patch \ - # gd \ - && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/ \ - # memcache \ - && wget https://github.com/websupport-sk/pecl-memcache/archive/v${MEMCACHE_VERSION}.tar.gz -O /tmp/memcache-${MEMCACHE_VERSION}.tar.gz \ - && mkdir -p /tmp/memcache-${MEMCACHE_VERSION} \ - && tar xzf /tmp/memcache-${MEMCACHE_VERSION}.tar.gz -C /tmp/memcache-${MEMCACHE_VERSION} --strip-components=1 \ - # https://github.com/websupport-sk/pecl-memcache/pull/39 \ - && sed -i '399s/);/, char *);/' /tmp/memcache-${MEMCACHE_VERSION}/php7/memcache_pool.h \ - # https://github.com/websupport-sk/pecl-memcache/pull/40 \ - && sed -i '47i#if PHP_VERSION_ID < 70200\n register size_t newlen;\n#endif' /tmp/memcache-${MEMCACHE_VERSION}/php7/memcache_pool.c \ - # newrelic \ - && wget https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz -O /tmp/newrelic-${NEWRELIC_VERSION}.tar.gz \ - && mkdir -p /tmp/newrelic-${NEWRELIC_VERSION} \ - && tar xzf /tmp/newrelic-${NEWRELIC_VERSION}.tar.gz -C /tmp/newrelic-${NEWRELIC_VERSION} --strip-components=1 \ - && mv /tmp/newrelic-${NEWRELIC_VERSION}/agent/x64/newrelic-20170718.so $(php -r "echo ini_get('extension_dir');")/newrelic.so \ - # snuffleupagus \ - && wget https://github.com/jvoisin/snuffleupagus/archive/v${SNUFFLEUPAGUS_VERSION}.tar.gz -O /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}.tar.gz \ - && mkdir -p /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION} \ - && tar xzf /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}.tar.gz -C /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION} --strip-components=1 \ - && docker-php-ext-configure /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}/src --prefix=/usr --enable-snuffleupagus \ - # xhprof \ - && wget https://github.com/longxinH/xhprof/archive/v${XHPROF_VERSION}.tar.gz -O /tmp/xhprof-${XHPROF_VERSION}.tar.gz \ - && mkdir -p /tmp/xhprof-${XHPROF_VERSION} \ - && tar xzf /tmp/xhprof-${XHPROF_VERSION}.tar.gz -C /tmp/xhprof-${XHPROF_VERSION} --strip-components=1 \ - && docker-php-ext-configure /tmp/xhprof-${XHPROF_VERSION}/extension --with-php-config=/usr/local/bin/php-config \ - && docker-php-ext-install -j$(nproc) \ - bcmath \ - bz2 \ - calendar \ - dba \ - enchant \ - exif \ - gd \ - gettext \ - gmp \ - imap \ - intl \ - ldap \ - /tmp/memcache-${MEMCACHE_VERSION} \ - mysqli \ - opcache \ - pcntl \ - pdo_mysql \ - pdo_pgsql \ - pgsql \ - pspell \ - shmop \ - snmp \ - soap \ - sockets \ - sysvmsg \ - sysvsem \ - sysvshm \ - /tmp/xhprof-${XHPROF_VERSION}/extension \ - xmlrpc \ - xsl \ - zip \ - # docker-php-ext-install fails after snuffleupagus is enabled - /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}/src \ - && docker-php-source delete \ - && rm /usr/local/etc/php/conf.d/docker-php-ext-* \ - && rm -rf /tmp/memcache-* \ - && rm -rf /tmp/newrelic-* \ - && rm -rf /tmp/snuffleupagus-* \ - && rm -rf /tmp/xhprof-* \ - && pecl install amqp-${AMQP_VERSION} \ - && pecl install apcu-${APCU_VERSION} \ - && pecl install ast-${AST_VERSION} \ - && pecl install ds-${DS_VERSION} \ - && pecl install event-${EVENT_VERSION} \ - && pecl install geoip-${GEOIP_VERSION} \ - && pecl install grpc-${GRPC_VERSION} \ - && pecl install igbinary-${IGBINARY_VERSION} \ - && pecl install imagick-${IMAGICK_VERSION} \ - && pecl install memcached-${MEMCACHED_VERSION} \ - && pecl install mongodb-${MONGODB_VERSION} \ - && pecl install oauth-${OAUTH_VERSION} \ - && pecl install rar-${RAR_VERSION} \ - && pecl install redis-${REDIS_VERSION} \ - && echo |pecl install uuid-${UUID_VERSION} \ - && echo |pecl install mcrypt-${MCRYPT_VERSION} \ - && pecl install xdebug-${XDEBUG_VERSION} \ - && pecl install yaml-${YAML_VERSION} \ - && pecl clear-cache \ - && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr/local \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | xargs -r apk info --installed \ - | sort -u \ - )" \ - && apk del .build-deps \ - && apk add --no-cache --virtual .run-deps $runDeps - -RUN wget http://gordalina.github.io/cachetool/downloads/cachetool-${CACHETOOL_VERSION}.phar -O /usr/local/bin/cachetool \ - && chmod +x /usr/local/bin/cachetool \ - && echo -e "\ -adapter: fastcgi \n\ -fastcgi: 127.0.0.1:9000 \n\ -" > /etc/cachetool.yml - -RUN mkdir -p /etc/ssh && echo -e "\ -Host * \n\ - Compression yes \n\ -" >> /etc/ssh/ssh_config - -RUN apk add --no-cache \ - bash \ - bzip2 \ - coreutils \ - gettext \ - git \ - imagemagick \ - lftp \ - mailx \ - make \ - mysql-client \ - nano \ - openssh-client \ - ssmtp \ - vim - -# Iconv fix: https://github.com/docker-library/php/issues/240#issuecomment-305038173 -RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ gnu-libiconv -ENV LD_PRELOAD=/usr/lib/preloadable_libiconv.so - -# builtin modules : Core ctype curl date dom fileinfo filter ftp hash iconv json libxml mbstring mysqlnd openssl pcre PDO pdo_sqlite Phar posix readline Reflection session SimpleXML SPL sqlite3 standard tokenizer xml xmlreader xmlwriter zlib -# available modules : amqp apcu ast bcmath blackfire bz2 calendar dba ds enchant event exif gd geoip gmp grpc igbinary imap imagick intl ldap mcrypt memcache memcached mongodb mysqli newrelic oauth opcache pcntl pdo_mysql pdo_pgsql pgsql pspell rar redis shmop snmp snuffleupagus soap sockets sysvmsg sysvsem sysvshm xhprof uuid wddx xdebug xhprof xmlrpc xsl yaml zip -ARG PHP_EXT_ENABLE="amqp apcu bcmath bz2 calendar gd geoip imagick intl mcrypt memcached mysqli oauth opcache pdo_mysql redis soap sockets uuid yaml zip" -RUN docker-php-ext-enable ${PHP_EXT_ENABLE} - -# copy *.ini -COPY ${DOCKER_BUILD_DIR}/*.ini /usr/local/etc/php/conf.d/ -COPY ${DOCKER_BUILD_DIR}/php-fpm-*.conf /usr/local/etc/php-fpm.d/ - -# custom php config -ARG PHP_INI_CONFIG -RUN echo -e ${PHP_INI_CONFIG// /\\n} >> /usr/local/etc/php/conf.d/config.ini - -# custom php cli -ARG PHP_CLI_CONFIG="apc.enable_cli=0 max_execution_time=-1 memory_limit=-1 opcache.enable_cli=0 xdebug.default_enable=0" -RUN echo '#!/usr/bin/env sh' > /usr/local/bin/php-cli \ - && chmod +x /usr/local/bin/php-cli \ - && echo -e "\ -/usr/local/bin/php -d ${PHP_CLI_CONFIG// / -d } \"\$@\"\ -" >> /usr/local/bin/php-cli - -# install cronlock -ADD https://raw.github.com/kvz/cronlock/master/cronlock /usr/bin/cronlock -RUN chmod +rx /usr/bin/cronlock - -# config ssmtp -RUN echo "FromLineOverride=YES" >> /etc/ssmtp/ssmtp.conf - -# https://bugs.php.net/bug.php?id=71880 -ENV LOG_STREAM="/tmp/stdout" -RUN mkfifo $LOG_STREAM && chmod 777 $LOG_STREAM - -# default www-data homedir to /var/www for crontabs -RUN sed -i 's|/home/www-data|/var/www|' /etc/passwd -WORKDIR /var/www - -# redirect LOG_STREAM to stdout and start php-fpm with environment variables from .env -CMD [ "sh", "-c", "(exec 3<>$LOG_STREAM; cat <&3 >&1 & IFS=$'\n'; exec env $(cat .env 2>/dev/null) php-fpm)" ] - -FROM dist as master -ARG UID -ARG USER -ENV UID=${UID} -ENV GID=${UID} -ENV USER=${USER} - -# If we provide a specific UID -RUN let $UID >/dev/null 2>&1 \ -# Remove user with $UID if it is not our $USER - && if [ "$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')" != "$USER" ]; then \ - sed -i '/^'$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')':x:'$UID':/d' /etc/passwd; \ - sed -i '/^'$(getent group $GID |awk 'BEGIN {FS=":"} {print $1}')':x:'$GID':/d' /etc/group; \ - fi \ -# Force $UID if our $USER already exists - && sed -i 's/^'$USER':x:[0-9]\+:[0-9]\+:/'$USER':x:'$UID':'$GID':/' /etc/passwd \ - && sed -i 's/^'$USER':x:[0-9]\+:/'$USER':x:'$GID':/' /etc/group \ -# Create $USER if it does not exist - && if [ "$(getent passwd $UID)" = "" ]; then \ - echo "$USER:x:$UID:$GID::/home/$USER:/bin/false" >> /etc/passwd; \ - echo "$USER:!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \ - echo "$USER:x:$GID:" >> /etc/group; \ - fi \ - && mkdir -p /home/$USER \ - && chown $UID:$GID /home/$USER \ - || true - -RUN chown -R $USER /usr/local/etc/php/conf.d/ - -USER $USER - -ARG SSH_REMOTE_HOSTS - -RUN mkdir -p ~/.ssh \ - && ssh-keyscan -t rsa -H $SSH_REMOTE_HOSTS >> ~/.ssh/known_hosts diff --git a/docker/php/7.2-fpm-alpine/apc.ini b/docker/php/7.2-fpm-alpine/apc.ini deleted file mode 100644 index 448cee9..0000000 --- a/docker/php/7.2-fpm-alpine/apc.ini +++ /dev/null @@ -1,5 +0,0 @@ -apc.enable_cli = 0 -apc.enabled = 1 -apc.shm_segments = 1 -apc.shm_size = 32M - diff --git a/docker/php/7.2-fpm-alpine/blackfire.ini b/docker/php/7.2-fpm-alpine/blackfire.ini deleted file mode 100644 index 566668c..0000000 --- a/docker/php/7.2-fpm-alpine/blackfire.ini +++ /dev/null @@ -1 +0,0 @@ -blackfire.agent_socket=tcp://blackfire:8707 diff --git a/docker/php/7.2-fpm-alpine/memcached.ini b/docker/php/7.2-fpm-alpine/memcached.ini deleted file mode 100644 index 361f58b..0000000 --- a/docker/php/7.2-fpm-alpine/memcached.ini +++ /dev/null @@ -1 +0,0 @@ -memcached.sess_locking = Off \ No newline at end of file diff --git a/docker/php/7.2-fpm-alpine/newrelic.ini b/docker/php/7.2-fpm-alpine/newrelic.ini deleted file mode 100644 index d90b2dc..0000000 --- a/docker/php/7.2-fpm-alpine/newrelic.ini +++ /dev/null @@ -1,4 +0,0 @@ -[newrelic] -newrelic.logfile = /dev/self/fd/2 -newrelic.daemon.logfile = /dev/self/fd/2 - diff --git a/docker/php/7.2-fpm-alpine/opcache.ini b/docker/php/7.2-fpm-alpine/opcache.ini deleted file mode 100644 index b0244ec..0000000 --- a/docker/php/7.2-fpm-alpine/opcache.ini +++ /dev/null @@ -1,8 +0,0 @@ -opcache.enable = 1 -opcache.enable_cli = 0 -opcache.error_log = /proc/self/fd/2 -opcache.interned_strings_buffer = 16 -opcache.log_verbosity_level = 2 -opcache.max_accelerated_files = 20000 -opcache.memory_consumption = 256 -opcache.validate_timestamps = 1 diff --git a/docker/php/7.2-fpm-alpine/php-fpm-pool.conf b/docker/php/7.2-fpm-alpine/php-fpm-pool.conf deleted file mode 100644 index bfc8efa..0000000 --- a/docker/php/7.2-fpm-alpine/php-fpm-pool.conf +++ /dev/null @@ -1,412 +0,0 @@ -; Start a new pool named 'www'. -; the variable $pool can we used in any directive and will be replaced by the -; pool name ('www' here) -[www] - -; Per pool prefix -; It only applies on the following directives: -; - 'access.log' -; - 'slowlog' -; - 'listen' (unixsocket) -; - 'chroot' -; - 'chdir' -; - 'php_values' -; - 'php_admin_values' -; When not set, the global prefix (or /usr) applies instead. -; Note: This directive can also be relative to the global prefix. -; Default Value: none -;prefix = /path/to/pools/$pool - -; Unix user/group of processes -; Note: The user is mandatory. If the group is not set, the default user's group -; will be used. -user = www-data -group = www-data - -; The address on which to accept FastCGI requests. -; Valid syntaxes are: -; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on -; a specific port; -; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on -; a specific port; -; 'port' - to listen on a TCP socket to all IPv4 addresses on a -; specific port; -; '[::]:port' - to listen on a TCP socket to all addresses -; (IPv6 and IPv4-mapped) on a specific port; -; '/path/to/unix/socket' - to listen on a unix socket. -; Note: This value is mandatory. -;listen = /var/run/php5-fpm.sock -listen = 0.0.0.0:9000 - -; Set listen(2) backlog. -; Default Value: 65535 (-1 on FreeBSD and OpenBSD) -listen.backlog = 1023 - -; Set permissions for unix socket, if one is used. In Linux, read/write -; permissions must be set in order to allow connections from a web server. Many -; BSD-derived systems allow connections regardless of permissions. -; Default Values: user and group are set as the running user -; mode is set to 0660 -;listen.owner = www-data -;listen.group = www-data -;listen.mode = 0660 -; When POSIX Access Control Lists are supported you can set them using -; these options, value is a comma separated list of user/group names. -; When set, listen.owner and listen.group are ignored -;listen.acl_users = -;listen.acl_groups = - -; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect. -; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original -; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address -; must be separated by a comma. If this value is left blank, connections will be -; accepted from any ip address. -; Default Value: any -;listen.allowed_clients = 0.0.0.0 - -; Specify the nice(2) priority to apply to the pool processes (only if set) -; The value can vary from -19 (highest priority) to 20 (lower priority) -; Note: - It will only work if the FPM master process is launched as root -; - The pool processes will inherit the master process priority -; unless it specified otherwise -; Default Value: no set -; process.priority = -19 - -; Choose how the process manager will control the number of child processes. -; Possible Values: -; static - a fixed number (pm.max_children) of child processes; -; dynamic - the number of child processes are set dynamically based on the -; following directives. With this process management, there will be -; always at least 1 children. -; pm.max_children - the maximum number of children that can -; be alive at the same time. -; pm.start_servers - the number of children created on startup. -; pm.min_spare_servers - the minimum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is less than this -; number then some children will be created. -; pm.max_spare_servers - the maximum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is greater than this -; number then some children will be killed. -; ondemand - no children are created at startup. Children will be forked when -; new requests will connect. The following parameter are used: -; pm.max_children - the maximum number of children that -; can be alive at the same time. -; pm.process_idle_timeout - The number of seconds after which -; an idle process will be killed. -; Note: This value is mandatory. -pm = dynamic - -; The number of child processes to be created when pm is set to 'static' and the -; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. -; This value sets the limit on the number of simultaneous requests that will be -; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. -; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP -; CGI. The below defaults are based on a server without much resources. Don't -; forget to tweak pm.* to fit your needs. -; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' -; Note: This value is mandatory. -pm.max_children = 16 - -; The number of child processes created on startup. -; Note: Used only when pm is set to 'dynamic' -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 -pm.start_servers = 2 - -; The desired minimum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = 1 - -; The desired maximum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = 3 - -; The number of seconds after which an idle process will be killed. -; Note: Used only when pm is set to 'ondemand' -; Default Value: 10s -;pm.process_idle_timeout = 10s; - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. For -; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default Value: 0 -;pm.max_requests = 500 - -; The URI to view the FPM status page. If this value is not set, no URI will be -; recognized as a status page. It shows the following informations: -; pool - the name of the pool; -; process manager - static, dynamic or ondemand; -; start time - the date and time FPM has started; -; start since - number of seconds since FPM has started; -; accepted conn - the number of request accepted by the pool; -; listen queue - the number of request in the queue of pending -; connections (see backlog in listen(2)); -; max listen queue - the maximum number of requests in the queue -; of pending connections since FPM has started; -; listen queue len - the size of the socket queue of pending connections; -; idle processes - the number of idle processes; -; active processes - the number of active processes; -; total processes - the number of idle + active processes; -; max active processes - the maximum number of active processes since FPM -; has started; -; max children reached - number of times, the process limit has been reached, -; when pm tries to start more children (works only for -; pm 'dynamic' and 'ondemand'); -; Value are updated in real time. -; Example output: -; pool: www -; process manager: static -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 62636 -; accepted conn: 190460 -; listen queue: 0 -; max listen queue: 1 -; listen queue len: 42 -; idle processes: 4 -; active processes: 11 -; total processes: 15 -; max active processes: 12 -; max children reached: 0 -; -; By default the status page output is formatted as text/plain. Passing either -; 'html', 'xml' or 'json' in the query string will return the corresponding -; output syntax. Example: -; http://www.foo.bar/status -; http://www.foo.bar/status?json -; http://www.foo.bar/status?html -; http://www.foo.bar/status?xml -; -; By default the status page only outputs short status. Passing 'full' in the -; query string will also return status for each pool process. -; Example: -; http://www.foo.bar/status?full -; http://www.foo.bar/status?json&full -; http://www.foo.bar/status?html&full -; http://www.foo.bar/status?xml&full -; The Full status returns for each process: -; pid - the PID of the process; -; state - the state of the process (Idle, Running, ...); -; start time - the date and time the process has started; -; start since - the number of seconds since the process has started; -; requests - the number of requests the process has served; -; request duration - the duration in µs of the requests; -; request method - the request method (GET, POST, ...); -; request URI - the request URI with the query string; -; content length - the content length of the request (only with POST); -; user - the user (PHP_AUTH_USER) (or '-' if not set); -; script - the main script called (or '-' if not set); -; last request cpu - the %cpu the last request consumed -; it's always 0 if the process is not in Idle state -; because CPU calculation is done when the request -; processing has terminated; -; last request memory - the max amount of memory the last request consumed -; it's always 0 if the process is not in Idle state -; because memory calculation is done when the request -; processing has terminated; -; If the process is in Idle state, then informations are related to the -; last request the process has served. Otherwise informations are related to -; the current request being served. -; Example output: -; ************************ -; pid: 31330 -; state: Running -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 63087 -; requests: 12808 -; request duration: 1250261 -; request method: GET -; request URI: /test_mem.php?N=10000 -; content length: 0 -; user: - -; script: /home/fat/web/docs/php/test_mem.php -; last request cpu: 0.00 -; last request memory: 0 -; -; Note: There is a real-time FPM status monitoring sample web page available -; It's available in: /usr/share/php5/fpm/status.html -; -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -pm.status_path = /php-fpm-status - -; The ping URI to call the monitoring page of FPM. If this value is not set, no -; URI will be recognized as a ping page. This could be used to test from outside -; that FPM is alive and responding, or to -; - create a graph of FPM availability (rrd or such); -; - remove a server from a group if it is not responding (load balancing); -; - trigger alerts for the operating team (24/7). -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -ping.path = /php-fpm-ping - -; This directive may be used to customize the response of a ping request. The -; response is formatted as text/plain with a 200 response code. -; Default Value: pong -;ping.response = pong - -; The access log file -; Default: not set -;access.log = log/$pool.access.log - -; The access log format. -; The following syntax is allowed -; %%: the '%' character -; %C: %CPU used by the request -; it can accept the following format: -; - %{user}C for user CPU only -; - %{system}C for system CPU only -; - %{total}C for user + system CPU (default) -; %d: time taken to serve the request -; it can accept the following format: -; - %{seconds}d (default) -; - %{miliseconds}d -; - %{mili}d -; - %{microseconds}d -; - %{micro}d -; %e: an environment variable (same as $_ENV or $_SERVER) -; it must be associated with embraces to specify the name of the env -; variable. Some exemples: -; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e -; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e -; %f: script filename -; %l: content-length of the request (for POST request only) -; %m: request method -; %M: peak of memory allocated by PHP -; it can accept the following format: -; - %{bytes}M (default) -; - %{kilobytes}M -; - %{kilo}M -; - %{megabytes}M -; - %{mega}M -; %n: pool name -; %o: output header -; it must be associated with embraces to specify the name of the header: -; - %{Content-Type}o -; - %{X-Powered-By}o -; - %{Transfert-Encoding}o -; - .... -; %p: PID of the child that serviced the request -; %P: PID of the parent of the child that serviced the request -; %q: the query string -; %Q: the '?' character if query string exists -; %r: the request URI (without the query string, see %q and %Q) -; %R: remote IP address -; %s: status (response code) -; %t: server time the request was received -; it can accept a strftime(3) format: -; %d/%b/%Y:%H:%M:%S %z (default) -; %T: time the log has been written (the request has finished) -; it can accept a strftime(3) format: -; %d/%b/%Y:%H:%M:%S %z (default) -; %u: remote user -; -; Default: "%R - %u %t \"%m %r\" %s" -;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" - -; The log file for slow requests -; Default Value: not set -; Note: slowlog is mandatory if request_slowlog_timeout is set -;slowlog = log/$pool.log.slow - -; The timeout for serving a single request after which a PHP backtrace will be -; dumped to the 'slowlog' file. A value of '0s' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -;request_slowlog_timeout = 0 - -; The timeout for serving a single request after which the worker process will -; be killed. This option should be used when the 'max_execution_time' ini option -; does not stop script execution for some reason. A value of '0' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -;request_terminate_timeout = 5m - -; Set open file descriptor rlimit. -; Default Value: system defined value -;rlimit_files = 1024 - -; Set max core size rlimit. -; Possible Values: 'unlimited' or an integer greater or equal to 0 -; Default Value: system defined value -;rlimit_core = 0 - -; Chroot to this directory at the start. This value must be defined as an -; absolute path. When this value is not set, chroot is not used. -; Note: you can prefix with '$prefix' to chroot to the pool prefix or one -; of its subdirectories. If the pool prefix is not set, the global prefix -; will be used instead. -; Note: chrooting is a great security feature and should be used whenever -; possible. However, all PHP paths will be relative to the chroot -; (error_log, sessions.save_path, ...). -; Default Value: not set -;chroot = - -; Chdir to this directory at the start. -; Note: relative path can be used. -; Default Value: current directory or / when chroot -chdir = / - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - -; Clear environment in FPM workers -; Prevents arbitrary environment variables from reaching FPM worker processes -; by clearing the environment in workers before env vars specified in this -; pool configuration are added. -; Setting to "no" will make all environment variables available to PHP code -; via getenv(), $_ENV and $_SERVER. -; Default Value: yes -;clear_env = no - -; Limits the extensions of the main script FPM will allow to parse. This can -; prevent configuration mistakes on the web server side. You should only limit -; FPM to .php extensions to prevent malicious users to use other extensions to -; exectute php code. -; Note: set an empty value to allow all extensions. -; Default Value: .php -;security.limit_extensions = .php .php3 .php4 .php5 - -; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from -; the current environment. -; Default Value: clean env -;env[HOSTNAME] = $HOSTNAME -;env[PATH] = /usr/local/bin:/usr/bin:/bin -;env[TMP] = /tmp -;env[TMPDIR] = /tmp -;env[TEMP] = /tmp - -; Additional php.ini defines, specific to this pool of workers. These settings -; overwrite the values previously defined in the php.ini. The directives are the -; same as the PHP SAPI: -; php_value/php_flag - you can set classic ini defines which can -; be overwritten from PHP call 'ini_set'. -; php_admin_value/php_admin_flag - these directives won't be overwritten by -; PHP call 'ini_set' -; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. - -; Defining 'extension' will load the corresponding shared extension from -; extension_dir. Defining 'disable_functions' or 'disable_classes' will not -; overwrite previously defined php.ini values, but will append the new value -; instead. - -; Note: path INI options can be relative and will be expanded with the prefix -; (pool, global or /usr) - -; Default Value: nothing is defined by default except the values in php.ini and -; specified at startup with the -d argument -;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com -;php_flag[display_errors] = off -;php_admin_value[error_log] = /var/log/fpm-php.www.log -;php_admin_flag[log_errors] = on -;php_admin_value[memory_limit] = 32M diff --git a/docker/php/7.2-fpm-alpine/php.ini b/docker/php/7.2-fpm-alpine/php.ini deleted file mode 100644 index f631e55..0000000 --- a/docker/php/7.2-fpm-alpine/php.ini +++ /dev/null @@ -1,56 +0,0 @@ -[PHP] -expose_php = Off -disable_functions = exec,system,popen,passthru,apache_child_terminate,apache_get_modules,apache_get_version,apache_getenv,apache_note,apache_setenv,virtual,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority -enable_dl = Off -allow_url_fopen = On -allow_url_include = Off -engine = On -short_open_tag = On -output_buffering = 4096 -realpath_cache_size = 4096k -realpath_cache_ttl = 600 -include_path = .:/usr/share/php -date.timezone = Europe/Paris -default_socket_timeout = 10 -max_execution_time = 30 -max_input_time = 60 -max_input_vars = 1000 -memory_limit = 512M -post_max_size = 32M -file_uploads = On -upload_tmp_dir = /tmp -upload_max_filesize = 32M -max_file_uploads = 20 -error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT -display_errors = Off -display_startup_errors = Off -log_errors = On -html_errors = On -SMTP = mailcatcher -smtp_port = 1025 -sendmail_path = /usr/sbin/sendmail -t -i -mail_log = syslog -session.save_handler = memcached -session.save_path = memcached:11211 -session.use_cookies = 1 -session.cookie_secure = -session.use_only_cookies = 1 -session.name = PHPSESSID -session.auto_start = 0 -session.cookie_lifetime = 0 -session.cookie_path = / -session.cookie_domain = -session.cookie_httponly = -session.serialize_handler = php -session.gc_probability = 0 -session.gc_divisor = 1000 -session.gc_maxlifetime = 2592000 -session.bug_compat_42 = Off -session.bug_compat_warn = Off -session.referer_check = -session.entropy_length = 512 -session.entropy_file = /dev/urandom -session.cache_limiter = nocache -session.cache_expire = 180 -session.use_trans_sid = 0 -session.hash_function = 0 diff --git a/docker/php/7.2-fpm-alpine/xdebug.ini b/docker/php/7.2-fpm-alpine/xdebug.ini deleted file mode 100644 index efb017f..0000000 --- a/docker/php/7.2-fpm-alpine/xdebug.ini +++ /dev/null @@ -1,13 +0,0 @@ -xdebug.collect_params = 1 -xdebug.collect_return = 1 -xdebug.default_enable = 1 -xdebug.force_display_errors = 1 -xdebug.force_error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED -xdebug.halt_level = E_WARNING -xdebug.idekey = PHPSTORM -xdebug.max_nesting_level = 1024 -xdebug.remote_enable = 1 -xdebug.remote_connect_back = 1 -xdebug.scream = 0 -xdebug.show_error_trace = 1 -xdebug.show_exception_trace = 1 diff --git a/docker/php/7.3-fpm-alpine/Dockerfile b/docker/php/7.3-fpm-alpine/Dockerfile deleted file mode 100644 index 1f0b1c8..0000000 --- a/docker/php/7.3-fpm-alpine/Dockerfile +++ /dev/null @@ -1,264 +0,0 @@ -FROM php:7.3-fpm-alpine as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR -ARG AMQP_VERSION=stable -ARG AST_VERSION=stable -ARG APCU_VERSION=stable -ARG BLACKFIRE_VERSION=1.34.3 -ARG CACHETOOL_VERSION=4.0.1 -ARG DS_VERSION=stable -ARG EVENT_VERSION=stable -ARG IGBINARY_VERSION=stable -ARG IMAGICK_VERSION=stable -ARG GEOIP_VERSION=beta -ARG GRPC_VERSION=stable -ARG MCRYPT_VERSION=stable -ARG MEMCACHE_VERSION=4.0.1-php73 -ARG MEMCACHED_VERSION=stable -ARG MONGODB_VERSION=stable -ARG NEWRELIC_VERSION=9.11.0.267 -ARG OAUTH_VERSION=stable -ARG REDIS_VERSION=stable -ARG SNUFFLEUPAGUS_VERSION=0.5.1 -ARG UUID_VERSION=stable -ARG XDEBUG_VERSION=stable -ARG XHPROF_VERSION=2.2.0 -ARG YAML_VERSION=stable - -RUN apk --no-cache upgrade \ - && apk add --no-cache --virtual .build-deps \ - $PHPIZE_DEPS \ - aspell-dev \ - bison \ - bzip2-dev \ - curl-dev \ - enchant2-dev \ - flex \ - freetype-dev \ - gawk \ - geoip-dev \ - gettext-dev \ - gmp-dev \ - icu-dev \ - imagemagick-dev \ - imap-dev \ - libevent-dev \ - libjpeg-turbo-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libpng-dev \ - libressl-dev \ - libxml2-dev \ - libxslt-dev \ - libzip-dev \ - make \ - net-snmp-dev \ - openldap-dev \ - patch \ - postgresql-dev \ - pcre-dev \ - rabbitmq-c-dev \ - yaml-dev \ - # blackfire \ - && wget https://packages.blackfire.io/binaries/blackfire-php/${BLACKFIRE_VERSION}/blackfire-php-alpine_amd64-php-$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;").so -O $(php -r "echo ini_get('extension_dir');")/blackfire.so \ - # enchant \ - && docker-php-source extract \ - && wget "https://git.alpinelinux.org/aports/plain/community/php7/enchant-2.patch?id=3f8d7d2e5e558a975f79b6470423b32e01c0bfbc" -O /usr/src/php-enchant-2.patch \ - && cd /usr/src/php && patch -p1 < ../php-enchant-2.patch \ - # gd \ - && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/ \ - # memcache \ - && wget https://github.com/websupport-sk/pecl-memcache/archive/v${MEMCACHE_VERSION}.tar.gz -O /tmp/memcache-${MEMCACHE_VERSION}.tar.gz \ - && mkdir -p /tmp/memcache-${MEMCACHE_VERSION} \ - && tar xzf /tmp/memcache-${MEMCACHE_VERSION}.tar.gz -C /tmp/memcache-${MEMCACHE_VERSION} --strip-components=1 \ - # https://github.com/websupport-sk/pecl-memcache/pull/39 \ - && sed -i '399s/);/, char *);/' /tmp/memcache-${MEMCACHE_VERSION}/php7/memcache_pool.h \ - # https://github.com/websupport-sk/pecl-memcache/pull/40 \ - && sed -i '47i#if PHP_VERSION_ID < 70200\n register size_t newlen;\n#endif' /tmp/memcache-${MEMCACHE_VERSION}/php7/memcache_pool.c \ - # newrelic \ - && wget https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz -O /tmp/newrelic-${NEWRELIC_VERSION}.tar.gz \ - && mkdir -p /tmp/newrelic-${NEWRELIC_VERSION} \ - && tar xzf /tmp/newrelic-${NEWRELIC_VERSION}.tar.gz -C /tmp/newrelic-${NEWRELIC_VERSION} --strip-components=1 \ - && mv /tmp/newrelic-${NEWRELIC_VERSION}/agent/x64/newrelic-20180731.so $(php -r "echo ini_get('extension_dir');")/newrelic.so \ - # snuffleupagus \ - && wget https://github.com/jvoisin/snuffleupagus/archive/v${SNUFFLEUPAGUS_VERSION}.tar.gz -O /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}.tar.gz \ - && mkdir -p /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION} \ - && tar xzf /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}.tar.gz -C /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION} --strip-components=1 \ - && docker-php-ext-configure /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}/src --prefix=/usr --enable-snuffleupagus \ - # xhprof \ - && wget https://github.com/longxinH/xhprof/archive/v${XHPROF_VERSION}.tar.gz -O /tmp/xhprof-${XHPROF_VERSION}.tar.gz \ - && mkdir -p /tmp/xhprof-${XHPROF_VERSION} \ - && tar xzf /tmp/xhprof-${XHPROF_VERSION}.tar.gz -C /tmp/xhprof-${XHPROF_VERSION} --strip-components=1 \ - && docker-php-ext-configure /tmp/xhprof-${XHPROF_VERSION}/extension --with-php-config=/usr/local/bin/php-config \ - && docker-php-ext-install -j$(nproc) \ - bcmath \ - bz2 \ - calendar \ - dba \ - enchant \ - exif \ - gd \ - gettext \ - gmp \ - imap \ - intl \ - ldap \ - /tmp/memcache-${MEMCACHE_VERSION} \ - mysqli \ - opcache \ - pcntl \ - pdo_mysql \ - pdo_pgsql \ - pgsql \ - pspell \ - shmop \ - snmp \ - soap \ - sockets \ - sysvmsg \ - sysvsem \ - sysvshm \ - /tmp/xhprof-${XHPROF_VERSION}/extension \ - xmlrpc \ - xsl \ - zip \ - # docker-php-ext-install fails after snuffleupagus is enabled - /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}/src \ - && docker-php-source delete \ - && rm /usr/local/etc/php/conf.d/docker-php-ext-* \ - && rm -rf /tmp/memcache-* \ - && rm -rf /tmp/newrelic-* \ - && rm -rf /tmp/snuffleupagus-* \ - && rm -rf /tmp/xhprof-* \ - && pecl install amqp-${AMQP_VERSION} \ - && pecl install apcu-${APCU_VERSION} \ - && pecl install ast-${AST_VERSION} \ - && pecl install ds-${DS_VERSION} \ - && pecl install event-${EVENT_VERSION} \ - && pecl install geoip-${GEOIP_VERSION} \ - && pecl install grpc-${GRPC_VERSION} \ - && pecl install igbinary-${IGBINARY_VERSION} \ - && pecl install imagick-${IMAGICK_VERSION} \ - && pecl install memcached-${MEMCACHED_VERSION} \ - && pecl install mongodb-${MONGODB_VERSION} \ - && pecl install oauth-${OAUTH_VERSION} \ - && pecl install redis-${REDIS_VERSION} \ - && echo |pecl install uuid-${UUID_VERSION} \ - && echo |pecl install mcrypt-${MCRYPT_VERSION} \ - && pecl install xdebug-${XDEBUG_VERSION} \ - && pecl install yaml-${YAML_VERSION} \ - && pecl clear-cache \ - && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr/local \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | xargs -r apk info --installed \ - | sort -u \ - )" \ - && apk del .build-deps \ - && apk add --no-cache --virtual .run-deps $runDeps - -RUN wget http://gordalina.github.io/cachetool/downloads/cachetool-${CACHETOOL_VERSION}.phar -O /usr/local/bin/cachetool \ - && chmod +x /usr/local/bin/cachetool \ - && echo -e "\ -adapter: fastcgi \n\ -fastcgi: 127.0.0.1:9000 \n\ -" > /etc/cachetool.yml - -RUN mkdir -p /etc/ssh && echo -e "\ -Host * \n\ - Compression yes \n\ -" >> /etc/ssh/ssh_config - -RUN apk add --no-cache \ - bash \ - bzip2 \ - coreutils \ - gettext \ - git \ - imagemagick \ - lftp \ - mailx \ - make \ - mysql-client \ - nano \ - openssh-client \ - ssmtp \ - vim - -# Iconv fix: https://github.com/docker-library/php/issues/240#issuecomment-305038173 -RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ gnu-libiconv -ENV LD_PRELOAD=/usr/lib/preloadable_libiconv.so - -# builtin modules : Core ctype curl date dom fileinfo filter ftp hash iconv json libxml mbstring mysqlnd openssl pcre PDO pdo_sqlite Phar posix readline Reflection session SimpleXML SPL sqlite3 standard tokenizer xml xmlreader xmlwriter zlib -# available modules : amqp apcu ast bcmath blackfire bz2 calendar dba ds enchant event exif gd geoip gmp grpc igbinary imap imagick intl ldap mcrypt memcache memcached mongodb mysqli newrelic oauth opcache pcntl pdo_mysql pdo_pgsql pgsql pspell redis shmop snmp snuffleupagus soap sockets sysvmsg sysvsem sysvshm xhprof uuid wddx xdebug xhprof xmlrpc xsl yaml zip -ARG PHP_EXT_ENABLE="amqp apcu bcmath bz2 calendar gd geoip imagick intl mcrypt memcached mysqli oauth opcache pdo_mysql redis soap sockets uuid yaml zip" -RUN docker-php-ext-enable ${PHP_EXT_ENABLE} - -# copy *.ini -COPY ${DOCKER_BUILD_DIR}/*.ini /usr/local/etc/php/conf.d/ -COPY ${DOCKER_BUILD_DIR}/php-fpm-*.conf /usr/local/etc/php-fpm.d/ -RUN rm /usr/local/etc/php-fpm.d/www.conf - -# custom php config -ARG PHP_INI_CONFIG -RUN echo -e ${PHP_INI_CONFIG// /\\n} >> /usr/local/etc/php/conf.d/config.ini - -# custom php cli -ARG PHP_CLI_CONFIG="apc.enable_cli=0 max_execution_time=-1 memory_limit=-1 opcache.enable_cli=0 xdebug.default_enable=0" -RUN echo '#!/usr/bin/env sh' > /usr/local/bin/php-cli \ - && chmod +x /usr/local/bin/php-cli \ - && echo -e "\ -/usr/local/bin/php -d ${PHP_CLI_CONFIG// / -d } \"\$@\"\ -" >> /usr/local/bin/php-cli - -# install cronlock -ADD https://raw.github.com/kvz/cronlock/master/cronlock /usr/bin/cronlock -RUN chmod +rx /usr/bin/cronlock - -# config ssmtp -RUN echo "FromLineOverride=YES" >> /etc/ssmtp/ssmtp.conf - -# default www-data homedir to /var/www for crontabs -RUN sed -i 's|/home/www-data|/var/www|' /etc/passwd - -# link shared folder -RUN ln -s /shared /var/www/shared - -WORKDIR /var/www -CMD [ "sh", "-c", "(IFS=$'\n'; exec env $(cat .env 2>/dev/null) php-fpm)" ] - -FROM dist as master -ARG UID -ARG USER -ENV UID=${UID} -ENV GID=${UID} -ENV USER=${USER} - -# If we provide a specific UID -RUN let $UID >/dev/null 2>&1 \ -# Remove user with $UID if it is not our $USER - && if [ "$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')" != "$USER" ]; then \ - sed -i '/^'$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')':x:'$UID':/d' /etc/passwd; \ - sed -i '/^'$(getent group $GID |awk 'BEGIN {FS=":"} {print $1}')':x:'$GID':/d' /etc/group; \ - fi \ -# Force $UID if our $USER already exists - && sed -i 's/^'$USER':x:[0-9]\+:[0-9]\+:/'$USER':x:'$UID':'$GID':/' /etc/passwd \ - && sed -i 's/^'$USER':x:[0-9]\+:/'$USER':x:'$GID':/' /etc/group \ -# Create $USER if it does not exist - && if [ "$(getent passwd $UID)" = "" ]; then \ - echo "$USER:x:$UID:$GID::/home/$USER:/bin/false" >> /etc/passwd; \ - echo "$USER:!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \ - echo "$USER:x:$GID:" >> /etc/group; \ - fi \ - && mkdir -p /home/$USER \ - && chown $UID:$GID /home/$USER \ - || true - -RUN chown -R $USER /usr/local/etc/php/conf.d/ - -USER $USER - -ARG SSH_REMOTE_HOSTS - -RUN mkdir -p ~/.ssh \ - && ssh-keyscan -t rsa -H $SSH_REMOTE_HOSTS >> ~/.ssh/known_hosts diff --git a/docker/php/7.3-fpm-alpine/apc.ini b/docker/php/7.3-fpm-alpine/apc.ini deleted file mode 100644 index 448cee9..0000000 --- a/docker/php/7.3-fpm-alpine/apc.ini +++ /dev/null @@ -1,5 +0,0 @@ -apc.enable_cli = 0 -apc.enabled = 1 -apc.shm_segments = 1 -apc.shm_size = 32M - diff --git a/docker/php/7.3-fpm-alpine/blackfire.ini b/docker/php/7.3-fpm-alpine/blackfire.ini deleted file mode 100644 index 566668c..0000000 --- a/docker/php/7.3-fpm-alpine/blackfire.ini +++ /dev/null @@ -1 +0,0 @@ -blackfire.agent_socket=tcp://blackfire:8707 diff --git a/docker/php/7.3-fpm-alpine/memcached.ini b/docker/php/7.3-fpm-alpine/memcached.ini deleted file mode 100644 index 361f58b..0000000 --- a/docker/php/7.3-fpm-alpine/memcached.ini +++ /dev/null @@ -1 +0,0 @@ -memcached.sess_locking = Off \ No newline at end of file diff --git a/docker/php/7.3-fpm-alpine/newrelic.ini b/docker/php/7.3-fpm-alpine/newrelic.ini deleted file mode 100644 index d90b2dc..0000000 --- a/docker/php/7.3-fpm-alpine/newrelic.ini +++ /dev/null @@ -1,4 +0,0 @@ -[newrelic] -newrelic.logfile = /dev/self/fd/2 -newrelic.daemon.logfile = /dev/self/fd/2 - diff --git a/docker/php/7.3-fpm-alpine/opcache.ini b/docker/php/7.3-fpm-alpine/opcache.ini deleted file mode 100644 index b0244ec..0000000 --- a/docker/php/7.3-fpm-alpine/opcache.ini +++ /dev/null @@ -1,8 +0,0 @@ -opcache.enable = 1 -opcache.enable_cli = 0 -opcache.error_log = /proc/self/fd/2 -opcache.interned_strings_buffer = 16 -opcache.log_verbosity_level = 2 -opcache.max_accelerated_files = 20000 -opcache.memory_consumption = 256 -opcache.validate_timestamps = 1 diff --git a/docker/php/7.3-fpm-alpine/php-fpm-pool.conf b/docker/php/7.3-fpm-alpine/php-fpm-pool.conf deleted file mode 100644 index 6204234..0000000 --- a/docker/php/7.3-fpm-alpine/php-fpm-pool.conf +++ /dev/null @@ -1,412 +0,0 @@ -; Start a new pool named 'www'. -; the variable $pool can we used in any directive and will be replaced by the -; pool name ('www' here) -[www] - -; Per pool prefix -; It only applies on the following directives: -; - 'access.log' -; - 'slowlog' -; - 'listen' (unixsocket) -; - 'chroot' -; - 'chdir' -; - 'php_values' -; - 'php_admin_values' -; When not set, the global prefix (or /usr) applies instead. -; Note: This directive can also be relative to the global prefix. -; Default Value: none -;prefix = /path/to/pools/$pool - -; Unix user/group of processes -; Note: The user is mandatory. If the group is not set, the default user's group -; will be used. -user = www-data -group = www-data - -; The address on which to accept FastCGI requests. -; Valid syntaxes are: -; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on -; a specific port; -; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on -; a specific port; -; 'port' - to listen on a TCP socket to all IPv4 addresses on a -; specific port; -; '[::]:port' - to listen on a TCP socket to all addresses -; (IPv6 and IPv4-mapped) on a specific port; -; '/path/to/unix/socket' - to listen on a unix socket. -; Note: This value is mandatory. -;listen = /var/run/php5-fpm.sock -listen = 0.0.0.0:9000 - -; Set listen(2) backlog. -; Default Value: 65535 (-1 on FreeBSD and OpenBSD) -listen.backlog = 1023 - -; Set permissions for unix socket, if one is used. In Linux, read/write -; permissions must be set in order to allow connections from a web server. Many -; BSD-derived systems allow connections regardless of permissions. -; Default Values: user and group are set as the running user -; mode is set to 0660 -;listen.owner = www-data -;listen.group = www-data -;listen.mode = 0660 -; When POSIX Access Control Lists are supported you can set them using -; these options, value is a comma separated list of user/group names. -; When set, listen.owner and listen.group are ignored -;listen.acl_users = -;listen.acl_groups = - -; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect. -; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original -; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address -; must be separated by a comma. If this value is left blank, connections will be -; accepted from any ip address. -; Default Value: any -;listen.allowed_clients = 0.0.0.0 - -; Specify the nice(2) priority to apply to the pool processes (only if set) -; The value can vary from -19 (highest priority) to 20 (lower priority) -; Note: - It will only work if the FPM master process is launched as root -; - The pool processes will inherit the master process priority -; unless it specified otherwise -; Default Value: no set -; process.priority = -19 - -; Choose how the process manager will control the number of child processes. -; Possible Values: -; static - a fixed number (pm.max_children) of child processes; -; dynamic - the number of child processes are set dynamically based on the -; following directives. With this process management, there will be -; always at least 1 children. -; pm.max_children - the maximum number of children that can -; be alive at the same time. -; pm.start_servers - the number of children created on startup. -; pm.min_spare_servers - the minimum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is less than this -; number then some children will be created. -; pm.max_spare_servers - the maximum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is greater than this -; number then some children will be killed. -; ondemand - no children are created at startup. Children will be forked when -; new requests will connect. The following parameter are used: -; pm.max_children - the maximum number of children that -; can be alive at the same time. -; pm.process_idle_timeout - The number of seconds after which -; an idle process will be killed. -; Note: This value is mandatory. -pm = dynamic - -; The number of child processes to be created when pm is set to 'static' and the -; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. -; This value sets the limit on the number of simultaneous requests that will be -; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. -; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP -; CGI. The below defaults are based on a server without much resources. Don't -; forget to tweak pm.* to fit your needs. -; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' -; Note: This value is mandatory. -pm.max_children = 32 - -; The number of child processes created on startup. -; Note: Used only when pm is set to 'dynamic' -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 -pm.start_servers = 4 - -; The desired minimum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = 4 - -; The desired maximum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = 8 - -; The number of seconds after which an idle process will be killed. -; Note: Used only when pm is set to 'ondemand' -; Default Value: 10s -;pm.process_idle_timeout = 10s; - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. For -; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default Value: 0 -;pm.max_requests = 500 - -; The URI to view the FPM status page. If this value is not set, no URI will be -; recognized as a status page. It shows the following informations: -; pool - the name of the pool; -; process manager - static, dynamic or ondemand; -; start time - the date and time FPM has started; -; start since - number of seconds since FPM has started; -; accepted conn - the number of request accepted by the pool; -; listen queue - the number of request in the queue of pending -; connections (see backlog in listen(2)); -; max listen queue - the maximum number of requests in the queue -; of pending connections since FPM has started; -; listen queue len - the size of the socket queue of pending connections; -; idle processes - the number of idle processes; -; active processes - the number of active processes; -; total processes - the number of idle + active processes; -; max active processes - the maximum number of active processes since FPM -; has started; -; max children reached - number of times, the process limit has been reached, -; when pm tries to start more children (works only for -; pm 'dynamic' and 'ondemand'); -; Value are updated in real time. -; Example output: -; pool: www -; process manager: static -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 62636 -; accepted conn: 190460 -; listen queue: 0 -; max listen queue: 1 -; listen queue len: 42 -; idle processes: 4 -; active processes: 11 -; total processes: 15 -; max active processes: 12 -; max children reached: 0 -; -; By default the status page output is formatted as text/plain. Passing either -; 'html', 'xml' or 'json' in the query string will return the corresponding -; output syntax. Example: -; http://www.foo.bar/status -; http://www.foo.bar/status?json -; http://www.foo.bar/status?html -; http://www.foo.bar/status?xml -; -; By default the status page only outputs short status. Passing 'full' in the -; query string will also return status for each pool process. -; Example: -; http://www.foo.bar/status?full -; http://www.foo.bar/status?json&full -; http://www.foo.bar/status?html&full -; http://www.foo.bar/status?xml&full -; The Full status returns for each process: -; pid - the PID of the process; -; state - the state of the process (Idle, Running, ...); -; start time - the date and time the process has started; -; start since - the number of seconds since the process has started; -; requests - the number of requests the process has served; -; request duration - the duration in µs of the requests; -; request method - the request method (GET, POST, ...); -; request URI - the request URI with the query string; -; content length - the content length of the request (only with POST); -; user - the user (PHP_AUTH_USER) (or '-' if not set); -; script - the main script called (or '-' if not set); -; last request cpu - the %cpu the last request consumed -; it's always 0 if the process is not in Idle state -; because CPU calculation is done when the request -; processing has terminated; -; last request memory - the max amount of memory the last request consumed -; it's always 0 if the process is not in Idle state -; because memory calculation is done when the request -; processing has terminated; -; If the process is in Idle state, then informations are related to the -; last request the process has served. Otherwise informations are related to -; the current request being served. -; Example output: -; ************************ -; pid: 31330 -; state: Running -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 63087 -; requests: 12808 -; request duration: 1250261 -; request method: GET -; request URI: /test_mem.php?N=10000 -; content length: 0 -; user: - -; script: /home/fat/web/docs/php/test_mem.php -; last request cpu: 0.00 -; last request memory: 0 -; -; Note: There is a real-time FPM status monitoring sample web page available -; It's available in: /usr/share/php5/fpm/status.html -; -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -pm.status_path = /php-fpm-status - -; The ping URI to call the monitoring page of FPM. If this value is not set, no -; URI will be recognized as a ping page. This could be used to test from outside -; that FPM is alive and responding, or to -; - create a graph of FPM availability (rrd or such); -; - remove a server from a group if it is not responding (load balancing); -; - trigger alerts for the operating team (24/7). -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -ping.path = /php-fpm-ping - -; This directive may be used to customize the response of a ping request. The -; response is formatted as text/plain with a 200 response code. -; Default Value: pong -;ping.response = pong - -; The access log file -; Default: not set -;access.log = log/$pool.access.log - -; The access log format. -; The following syntax is allowed -; %%: the '%' character -; %C: %CPU used by the request -; it can accept the following format: -; - %{user}C for user CPU only -; - %{system}C for system CPU only -; - %{total}C for user + system CPU (default) -; %d: time taken to serve the request -; it can accept the following format: -; - %{seconds}d (default) -; - %{miliseconds}d -; - %{mili}d -; - %{microseconds}d -; - %{micro}d -; %e: an environment variable (same as $_ENV or $_SERVER) -; it must be associated with embraces to specify the name of the env -; variable. Some exemples: -; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e -; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e -; %f: script filename -; %l: content-length of the request (for POST request only) -; %m: request method -; %M: peak of memory allocated by PHP -; it can accept the following format: -; - %{bytes}M (default) -; - %{kilobytes}M -; - %{kilo}M -; - %{megabytes}M -; - %{mega}M -; %n: pool name -; %o: output header -; it must be associated with embraces to specify the name of the header: -; - %{Content-Type}o -; - %{X-Powered-By}o -; - %{Transfert-Encoding}o -; - .... -; %p: PID of the child that serviced the request -; %P: PID of the parent of the child that serviced the request -; %q: the query string -; %Q: the '?' character if query string exists -; %r: the request URI (without the query string, see %q and %Q) -; %R: remote IP address -; %s: status (response code) -; %t: server time the request was received -; it can accept a strftime(3) format: -; %d/%b/%Y:%H:%M:%S %z (default) -; %T: time the log has been written (the request has finished) -; it can accept a strftime(3) format: -; %d/%b/%Y:%H:%M:%S %z (default) -; %u: remote user -; -; Default: "%R - %u %t \"%m %r\" %s" -;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" - -; The log file for slow requests -; Default Value: not set -; Note: slowlog is mandatory if request_slowlog_timeout is set -;slowlog = log/$pool.log.slow - -; The timeout for serving a single request after which a PHP backtrace will be -; dumped to the 'slowlog' file. A value of '0s' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -;request_slowlog_timeout = 0 - -; The timeout for serving a single request after which the worker process will -; be killed. This option should be used when the 'max_execution_time' ini option -; does not stop script execution for some reason. A value of '0' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -;request_terminate_timeout = 5m - -; Set open file descriptor rlimit. -; Default Value: system defined value -;rlimit_files = 1024 - -; Set max core size rlimit. -; Possible Values: 'unlimited' or an integer greater or equal to 0 -; Default Value: system defined value -;rlimit_core = 0 - -; Chroot to this directory at the start. This value must be defined as an -; absolute path. When this value is not set, chroot is not used. -; Note: you can prefix with '$prefix' to chroot to the pool prefix or one -; of its subdirectories. If the pool prefix is not set, the global prefix -; will be used instead. -; Note: chrooting is a great security feature and should be used whenever -; possible. However, all PHP paths will be relative to the chroot -; (error_log, sessions.save_path, ...). -; Default Value: not set -;chroot = - -; Chdir to this directory at the start. -; Note: relative path can be used. -; Default Value: current directory or / when chroot -chdir = / - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - -; Clear environment in FPM workers -; Prevents arbitrary environment variables from reaching FPM worker processes -; by clearing the environment in workers before env vars specified in this -; pool configuration are added. -; Setting to "no" will make all environment variables available to PHP code -; via getenv(), $_ENV and $_SERVER. -; Default Value: yes -;clear_env = no - -; Limits the extensions of the main script FPM will allow to parse. This can -; prevent configuration mistakes on the web server side. You should only limit -; FPM to .php extensions to prevent malicious users to use other extensions to -; exectute php code. -; Note: set an empty value to allow all extensions. -; Default Value: .php -;security.limit_extensions = .php .php3 .php4 .php5 - -; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from -; the current environment. -; Default Value: clean env -;env[HOSTNAME] = $HOSTNAME -;env[PATH] = /usr/local/bin:/usr/bin:/bin -;env[TMP] = /tmp -;env[TMPDIR] = /tmp -;env[TEMP] = /tmp - -; Additional php.ini defines, specific to this pool of workers. These settings -; overwrite the values previously defined in the php.ini. The directives are the -; same as the PHP SAPI: -; php_value/php_flag - you can set classic ini defines which can -; be overwritten from PHP call 'ini_set'. -; php_admin_value/php_admin_flag - these directives won't be overwritten by -; PHP call 'ini_set' -; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. - -; Defining 'extension' will load the corresponding shared extension from -; extension_dir. Defining 'disable_functions' or 'disable_classes' will not -; overwrite previously defined php.ini values, but will append the new value -; instead. - -; Note: path INI options can be relative and will be expanded with the prefix -; (pool, global or /usr) - -; Default Value: nothing is defined by default except the values in php.ini and -; specified at startup with the -d argument -;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com -;php_flag[display_errors] = off -;php_admin_value[error_log] = /var/log/fpm-php.www.log -;php_admin_flag[log_errors] = on -;php_admin_value[memory_limit] = 32M diff --git a/docker/php/7.3-fpm-alpine/php.ini b/docker/php/7.3-fpm-alpine/php.ini deleted file mode 100644 index f631e55..0000000 --- a/docker/php/7.3-fpm-alpine/php.ini +++ /dev/null @@ -1,56 +0,0 @@ -[PHP] -expose_php = Off -disable_functions = exec,system,popen,passthru,apache_child_terminate,apache_get_modules,apache_get_version,apache_getenv,apache_note,apache_setenv,virtual,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority -enable_dl = Off -allow_url_fopen = On -allow_url_include = Off -engine = On -short_open_tag = On -output_buffering = 4096 -realpath_cache_size = 4096k -realpath_cache_ttl = 600 -include_path = .:/usr/share/php -date.timezone = Europe/Paris -default_socket_timeout = 10 -max_execution_time = 30 -max_input_time = 60 -max_input_vars = 1000 -memory_limit = 512M -post_max_size = 32M -file_uploads = On -upload_tmp_dir = /tmp -upload_max_filesize = 32M -max_file_uploads = 20 -error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT -display_errors = Off -display_startup_errors = Off -log_errors = On -html_errors = On -SMTP = mailcatcher -smtp_port = 1025 -sendmail_path = /usr/sbin/sendmail -t -i -mail_log = syslog -session.save_handler = memcached -session.save_path = memcached:11211 -session.use_cookies = 1 -session.cookie_secure = -session.use_only_cookies = 1 -session.name = PHPSESSID -session.auto_start = 0 -session.cookie_lifetime = 0 -session.cookie_path = / -session.cookie_domain = -session.cookie_httponly = -session.serialize_handler = php -session.gc_probability = 0 -session.gc_divisor = 1000 -session.gc_maxlifetime = 2592000 -session.bug_compat_42 = Off -session.bug_compat_warn = Off -session.referer_check = -session.entropy_length = 512 -session.entropy_file = /dev/urandom -session.cache_limiter = nocache -session.cache_expire = 180 -session.use_trans_sid = 0 -session.hash_function = 0 diff --git a/docker/php/7.3-fpm-alpine/xdebug.ini b/docker/php/7.3-fpm-alpine/xdebug.ini deleted file mode 100644 index efb017f..0000000 --- a/docker/php/7.3-fpm-alpine/xdebug.ini +++ /dev/null @@ -1,13 +0,0 @@ -xdebug.collect_params = 1 -xdebug.collect_return = 1 -xdebug.default_enable = 1 -xdebug.force_display_errors = 1 -xdebug.force_error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED -xdebug.halt_level = E_WARNING -xdebug.idekey = PHPSTORM -xdebug.max_nesting_level = 1024 -xdebug.remote_enable = 1 -xdebug.remote_connect_back = 1 -xdebug.scream = 0 -xdebug.show_error_trace = 1 -xdebug.show_exception_trace = 1 diff --git a/docker/prometheus/alertmanager/Dockerfile b/docker/prometheus/alertmanager/Dockerfile deleted file mode 100644 index 09fde77..0000000 --- a/docker/prometheus/alertmanager/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM quay.io/prometheus/alertmanager:latest as dist -LABEL maintainer aynic.os - -FROM dist as master -ARG DOCKER_BUILD_DIR -ARG SLACK_WEBHOOK_ID - -COPY ${DOCKER_BUILD_DIR}/config.tmpl /etc/alertmanager/config.tmpl -RUN sed 's@SLACK_WEBHOOK_ID@'"${SLACK_WEBHOOK_ID:-UNDEFINED}"'@g' /etc/alertmanager/config.tmpl > /etc/alertmanager/alertmanager.yml diff --git a/docker/prometheus/alertmanager/config.tmpl b/docker/prometheus/alertmanager/config.tmpl deleted file mode 100644 index e9f9655..0000000 --- a/docker/prometheus/alertmanager/config.tmpl +++ /dev/null @@ -1,224 +0,0 @@ -# Documentation : https://prometheus.io/docs/alerting/configuration/ - -global: - resolve_timeout: 5m - slack_api_url: SLACK_WEBHOOK_ID - # The smarthost and SMTP sender used for mail notifications. - # smtp_smarthost: 'localhost:25' - # smtp_from: 'alertmanager@domain.com' - -# The root route on which each incoming alert enters. -route: - # The root route must not have any matchers as it is the entry point for - # all alerts. It needs to have a receiver configured so alerts that do not - # match any of the sub-routes are sent to someone. - receiver: 'slack-default' - - # The labels by which incoming alerts are grouped together. For example, - # multiple alerts coming in for cluster=A and alertname=LatencyHigh would - # be batched into a single group. - # group_by: ['alertname', 'cluster'] - group_by: ['instance'] - - # When a new group of alerts is created by an incoming alert, wait at - # least 'group_wait' to send the initial notification. - # This way ensures that you get multiple alerts for the same group that start - # firing shortly after another are batched together on the first - # notification. - group_wait: 1m - - # When the first notification was sent, wait 'group_interval' to send a batch - # of new alerts that started firing for that group. - group_interval: 1m - - # If an alert has successfully been sent, wait 'repeat_interval' to - # resend them. - repeat_interval: 1h - - - # All the above attributes are inherited by all child routes and can - # overwritten on each. - - # The child route trees. -# routes: - # This routes performs a regular expression match on alert labels to - # catch alerts that are related to a list of services. -# - match_re: -# service: ^(foo1|foo2|baz)$ -# receiver: team-X-mails - - routes: - - match: - severity: "low" - instance: "Hourly GMV" - type: "lower than static threshold" - receiver: slack-gmv-static-low - - - match: - severity: "high" - instance: "Hourly GMV" - type: "lower than static threshold" - receiver: slack-gmv-static-high - - - match: - severity: "low" - instance: "Hourly GMV" - receiver: slack-gmv-low - - - match: - severity: "high" - instance: "Hourly GMV" - receiver: slack-gmv-high - - - match: - instance: "Hourly GMV test" - receiver: slack-gmv-low - - - match: - severity: "low" - receiver: slack-generic-low - - - match: - severity: "medium" - receiver: slack-generic-medium - - - match: - severity: "high" - receiver: slack-generic-high - - - match: - severity: "critical" - receiver: slack-generic-critical - - - # The service has a sub-route for critical alerts, any alerts - # that do not match, i.e. severity != critical, fall-back to the - # parent node and are sent to 'team-X-mails' -# routes: -# - match: -# severity: critical -# receiver: team-X-pager - - -# Inhibition rules allow to mute a set of alerts given that another alert is -# firing. -# We use this to mute any warning-level notifications if the same alert is -# already critical. -inhibit_rules: - -- source_match: - severity: 'medium' - target_match: - severity: 'low' - # Apply inhibition if the alertname is the same. - equal: ['instance'] - -- source_match: - severity: 'high' - target_match: - severity: 'medium' - # Apply inhibition if the alertname is the same. - equal: ['instance'] - -- source_match: - severity: 'high' - target_match: - severity: 'low' - # Addition for GMV, which has no "medium" severity - equal: ['instance'] - -- source_match: - severity: 'critical' - target_match: - severity: 'high' - # Apply inhibition if the alertname is the same. - equal: ['instance'] - - - - - - -receivers: -- name: 'slack-gmv-static-low' - slack_configs: - - api_url: SLACK_WEBHOOK_ID - send_resolved: true - username: 'Chouette Vigilante [severity - low]' - icon_emoji: ':owl:' - title: ':mostly_sunny: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]' - text: "{{ .CommonAnnotations.description }}" - -- name: 'slack-gmv-static-high' - slack_configs: - - api_url: SLACK_WEBHOOK_ID - send_resolved: true - username: 'Chouette Vigilante [severity - high]' - icon_emoji: ':fallen_leaf:' - title: ':tornado: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]' - text: "{{ .CommonAnnotations.description }}" - -- name: 'slack-gmv-low' - slack_configs: - - api_url: SLACK_WEBHOOK_ID - send_resolved: true - username: 'Chouette Vigilante [severity - low]' - icon_emoji: ':owl:' - title: ':mostly_sunny: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]' - text: "{{ .CommonAnnotations.description }} - \n - \n{{ .CommonAnnotations.query }}" - -- name: 'slack-gmv-high' - slack_configs: - - api_url: SLACK_WEBHOOK_ID - send_resolved: true - username: 'Chouette Vigilante [severity - high]' - icon_emoji: ':fallen_leaf:' - title: ':tornado: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]' - text: "{{ .CommonAnnotations.description }} - \n - \n{{ .CommonAnnotations.query }}" - -- name: 'slack-generic-low' - slack_configs: - - api_url: SLACK_WEBHOOK_ID - send_resolved: true - username: 'Chouette Vigilante [severity - low]' - icon_emoji: ':owl:' - title: ':mostly_sunny: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]' - text: "*{{ .CommonLabels.instance }}* had a *{{ .CommonLabels.type }}* issue for a few seconds." - -- name: 'slack-generic-medium' - slack_configs: - - api_url: SLACK_WEBHOOK_ID - send_resolved: true - username: 'Chouette Vigilante [severity - medium]' - icon_emoji: ':owl:' - title: ':sun_behind_rain_cloud: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]' - text: "*{{ .CommonLabels.instance }}* had a *{{ .CommonLabels.type }}* issue for more than 5 minutes." - -- name: 'slack-generic-high' - slack_configs: - - api_url: SLACK_WEBHOOK_ID - send_resolved: true - username: 'Chouette Vigilante [severity - high]' - icon_emoji: ':fallen_leaf:' - title: ':tornado: {{ .Status|toUpper }} issue on {{ .CommonLabels.instance }}' - text: "*{{ .CommonLabels.instance }}* had a *{{ .CommonLabels.type }}* issue for an hour" - -- name: 'slack-generic-critical' - slack_configs: - - api_url: SLACK_WEBHOOK_ID - send_resolved: true - username: 'Chouette Vigilante [severity - critical]' - icon_emoji: ':fire:' - title: ':boom: {{ .Status|toUpper }} issue on {{ .CommonLabels.instance }}' - text: "*{{ .CommonLabels.instance }}* had a *{{ .CommonLabels.type }}* issue for more than 12 hours" - -- name: 'slack-default' - slack_configs: - - api_url: SLACK_WEBHOOK_ID - send_resolved: true - username: 'Chouette Vigilante [default]' - icon_emoji: ':owl:' diff --git a/docker/prometheus/blackbox-exporter/Dockerfile b/docker/prometheus/blackbox-exporter/Dockerfile deleted file mode 100644 index 059f32a..0000000 --- a/docker/prometheus/blackbox-exporter/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM quay.io/prometheus/blackbox-exporter:latest as dist -LABEL maintainer aynic.os - -FROM dist as master -ARG DOCKER_BUILD_DIR - -COPY ${DOCKER_BUILD_DIR}/config.yml /etc/blackbox_exporter/config.yml diff --git a/docker/prometheus/blackbox-exporter/config.yml b/docker/prometheus/blackbox-exporter/config.yml deleted file mode 100644 index 6bfd1b1..0000000 --- a/docker/prometheus/blackbox-exporter/config.yml +++ /dev/null @@ -1,38 +0,0 @@ -modules: - http_2xx: - prober: http - http: - preferred_ip_protocol: "ip4" - http_post_2xx: - prober: http - http: - method: POST - preferred_ip_protocol: "ip4" - tcp_connect: - prober: tcp - pop3s_banner: - prober: tcp - tcp: - query_response: - - expect: "^+OK" - tls: true - tls_config: - insecure_skip_verify: false - ssh_banner: - prober: tcp - tcp: - query_response: - - expect: "^SSH-2.0-" - irc_banner: - prober: tcp - tcp: - query_response: - - send: "NICK prober" - - send: "USER prober prober prober :prober" - - expect: "PING :([^ ]+)" - send: "PONG ${1}" - - expect: "^:[^ ]+ 001" - icmp: - prober: icmp - icmp: - preferred_ip_protocol: "ip4" diff --git a/docker/prometheus/es-exporter/Dockerfile b/docker/prometheus/es-exporter/Dockerfile deleted file mode 100644 index c7a5c10..0000000 --- a/docker/prometheus/es-exporter/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM braedon/prometheus-es-exporter:0.5.2 AS dist -ARG DOCKER_BUILD_DIR - -COPY ${DOCKER_BUILD_DIR}/exporter.cfg /usr/src/app - -FROM dist as master -ARG DOCKER_BUILD_DIR diff --git a/docker/prometheus/es-exporter/exporter.cfg b/docker/prometheus/es-exporter/exporter.cfg deleted file mode 100644 index 42f0caa..0000000 --- a/docker/prometheus/es-exporter/exporter.cfg +++ /dev/null @@ -1,112 +0,0 @@ -# This section defines default settings for how queries should be run. -# All settings can be overridden for any given query in its own section. -# The values shown in this example are also the fallback values used if -# a setting is not specified in the DEFAULT section or a query's section. -[DEFAULT] -# How often to run queries. -QueryIntervalSecs = 30 -# How long to wait for a query to return before timing out. -QueryTimeoutSecs = 10 -# The indices to run the query on. -# Any way of specifying indices supported by your Elasticsearch version can be used. -QueryIndices = stats - -# Queries are defined in sections beginning with 'query_'. -# Characters following this prefix will be used as a prefix for all metrics -# generated for this query -[query_all] -QueryIndices = stats -QueryJson = { - "size": 0, - "query": { - "match_all": {} - } - } - -[query_gmv_hourly] -QueryIndices = stats -QueryIntervalSecs = 300 -QueryJson = { - "size": 0, - "query": { - "constant_score": { - "filter": { - "range": { "date" : { "from" : "now-1h", "to" : "now" }} - } - } - }, - "aggs": { - "return": { "sum": { "field": "cartProductsPrice" } } - } - } - -[query_gmv_hourly_oneweekago] -QueryIndices = stats -QueryIntervalSecs = 300 -QueryJson = { - "size": 0, - "query": { - "constant_score": { - "filter": { - "range": { "date" : { "from" : "now-1w-1h", "to" : "now-1w" }} - } - } - }, - "aggs": { - "return": { "sum": { "field": "cartProductsPrice" } } - } - } - -[query_gmv_hourly_twoweeksago] -QueryIndices = stats -QueryIntervalSecs = 300 -QueryJson = { - "size": 0, - "query": { - "constant_score": { - "filter": { - "range": { "date" : { "from" : "now-2w-1h", "to" : "now-2w" }} - } - } - }, - "aggs": { - "return": { "sum": { "field": "cartProductsPrice" } } - } - } - -[query_gmv_hourly_threeweeksago] -QueryIndices = stats -QueryIntervalSecs = 300 -QueryJson = { - "size": 0, - "query": { - "constant_score": { - "filter": { - "range": { "date" : { "from" : "now-3w-1h", "to" : "now-3w" }} - } - } - }, - "aggs": { - "return": { "sum": { "field": "cartProductsPrice" } } - } - } - - -[query_gmv_hourly_fourweeksago] -QueryIndices = stats -QueryIntervalSecs = 300 -QueryJson = { - "size": 0, - "query": { - "constant_score": { - "filter": { - "range": { "date" : { "from" : "now-4w-1h", "to" : "now-4w" }} - } - } - }, - "aggs": { - "return": { "sum": { "field": "cartProductsPrice" } } - } - } - - diff --git a/docker/prometheus/prometheus/Dockerfile b/docker/prometheus/prometheus/Dockerfile deleted file mode 100644 index ddb3f89..0000000 --- a/docker/prometheus/prometheus/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM quay.io/prometheus/prometheus:latest as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR - -COPY ${DOCKER_BUILD_DIR}/docker-entrypoint.sh / -ENTRYPOINT ["/docker-entrypoint.sh"] -CMD [] - -FROM dist as master -ARG DOCKER_BUILD_DIR -ARG BLACKBOX_PRIMARY_TARGETS -ARG BLACKBOX_SECONDARY_TARGETS - -COPY ${DOCKER_BUILD_DIR}/prometheus.tmpl /etc/prometheus/prometheus.tmpl -COPY ${DOCKER_BUILD_DIR}/alert-rules.yml /etc/prometheus/alert-rules.yml - -# Creating the config file. -# The last -e instruction cleans the file from quotes in the lists -RUN sed \ - -e 's|BLACKBOX_PRIMARY_TARGETS|'" - ${BLACKBOX_PRIMARY_TARGETS// /\\n - }"'|; s|BLACKBOX_SECONDARY_TARGETS|'" - ${BLACKBOX_SECONDARY_TARGETS// /\\n - }"'|' \ - /etc/prometheus/prometheus.tmpl > /etc/prometheus/prometheus.yml diff --git a/docker/prometheus/prometheus/alert-rules.yml b/docker/prometheus/prometheus/alert-rules.yml deleted file mode 100644 index 5d7369b..0000000 --- a/docker/prometheus/prometheus/alert-rules.yml +++ /dev/null @@ -1,147 +0,0 @@ -groups: -- name: example - rules: - - # CET / CEST - - record: is_european_summer_time - expr: | - (vector(1) and (month() > 3 and month() < 10)) - or - (vector(1) and (month() == 3 and (day_of_month() - day_of_week()) >= 25) and absent((day_of_month() >= 25) and (day_of_week() == 0))) - or - (vector(1) and (month() == 10 and (day_of_month() - day_of_week()) < 25) and absent((day_of_month() >= 25) and (day_of_week() == 0))) - or - (vector(1) and ((month() == 10 and hour() < 1) or (month() == 3 and hour() > 0)) and ((day_of_month() >= 25) and (day_of_week() == 0))) - or - vector(0) - # French time (UTC+1) CET / CEST - - record: european_french_time - expr: time() + 3600 + 3600 * is_european_summer_time - - # Alert for any instance that is unreachable for a few seconds. - - alert: InstanceDown-01-low - expr: probe_success == 0 - for: 30s - labels: - severity: "low" - type: "timeout" - annotations: - summary: "Instance {{ $labels.instance }} down" - description: "Instance {{ $labels.instance }} of job {{ $labels.job }} has been down for a few seconds." - - # Alert for any instance that is unreachable for some time. - - alert: InstanceDown-02-medium - expr: probe_success == 0 - for: 5m - labels: - severity: "medium" - type: "timeout" - annotations: - summary: "Instance {{ $labels.instance }} down" - description: "Instance {{ $labels.instance }} of job {{ $labels.job }} has been down for 10 minutes" - - # Alert for any instance that is unreachable for a long time. - - alert: InstanceDown-03-high - expr: probe_success == 0 - for: 1h - labels: - severity: "high" - type: "timeout" - annotations: - summary: "Instance {{ $labels.instance }} down" - description: "Instance {{ $labels.instance }} of job {{ $labels.job }} has been down for 1 hour" - - # Alert for any instance that is unreachable for a very long time. - - alert: InstanceDown-04-critical - expr: probe_success == 0 - for: 12h - labels: - severity: "critical" - type: "timeout" - annotations: - summary: "Instance {{ $labels.instance }} down" - description: "Instance {{ $labels.instance }} of job {{ $labels.job }} has been down for more than 12 hours" - - # Alert for GMV < 250€ from 8AM to 10PM on weekdays - - alert: "GMV (daytime) below lower threshold" - # Prometheus time is GMT - expr: gmv_hourly_return_value < 250 and ON() hour(european_french_time) > 8 < 22 - for: 1h - labels: - severity: "high" - type: "lower than static threshold" - instance: "Hourly GMV" - annotations: - summary: "{{ $labels.instance }} GMV alert" - description: '`Hourly GMV` has been *Lower than 250€*, for more than 1 hour. - \n - \n> Current value is *{{ .Value | printf "%.2f" }}* (over the last hour)' - - # Alert for GMV too low (under static 50€) over night 10PM to 8AM - - alert: "GMV nightly below lower threshold" - # Prometheus time is GMT - expr: gmv_hourly_return_value < 50 and ON() hour(european_french_time) < 8 > 22 - for: 4h - labels: - severity: "low" - type: "lower than static threshold" - instance: "Hourly GMV" - annotations: - summary: "{{ $labels.instance }} GMV alert" - description: '`Hourly GMV` (night) has been *Lower than 50€*, for more than 4 hour. - \n - \n> Current value is *{{ .Value | printf "%.2f" }}* (over the last hour) - \n - \nGMV is usually very low between 23:30 and 05:00, but this still may require attention' - - # Alert for GMV significantly lower (<33%) than mean value over last 4 weeks from 8AM to 10PM on weekdays - - alert: "GMV less than 33% compared to last 4 weeks" - # Prometheus time is GMT - expr: gmv_hourly_return_value < .33 * ( gmv_hourly_oneweekago_return_value + gmv_hourly_twoweeksago_return_value + gmv_hourly_threeweeksago_return_value + gmv_hourly_fourweeksago_return_value ) * .25 and ON() hour(european_french_time) > 8 < 22 - for: 1h - labels: - severity: "low" - type: "lower than last 4 weeks" - instance: "Hourly GMV" - annotations: - summary: "{{ $labels.instance }} GMV alert" - description: '`Hourly GMV` has been *significantly lower than usual*, for more than 1 hour. - \n - \n> Current value is *{{ .Value | printf "%.2f" }}* (over the last hour)' - query: '>Mean value observed this month is {{ range query "((gmv_hourly_oneweekago_return_value + gmv_hourly_twoweeksago_return_value + gmv_hourly_threeweeksago_return_value + gmv_hourly_fourweeksago_return_value ) * .25)" }}*{{ .Value | printf "%.2f" }}*{{ end }} (same day of the week, same hour)' - - # Alert for GMV critically lower (<20%) than mean value over last 4 weeks from 8AM to 10PM on weekdays - - alert: "GMV less than 20% compared to last 4 weeks" - # Prometheus time is GMT - expr: gmv_hourly_return_value < .20 * ( gmv_hourly_oneweekago_return_value + gmv_hourly_twoweeksago_return_value + gmv_hourly_threeweeksago_return_value + gmv_hourly_fourweeksago_return_value ) * .25 and ON() hour(european_french_time) > 8 < 22 - for: 1h - labels: - severity: "high" - type: "low over last 4 weeks" - instance: "Hourly GMV" - annotations: - summary: "{{ $labels.instance }} GMV alert" - description: '`Hourly GMV` has been *critically lower than usual*, for more than 1 hour. - \n - \n> Current value is *{{ .Value | printf "%.2f" }}* (over the last hour)' - query: '>Mean value observed this month is {{ range query "((gmv_hourly_oneweekago_return_value + gmv_hourly_twoweeksago_return_value + gmv_hourly_threeweeksago_return_value + gmv_hourly_fourweeksago_return_value ) * .25)" }}*{{ .Value | printf "%.2f" }}*{{ end }} (same day of the week, same hour)' - - # Alert for GMV suspiciously higher (>500%) than mean value over last 4 weeks from 8AM to 10PM on weekdays - - alert: "GMV more than 500% compared to last 4 weeks" - # Prometheus time is GMT - expr: gmv_hourly_return_value > 5 * ( gmv_hourly_oneweekago_return_value + gmv_hourly_twoweeksago_return_value + gmv_hourly_threeweeksago_return_value + gmv_hourly_fourweeksago_return_value ) * .25 and ON() hour(european_french_time) > 8 < 22 - for: 1h - labels: - severity: "low" - type: "low over last 4 weeks" - instance: "Hourly GMV" - annotations: - summary: "{{ $labels.instance }} GMV alert" - description: '`Hourly GMV` has been *much higher than usual*, for more than 1 hour. - \n(If there is an ongoing sale, it is most probably ok) - \n - \n> Current value is *{{ .Value | printf "%.2f" }}* (over the last hour)' - query: '>Mean value observed this month is {{ range query "((gmv_hourly_oneweekago_return_value + gmv_hourly_twoweeksago_return_value + gmv_hourly_threeweeksago_return_value + gmv_hourly_fourweeksago_return_value ) * .25)" }}*{{ .Value | printf "%.2f" }}*{{ end }} (same day of the week, same hour)' - - - diff --git a/docker/prometheus/prometheus/docker-entrypoint.sh b/docker/prometheus/prometheus/docker-entrypoint.sh deleted file mode 100755 index c4ec2c8..0000000 --- a/docker/prometheus/prometheus/docker-entrypoint.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/ash -set -euo pipefail -set -o errexit -set -x - -trap 'kill -SIGQUIT $PID' INT - -# Launch alertmanager by default, or paramater -[ $# -eq 0 ] && /bin/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/prometheus --storage.tsdb.no-lockfile || exec "$@" & -PID=$! && wait - diff --git a/docker/prometheus/prometheus/prometheus.tmpl b/docker/prometheus/prometheus/prometheus.tmpl deleted file mode 100644 index 9983f65..0000000 --- a/docker/prometheus/prometheus/prometheus.tmpl +++ /dev/null @@ -1,107 +0,0 @@ -# my global config -global: - scrape_interval: 15s # Set the default scrape interval to every 15 seconds. Default is every 1 minute. - evaluation_interval: 1m # Evaluate rules every 15 seconds. The default is every 1 minute. - - # scrape_timeout global default is 10s. - -# Alertmanager configuration -alerting: - alertmanagers: - - static_configs: - - targets: - - alertmanager:9093 - -# Load rules once and periodically evaluate them according to the global 'evaluation_interval'. -rule_files: - - "alert-rules.yml" - # - "alert.rules" - # - "first_rules.yml" - # - "second_rules.yml" - -scrape_configs: - - job_name: 'Containers' - metrics_path: /metrics - static_configs: - - targets: - - prometheus:9090 - - blackbox:9115 - - grafana:3000 - - - - job_name: 'es-exporter' - static_configs: - - targets: - - es-exporter:9206 - - - - job_name: 'node-exporter' - static_configs: - - targets: - - node-exporter:9100 - - - - job_name: 'cadvisor-exporter' - static_configs: - - targets: - - cadvisor-exporter:8080 - - - - job_name: 'blackbox_primary' - - scrape_interval: 15s - scrape_timeout: 5s - - metrics_path: /probe - params: - module: - - http_2xx - - static_configs: - - targets: -BLACKBOX_PRIMARY_TARGETS - - relabel_configs: - - source_labels: [__address__] - regex: (.*)(:80)? - target_label: __param_target - replacement: ${1} - - source_labels: [__param_target] - regex: (.*) - target_label: instance - replacement: ${1} - - source_labels: [] - regex: .* - target_label: __address__ - replacement: blackbox:9115 - - - - job_name: 'blackbox_secondary' - - scrape_interval: 60s - scrape_timeout: 15s - - metrics_path: /probe - - params: - module: - - http_2xx - - static_configs: - - targets: -BLACKBOX_SECONDARY_TARGETS - - relabel_configs: - - source_labels: [__address__] - regex: (.*)(:80)? - target_label: __param_target - replacement: ${1} - - source_labels: [__param_target] - regex: (.*) - target_label: instance - replacement: ${1} - - source_labels: [] - regex: .* - target_label: __address__ - replacement: blackbox:9115 - diff --git a/docker/registrator/Dockerfile b/docker/registrator/Dockerfile deleted file mode 100644 index e45e120..0000000 --- a/docker/registrator/Dockerfile +++ /dev/null @@ -1,42 +0,0 @@ -FROM golang:1-alpine AS build -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR -ARG GIT_AUTHOR_NAME -ARG GIT_AUTHOR_EMAIL - -ENV GIT_AUTHOR_NAME=${GIT_AUTHOR_NAME} -ENV GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL} -ENV GIT_COMMITTER_NAME=${GIT_AUTHOR_NAME} -ENV GIT_COMMITTER_EMAIL=${GIT_AUTHOR_EMAIL} - -WORKDIR /go/src/github.com/gliderlabs/registrator/ -RUN \ - apk add --no-cache git \ - && git clone https://github.com/gliderlabs/registrator/ . \ - && git reset --hard 4322fe00304d6de661865721b073dc5c7e750bd2 \ - # -useIpFromNetwork \ - && git fetch origin pull/596/head \ - && git merge --no-edit 8d904c60949e310893a25c8af3636b0151334dd4 \ - # fix SERVICE_CHECK_SCRIPT - && git fetch origin pull/686/head \ - && git merge --no-edit 097305157a6a2c0c236fa430c17498c895536782 \ - && go mod init \ - && go mod tidy \ - && go mod vendor \ - && CGO_ENABLED=0 GOOS=linux go build \ - -a -installsuffix cgo \ - -ldflags "-X main.Version=$(cat VERSION)" \ - -o /go/bin/registrator \ - . - -FROM alpine:latest as dist -ARG DOCKER_BUILD_DIR - -RUN apk add --no-cache ca-certificates -COPY --from=build /go/bin/registrator /bin/registrator - -ENTRYPOINT ["/bin/registrator"] -HEALTHCHECK CMD kill -SIGUSR1 1 - -FROM dist as master -ARG DOCKER_BUILD_DIR diff --git a/docker/riofs/Dockerfile b/docker/riofs/Dockerfile deleted file mode 100644 index 9fdd76d..0000000 --- a/docker/riofs/Dockerfile +++ /dev/null @@ -1,44 +0,0 @@ -FROM alpine:latest as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR - -WORKDIR /usr/src - -# Install riofs -RUN apk upgrade --no-cache \ - && apk add --no-cache --virtual .build-deps \ - alpine-sdk \ - autoconf \ - automake \ - bsd-compat-headers \ - curl-dev \ - fuse-dev \ - glib-dev \ - libc-dev \ - libevent-dev \ - libexecinfo-dev \ - libressl-dev \ - libxml2-dev \ - musl-dev \ - shared-mime-info \ - && git clone https://github.com/skoobe/riofs \ - && cd riofs \ - && ./autogen.sh \ - && ./configure --prefix=/usr/local \ - && make \ - && make install \ - && cd .. \ - && rm -rf riofs \ - && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr/local \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | xargs -r apk info --installed \ - | sort -u \ - )" \ - && apk del .build-deps \ - && apk add --no-cache --virtual .run-deps $runDeps - -ENTRYPOINT /usr/local/bin/riofs - -FROM dist as master -ARG DOCKER_BUILD_DIR diff --git a/docker/rozofs/Dockerfile b/docker/rozofs/Dockerfile deleted file mode 100644 index 6c811b5..0000000 --- a/docker/rozofs/Dockerfile +++ /dev/null @@ -1,30 +0,0 @@ -# link: https://github.com/kvaps/docker-rozofs/blob/master/Dockerfile -FROM debian:bookworm as master -ARG DOCKER_BUILD_DIR - -# Make sure the package repository is up to date and install required packages -RUN apt-get -y update \ - && apt-get install -fy gnupg lsb-release tini wget \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists - -# Avoid warning during packet installations -ENV DEBIAN_FRONTEND noninteractive - -# Install the release key -# Set the RozoFS repository to access RozoFS packages -# Install RozoFS manager (optionally) required for all nodes -RUN wget -O - http://dl.rozofs.org/deb/devel@rozofs.com.gpg.key | apt-key add - \ - && echo deb http://dl.rozofs.org/deb/master $(lsb_release -sc) main | tee /etc/apt/sources.list.d/rozofs.list \ - && echo 'APT::Install-Recommends "0";' > /etc/apt/apt.conf.d/01norecommend \ - && echo 'APT::Install-Suggests "0";' >> /etc/apt/apt.conf.d/01norecommend \ - && echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d \ - && apt-get -y update \ - && apt-get install -y rozofs-manager* rozofs-* busybox inotify-tools \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists - - -COPY ${DOCKER_BUILD_DIR}/rozofs.sh / -ENTRYPOINT ["/usr/bin/tini", "--"] -CMD [ "/rozofs.sh" ] diff --git a/docker/rozofs/rozofs.sh b/docker/rozofs/rozofs.sh deleted file mode 100755 index 56cbcea..0000000 --- a/docker/rozofs/rozofs.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# link: https://github.com/kvaps/docker-rozofs/blob/master/rozofs.sh - -start_daemons() { - # restore fstab - cp -f /etc/rozofs/fstab /etc/fstab - # start rozo agent - /etc/init.d/rozofs-manager-agent start - # start rozo export - if [ "$(grep -c '\(volumes\|exports\) *= *( *) *;' /etc/rozofs/export.conf)" != "2" ]; then - /etc/init.d/rozofs-exportd start - fi - # start rozo storage - if [ "$(grep -c 'storages *= *( *) *;' /etc/rozofs/storage.conf)" != "1" ]; then - /etc/init.d/rozofs-storaged start - fi - # start rozo mounts - awk '$1 == "rozofsmount" {print $2}' /etc/fstab | - while read mount; do - mkdir -p "$mount" - mount "$mount" - done -} - -stop_daemons() { - # save fstab - cp -f /etc/fstab /etc/rozofs/fstab.bak - mv /etc/rozofs/fstab.bak /etc/rozofs/fstab - awk '$1 == "rozofsmount" {print $2}' /etc/fstab | - while read mount; do - umount "$mount" - done - /etc/init.d/rozofs-storaged stop - /etc/init.d/rozofs-exportd stop - /etc/init.d/rozofs-manager-agent stop -} - -# start logging -/bin/busybox syslogd -tail -F /var/log/messages 2>/dev/null & - -trap stop_daemons EXIT -start_daemons - -while inotifywait -e modify /etc/fstab; do - cp -f /etc/fstab /etc/rozofs/fstab.bak - mv /etc/rozofs/fstab.bak /etc/rozofs/fstab -done & - -wait $! diff --git a/docker/s3fs/Dockerfile b/docker/s3fs/Dockerfile deleted file mode 100644 index c1a2974..0000000 --- a/docker/s3fs/Dockerfile +++ /dev/null @@ -1,68 +0,0 @@ -FROM alpine:latest as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR -ARG S3FS_VERSION=v1.85 - -# Install s3fs-fuse -RUN apk --no-cache upgrade \ - && apk --no-cache add --virtual .build-deps \ - alpine-sdk \ - automake \ - autoconf \ - curl-dev \ - fuse-dev \ - libressl-dev \ - libgcrypt-dev \ - libxml2-dev \ - && git clone https://github.com/s3fs-fuse/s3fs-fuse \ - && cd s3fs-fuse \ - && git checkout tags/${S3FS_VERSION} -b ${S3FS_VERSION} \ - && ./autogen.sh \ - && ./configure --prefix=/usr/local \ - && make install \ - && cd .. \ - && rm -rf s3fs-fuse \ - && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr/local \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | xargs -r apk info --installed \ - | sort -u \ - )" \ - && apk del .build-deps \ - && apk add --no-cache --virtual .run-deps $runDeps curl openssl - -ARG S3FS_DIR=/srv/s3 -ENV S3FS_DIR=${S3FS_DIR} -RUN mkdir -p ${S3FS_DIR} -VOLUME ${S3FS_DIR} - -COPY ${DOCKER_BUILD_DIR}/docker-entrypoint.sh / -ENTRYPOINT /docker-entrypoint.sh - -FROM dist as master -ARG DOCKER_BUILD_DIR -ARG UID=0 -ARG USER=root -ENV UID=${UID} -ENV GID=${UID} -ENV USER=${USER} - -# If we provide a specific UID -RUN let $UID >/dev/null 2>&1 \ -# Remove user with $UID if it is not our $USER - && if [ "$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')" != "$USER" ]; then \ - sed -i '/^'$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')':x:'$UID':/d' /etc/passwd; \ - sed -i '/^'$(getent group $GID |awk 'BEGIN {FS=":"} {print $1}')':x:'$GID':/d' /etc/group; \ - fi \ -# Force $UID if our $USER already exists - && sed -i 's/^'$USER':x:[0-9]\+:[0-9]\+:/'$USER':x:'$UID':'$GID':/' /etc/passwd \ - && sed -i 's/^'$USER':x:[0-9]\+:/'$USER':x:'$GID':/' /etc/group \ -# Create $USER if it does not exist - && if [ "$(getent passwd $UID)" = "" ]; then \ - echo "$USER:x:$UID:$GID::/home/$USER:/bin/false" >> /etc/passwd; \ - echo "$USER:!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \ - echo "$USER:x:$GID:" >> /etc/group; \ - fi \ - && mkdir -p /home/$USER \ - && chown $UID:$GID /home/$USER \ - || true diff --git a/docker/s3fs/docker-entrypoint.sh b/docker/s3fs/docker-entrypoint.sh deleted file mode 100755 index 3dece9d..0000000 --- a/docker/s3fs/docker-entrypoint.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env ash -set -euo pipefail -set -o errexit - -trap 'kill -SIGQUIT $PID' INT - -# For each user (default to $USER:$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY:$AWS_S3_BUCKET) -echo "${USERS:-${USER}:${AWS_ACCESS_KEY_ID}:${AWS_SECRET_ACCESS_KEY}:${AWS_S3_BUCKETS:-${AWS_S3_BUCKET:-}}}" |sed 's/ /\n/g' | while read -r line; do - [ -n "${line}" ] && echo "${line//:/ }" | while read -r user aws_access_key_id aws_secret_access_key aws_s3_buckets; do - - # Skip user if no AWS credentials - [ -n "${aws_access_key_id:-$AWS_ACCESS_KEY_ID}" ] && [ -n "${aws_secret_access_key:-$AWS_SECRET_ACCESS_KEY}" ] || continue - - # Create user if not exists - id "${user:-root}" >/dev/null 2>&1 || adduser -h "/home/${user:-root}" -s /sbin/nologin -D "${user:-root}" - - # Configure s3fs - passwd_file="$(eval echo ~"${user:-root}")/.passwd-s3fs" - echo "${aws_access_key_id:-$AWS_ACCESS_KEY_ID}:${aws_secret_access_key:-$AWS_SECRET_ACCESS_KEY}" > "${passwd_file}" - chmod 0400 "${passwd_file}" - - # Find all buckets readable with our credentials - if [ -z "${aws_s3_buckets}" ]; then - date="$(date -R)" - string="GET\n\n\n${date}\n/" - authorization="AWS ${aws_access_key_id:-$AWS_ACCESS_KEY_ID}:$(echo -ne "${string}" | openssl sha1 -hmac "${aws_secret_access_key:-$AWS_SECRET_ACCESS_KEY}" -binary | openssl base64)" -# posix - aws_s3_buckets=$(curl -s -H "Date: $date" -H "Authorization: $authorization" https://s3.amazonaws.com/ | awk -F"<|>" 'BEGIN {RS="<"} /Name/ {print $2}') -# bash only -# aws_s3_buckets=$(curl -s -H "Date: $date" -H "Authorization: $authorization" https://s3.amazonaws.com/ \ -# | while IFS='>' read -rd '<' element value; do -# case "${element}" in -# 'Name') -# echo "${value}" -# ;; -# *) -# ;; -# esac -# done) - fi - - # For each bucket (default to all buckets readable by AWS_ACCESS_KEY_ID) - echo "${aws_s3_buckets}" |sed 's/,/\n/g' |while read -r aws_s3_bucket; do - - # Skip empty values - [ -n "${aws_s3_bucket}" ] || continue - - # Create s3fs mountpoint - s3fs_bucket_dir="${S3FS_DIR:-/srv/s3}/${aws_s3_bucket}" - mkdir -p "${s3fs_bucket_dir}" - - # Mount s3fs - /usr/local/bin/s3fs "${aws_s3_bucket}" "${s3fs_bucket_dir}" -o nosuid,nonempty,nodev,allow_other,complement_stat,mp_umask=027,uid=$(id -u "${user:-root}"),gid=$(id -g "${user:-root}"),passwd_file="${passwd_file}",default_acl="${AWS_S3_ACL:-private}",retries=5 - - # Exit docker if the s3 filesystem is not reachable anymore - ( crontab -l && echo "* * * * * timeout 3 touch '${s3fs_bucket_dir}/.s3fs_watchdog' >/dev/null 2>&1 || kill -KILL -1" ) | crontab - - - done - done -done - -# Keep container running -[ $# -eq 0 ] && tail -f /dev/null || exec "$@" & -PID=$! && wait diff --git a/docker/sematext/logagent/Dockerfile b/docker/sematext/logagent/Dockerfile deleted file mode 100644 index 56c1c0d..0000000 --- a/docker/sematext/logagent/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -FROM sematext/logagent:latest as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR -ARG GIT_AUTHOR_NAME -ARG GIT_AUTHOR_EMAIL - -ENV GIT_AUTHOR_NAME=${GIT_AUTHOR_NAME} -ENV GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL} -ENV GIT_COMMITTER_NAME=${GIT_AUTHOR_NAME} -ENV GIT_COMMITTER_EMAIL=${GIT_AUTHOR_EMAIL} - -RUN apk add --no-cache \ - git - -RUN cd / \ - && git stash \ - && git fetch -t origin pull/267/head \ - && git reset --hard refs/tags/3.0.59 \ - && git rebase d168bd0e8745a077e962248741f6be9fbeb7a8b5 \ - && git stash pop - -FROM dist as master -ARG DOCKER_BUILD_DIR diff --git a/docker/ssh/AUTHORS.md b/docker/ssh/AUTHORS.md deleted file mode 100644 index f0559d0..0000000 --- a/docker/ssh/AUTHORS.md +++ /dev/null @@ -1,4 +0,0 @@ -# Authors - -* **Andreas Urbanski** - [@andreasur](https://github.com/andreasur/docker-ssh-agent) -* **Yann Autissier** - [@aya](https://github.com/aya/docker-ssh-agent) diff --git a/docker/ssh/CHANGELOG.md b/docker/ssh/CHANGELOG.md deleted file mode 100644 index 89cd6eb..0000000 --- a/docker/ssh/CHANGELOG.md +++ /dev/null @@ -1,10 +0,0 @@ -# Changelog - -## Initial Release (Oct 18, 2016) - -* Docker image for SSH agent container - -## v1.0.0 (May 16, 2017) - -* Use alpine latest version -* Remove unwanted outputs diff --git a/docker/ssh/Dockerfile b/docker/ssh/Dockerfile deleted file mode 100644 index 28f4604..0000000 --- a/docker/ssh/Dockerfile +++ /dev/null @@ -1,54 +0,0 @@ -FROM alpine:latest as dist -LABEL maintainer aynic.os -ARG DOCKER_BUILD_DIR - -# Install dependencies -RUN apk add --no-cache \ - openssh \ - socat - -# Setup environment variables; export SSH_AUTH_SOCK from socket directory -ENV SOCKET_DIR /tmp/ssh-agent -ENV SSH_AUTH_SOCK ${SOCKET_DIR}/socket -ENV SSH_AUTH_PROXY_SOCK ${SOCKET_DIR}/proxy-socket - -# Copy entrypoint script to container -COPY ${DOCKER_BUILD_DIR}/docker-entrypoint.sh /docker-entrypoint.sh - -ENTRYPOINT ["/docker-entrypoint.sh"] - -CMD ["ssh-agent"] - -FROM dist as master -ARG DOCKER_BUILD_DIR -ARG UID -ARG GID -ARG USER -ENV UID=${UID} -ENV GID=${UID} -ENV USER=${USER} - -# If we provide a specific UID -RUN let $UID >/dev/null 2>&1 \ -# Remove user with $UID if it is not our $USER - && if [ "$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')" != "$USER" ]; then \ - sed -i '/^'$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')':x:'$UID':/d' /etc/passwd; \ - sed -i '/^'$(getent group $GID |awk 'BEGIN {FS=":"} {print $1}')':x:'$GID':/d' /etc/group; \ - fi \ -# Force $UID if our $USER already exists - && sed -i 's/^'$USER':x:[0-9]\+:[0-9]\+:/'$USER':x:'$UID':'$GID':/' /etc/passwd \ - && sed -i 's/^'$USER':x:[0-9]\+:/'$USER':x:'$GID':/' /etc/group \ -# Create $USER if it does not exist - && if [ "$(getent passwd $UID)" = "" ]; then \ - echo "$USER:x:$UID:$GID::/home/$USER:/bin/false" >> /etc/passwd; \ - echo "$USER:!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \ - echo "$USER:x:$GID:" >> /etc/group; \ - fi \ - && mkdir -p /home/$USER \ - && chown $UID:$GID /home/$USER \ - || true - -RUN mkdir -p $SOCKET_DIR && chown $USER $SOCKET_DIR - -VOLUME ${SOCKET_DIR} -USER $USER diff --git a/docker/ssh/LICENSE b/docker/ssh/LICENSE deleted file mode 100644 index 543a67e..0000000 --- a/docker/ssh/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Andreas Urbanski, 2016 -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - diff --git a/docker/ssh/README.md b/docker/ssh/README.md deleted file mode 100644 index 1dcaaf6..0000000 --- a/docker/ssh/README.md +++ /dev/null @@ -1,72 +0,0 @@ -# Docker SSH Agent - -Lets you store your SSH authentication keys in a dockerized ssh-agent that can provide the SSH authentication socket for other containers. Works in OSX and Linux environments. - -## Why? - -On OSX you cannot simply forward your authentication socket to a docker container to be able to e.g clone private repositories that you have access to. You don't want to copy your private key to all containers either. The solution is to add your keys only once to a long-lived ssh-agent container that can be used by other containers and stopped when not needed anymore. - -## How to use - -### 0. Build -Navigate to the project directory and launch the following command to build the image: - -``` -docker build -t docker-ssh-agent:latest -f Dockerfile . -``` - -### 1. Run a long-lived container - -``` -docker run -d --name=ssh-agent docker-ssh-agent:latest -``` - -### 2. Add your ssh keys - -Run a temporary container with volume mounted from host that includes your SSH keys. SSH key id_rsa will be added to ssh-agent (you can replace id_rsa with your key name): - -``` -docker run --rm --volumes-from=ssh-agent -v ~/.ssh:/root/.ssh -it docker-ssh-agent:latest ssh-add /root/.ssh/id_rsa -``` - -The ssh-agent container is now ready to use. - -### 3. Add ssh-agent socket to other container: - -#### With docker-compose - -If you're using `docker-compose` this is how you forward the socket to a container: - -``` - volumes_from: - - ssh-agent - environment: - - SSH_AUTH_SOCK=/tmp/ssh-agent/socket -``` - -#### Without docker-compose - -Here's an example how to run a Ubuntu container that uses the ssh authentication socket: - -``` -docker run -it --volumes-from=ssh-agent -e SSH_AUTH_SOCK=/tmp/ssh-agent/socket ubuntu:latest /bin/bash -``` - -#### Disable host key verification in your containers - -You may wish to disable the ssh host key verification inside your containers to avoid using interactive mode at all. -You can do it adding the following configuration in the /etc/ssh/ssh_config file of your containers. - -``` -Host * - UserKnownHostsFile /dev/null - StrictHostKeyChecking no -``` - -### Deleting keys from the container - -Run a temporary container and delete all known keys from ssh-agent: - -``` -docker run --rm --volumes-from=ssh-agent -it docker-ssh-agent:latest ssh-add -D -``` diff --git a/docker/ssh/docker-entrypoint.sh b/docker/ssh/docker-entrypoint.sh deleted file mode 100755 index 762bebe..0000000 --- a/docker/ssh/docker-entrypoint.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env sh -set -euo pipefail -set -o errexit - -# Print a debug message if debug mode is on ($DEBUG is not empty) -# @param message -debug_msg () -{ - if [ -n "${DEBUG:-}" -a "${DEBUG:-}" != "false" ]; then - echo "$@" - fi -} - -case "$1" in - # Start ssh-agent - ssh-agent) - - # Create proxy-socket for ssh-agent (to give everyone access to the ssh-agent socket) - debug_msg "Create proxy socket..." - rm -f ${SSH_AUTH_SOCK} ${SSH_AUTH_PROXY_SOCK} > /dev/null 2>&1 - socat UNIX-LISTEN:${SSH_AUTH_PROXY_SOCK},perm=0666,fork UNIX-CONNECT:${SSH_AUTH_SOCK} & - - debug_msg "Launch ssh-agent..." - exec /usr/bin/ssh-agent -a ${SSH_AUTH_SOCK} -D >/dev/null - ;; - - *) - debug_msg "Exec: $@" - exec $@ - ;; -esac diff --git a/docker/supabase/edge-runtime/Dockerfile b/docker/supabase/edge-runtime/Dockerfile deleted file mode 100644 index 41f81dc..0000000 --- a/docker/supabase/edge-runtime/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -ARG SUPABASE_EDGE_RUNTIME_VERSION=v1.65.3 -FROM supabase/edge-runtime:${SUPABASE_EDGE_RUNTIME_VERSION} -ARG DOCKER_BUILD_DIR=. - -RUN mkdir -p /home/deno/functions -COPY ${DOCKER_BUILD_DIR}/hello/ /home/deno/functions/hello/ -COPY ${DOCKER_BUILD_DIR}/main/ /home/deno/functions/main/ - -VOLUME /home/deno/functions -VOLUME /root/.cache diff --git a/docker/supabase/edge-runtime/hello/index.ts b/docker/supabase/edge-runtime/hello/index.ts deleted file mode 100644 index f1e20b9..0000000 --- a/docker/supabase/edge-runtime/hello/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Follow this setup guide to integrate the Deno language server with your editor: -// https://deno.land/manual/getting_started/setup_your_environment -// This enables autocomplete, go to definition, etc. - -import { serve } from "https://deno.land/std@0.177.1/http/server.ts" - -serve(async () => { - return new Response( - `"Hello from Edge Functions!"`, - { headers: { "Content-Type": "application/json" } }, - ) -}) - -// To invoke: -// curl 'http://localhost:/functions/v1/hello' \ -// --header 'Authorization: Bearer ' diff --git a/docker/supabase/edge-runtime/main/index.ts b/docker/supabase/edge-runtime/main/index.ts deleted file mode 100644 index a094010..0000000 --- a/docker/supabase/edge-runtime/main/index.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { serve } from 'https://deno.land/std@0.131.0/http/server.ts' -import * as jose from 'https://deno.land/x/jose@v4.14.4/index.ts' - -console.log('main function started') - -const JWT_SECRET = Deno.env.get('JWT_SECRET') -const VERIFY_JWT = Deno.env.get('VERIFY_JWT') === 'true' - -function getAuthToken(req: Request) { - const authHeader = req.headers.get('authorization') - if (!authHeader) { - throw new Error('Missing authorization header') - } - const [bearer, token] = authHeader.split(' ') - if (bearer !== 'Bearer') { - throw new Error(`Auth header is not 'Bearer {token}'`) - } - return token -} - -async function verifyJWT(jwt: string): Promise { - const encoder = new TextEncoder() - const secretKey = encoder.encode(JWT_SECRET) - try { - await jose.jwtVerify(jwt, secretKey) - } catch (err) { - console.error(err) - return false - } - return true -} - -serve(async (req: Request) => { - if (req.method !== 'OPTIONS' && VERIFY_JWT) { - try { - const token = getAuthToken(req) - const isValidJWT = await verifyJWT(token) - - if (!isValidJWT) { - return new Response(JSON.stringify({ msg: 'Invalid JWT' }), { - status: 401, - headers: { 'Content-Type': 'application/json' }, - }) - } - } catch (e) { - console.error(e) - return new Response(JSON.stringify({ msg: e.toString() }), { - status: 401, - headers: { 'Content-Type': 'application/json' }, - }) - } - } - - const url = new URL(req.url) - const { pathname } = url - const path_parts = pathname.split('/') - const service_name = path_parts[1] - - if (!service_name || service_name === '') { - const error = { msg: 'missing function name in request' } - return new Response(JSON.stringify(error), { - status: 400, - headers: { 'Content-Type': 'application/json' }, - }) - } - - const servicePath = `/home/deno/functions/${service_name}` - console.error(`serving the request with ${servicePath}`) - - const memoryLimitMb = 150 - const workerTimeoutMs = 1 * 60 * 1000 - const noModuleCache = false - const importMapPath = null - const envVarsObj = Deno.env.toObject() - const envVars = Object.keys(envVarsObj).map((k) => [k, envVarsObj[k]]) - - try { - const worker = await EdgeRuntime.userWorkers.create({ - servicePath, - memoryLimitMb, - workerTimeoutMs, - noModuleCache, - importMapPath, - envVars, - }) - return await worker.fetch(req) - } catch (e) { - const error = { msg: e.toString() } - return new Response(JSON.stringify(error), { - status: 500, - headers: { 'Content-Type': 'application/json' }, - }) - } -}) diff --git a/docker/supabase/kong/Dockerfile b/docker/supabase/kong/Dockerfile deleted file mode 100644 index 5d2bfd3..0000000 --- a/docker/supabase/kong/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -ARG SUPABASE_KONG_VERSION=3.9.0 -FROM kong:${SUPABASE_KONG_VERSION} -ARG DOCKER_BUILD_DIR=. -ARG DOCKER_NETWORK=supabase_default -ARG REALTIME_TENANT=realtime-dev - -RUN mkdir -p /home/kong -COPY ${DOCKER_BUILD_DIR}/kong.yml /home/kong/temp.yml -# realtime tenant is taken from hostname in url -RUN sed -i 's/realtime-dev.supabase-realtime/'"${REALTIME_TENANT}"'.'"${DOCKER_NETWORK}"'/' /home/kong/temp.yml - -VOLUME /home/kong diff --git a/docker/supabase/kong/kong.yml b/docker/supabase/kong/kong.yml deleted file mode 100644 index 7abf425..0000000 --- a/docker/supabase/kong/kong.yml +++ /dev/null @@ -1,241 +0,0 @@ -_format_version: '2.1' -_transform: true - -### -### Consumers / Users -### -consumers: - - username: DASHBOARD - - username: anon - keyauth_credentials: - - key: $SUPABASE_ANON_KEY - - username: service_role - keyauth_credentials: - - key: $SUPABASE_SERVICE_KEY - -### -### Access Control List -### -acls: - - consumer: anon - group: anon - - consumer: service_role - group: admin - -### -### Dashboard credentials -### -basicauth_credentials: - - consumer: DASHBOARD - username: $DASHBOARD_USERNAME - password: $DASHBOARD_PASSWORD - -### -### API Routes -### -services: - ## Open Auth routes - - name: auth-v1-open - url: http://auth:9999/verify - routes: - - name: auth-v1-open - strip_path: true - paths: - - /auth/v1/verify - plugins: - - name: cors - - name: auth-v1-open-callback - url: http://auth:9999/callback - routes: - - name: auth-v1-open-callback - strip_path: true - paths: - - /auth/v1/callback - plugins: - - name: cors - - name: auth-v1-open-authorize - url: http://auth:9999/authorize - routes: - - name: auth-v1-open-authorize - strip_path: true - paths: - - /auth/v1/authorize - plugins: - - name: cors - - ## Secure Auth routes - - name: auth-v1 - _comment: 'GoTrue: /auth/v1/* -> http://auth:9999/*' - url: http://auth:9999/ - routes: - - name: auth-v1-all - strip_path: true - paths: - - /auth/v1/ - plugins: - - name: cors - - name: key-auth - config: - hide_credentials: false - - name: acl - config: - hide_groups_header: true - allow: - - admin - - anon - - ## Secure REST routes - - name: rest-v1 - _comment: 'PostgREST: /rest/v1/* -> http://rest:3000/*' - url: http://rest:3000/ - routes: - - name: rest-v1-all - strip_path: true - paths: - - /rest/v1/ - plugins: - - name: cors - - name: key-auth - config: - hide_credentials: true - - name: acl - config: - hide_groups_header: true - allow: - - admin - - anon - - ## Secure GraphQL routes - - name: graphql-v1 - _comment: 'PostgREST: /graphql/v1/* -> http://rest:3000/rpc/graphql' - url: http://rest:3000/rpc/graphql - routes: - - name: graphql-v1-all - strip_path: true - paths: - - /graphql/v1 - plugins: - - name: cors - - name: key-auth - config: - hide_credentials: true - - name: request-transformer - config: - add: - headers: - - Content-Profile:graphql_public - - name: acl - config: - hide_groups_header: true - allow: - - admin - - anon - - ## Secure Realtime routes - - name: realtime-v1-ws - _comment: 'Realtime: /realtime/v1/* -> ws://realtime:4000/socket/*' - url: http://realtime-dev.supabase-realtime:4000/socket - protocol: ws - routes: - - name: realtime-v1-ws - strip_path: true - paths: - - /realtime/v1/ - plugins: - - name: cors - - name: key-auth - config: - hide_credentials: false - - name: acl - config: - hide_groups_header: true - allow: - - admin - - anon - - name: realtime-v1-rest - _comment: 'Realtime: /realtime/v1/* -> ws://realtime:4000/socket/*' - url: http://realtime-dev.supabase-realtime:4000/api - protocol: http - routes: - - name: realtime-v1-rest - strip_path: true - paths: - - /realtime/v1/api - plugins: - - name: cors - - name: key-auth - config: - hide_credentials: false - - name: acl - config: - hide_groups_header: true - allow: - - admin - - anon - ## Storage routes: the storage server manages its own auth - - name: storage-v1 - _comment: 'Storage: /storage/v1/* -> http://storage:5000/*' - url: http://storage:5000/ - routes: - - name: storage-v1-all - strip_path: true - paths: - - /storage/v1/ - plugins: - - name: cors - - ## Edge Functions routes - - name: functions-v1 - _comment: 'Edge Functions: /functions/v1/* -> http://functions:9000/*' - url: http://functions:9000/ - routes: - - name: functions-v1-all - strip_path: true - paths: - - /functions/v1/ - plugins: - - name: cors - - ## Analytics routes - - name: analytics-v1 - _comment: 'Analytics: /analytics/v1/* -> http://logflare:4000/*' - url: http://analytics:4000/ - routes: - - name: analytics-v1-all - strip_path: true - paths: - - /analytics/v1/ - - ## Secure Database routes - - name: meta - _comment: 'pg-meta: /pg/* -> http://pg-meta:8080/*' - url: http://meta:8080/ - routes: - - name: meta-all - strip_path: true - paths: - - /pg/ - plugins: - - name: key-auth - config: - hide_credentials: false - - name: acl - config: - hide_groups_header: true - allow: - - admin - - ## Protected Dashboard - catch all remaining routes - - name: dashboard - _comment: 'Studio: /* -> http://studio:3000/*' - url: http://studio:3000/ - routes: - - name: dashboard-all - strip_path: true - paths: - - / - plugins: - - name: cors - - name: basic-auth - config: - hide_credentials: true diff --git a/docker/supabase/postgres/Dockerfile b/docker/supabase/postgres/Dockerfile deleted file mode 100644 index eb9329f..0000000 --- a/docker/supabase/postgres/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -ARG SUPABASE_POSTGRES_VERSION=15.6.1.146 -FROM supabase/postgres:${SUPABASE_POSTGRES_VERSION} -ARG DOCKER_BUILD_DIR=. - -COPY ${DOCKER_BUILD_DIR}/realtime.sql /docker-entrypoint-initdb.d/migrations/99-realtime.sql -COPY ${DOCKER_BUILD_DIR}/webhooks.sql /docker-entrypoint-initdb.d/init-scripts/98-webhooks.sql -COPY ${DOCKER_BUILD_DIR}/roles.sql /docker-entrypoint-initdb.d/init-scripts/99-roles.sql -COPY ${DOCKER_BUILD_DIR}/jwt.sql /docker-entrypoint-initdb.d/init-scripts/99-jwt.sql -COPY ${DOCKER_BUILD_DIR}/_supabase.sql /docker-entrypoint-initdb.d/migrations/97-_supabase.sql -COPY ${DOCKER_BUILD_DIR}/logs.sql /docker-entrypoint-initdb.d/migrations/99-logs.sql -COPY ${DOCKER_BUILD_DIR}/pooler.sql /docker-entrypoint-initdb.d/migrations/99-pooler.sql - -VOLUME /etc/postgresql-custom -VOLUME /var/lib/postgres diff --git a/docker/supabase/postgres/_supabase.sql b/docker/supabase/postgres/_supabase.sql deleted file mode 100644 index 6236ae1..0000000 --- a/docker/supabase/postgres/_supabase.sql +++ /dev/null @@ -1,3 +0,0 @@ -\set pguser `echo "$POSTGRES_USER"` - -CREATE DATABASE _supabase WITH OWNER :pguser; diff --git a/docker/supabase/postgres/jwt.sql b/docker/supabase/postgres/jwt.sql deleted file mode 100644 index cfd3b16..0000000 --- a/docker/supabase/postgres/jwt.sql +++ /dev/null @@ -1,5 +0,0 @@ -\set jwt_secret `echo "$JWT_SECRET"` -\set jwt_exp `echo "$JWT_EXP"` - -ALTER DATABASE postgres SET "app.settings.jwt_secret" TO :'jwt_secret'; -ALTER DATABASE postgres SET "app.settings.jwt_exp" TO :'jwt_exp'; diff --git a/docker/supabase/postgres/logs.sql b/docker/supabase/postgres/logs.sql deleted file mode 100644 index 255c0f4..0000000 --- a/docker/supabase/postgres/logs.sql +++ /dev/null @@ -1,6 +0,0 @@ -\set pguser `echo "$POSTGRES_USER"` - -\c _supabase -create schema if not exists _analytics; -alter schema _analytics owner to :pguser; -\c postgres diff --git a/docker/supabase/postgres/pooler.sql b/docker/supabase/postgres/pooler.sql deleted file mode 100644 index 162c5b9..0000000 --- a/docker/supabase/postgres/pooler.sql +++ /dev/null @@ -1,6 +0,0 @@ -\set pguser `echo "$POSTGRES_USER"` - -\c _supabase -create schema if not exists _supavisor; -alter schema _supavisor owner to :pguser; -\c postgres diff --git a/docker/supabase/postgres/realtime.sql b/docker/supabase/postgres/realtime.sql deleted file mode 100644 index 4d4b9ff..0000000 --- a/docker/supabase/postgres/realtime.sql +++ /dev/null @@ -1,4 +0,0 @@ -\set pguser `echo "$POSTGRES_USER"` - -create schema if not exists _realtime; -alter schema _realtime owner to :pguser; diff --git a/docker/supabase/postgres/roles.sql b/docker/supabase/postgres/roles.sql deleted file mode 100644 index 8f7161a..0000000 --- a/docker/supabase/postgres/roles.sql +++ /dev/null @@ -1,8 +0,0 @@ --- NOTE: change to your own passwords for production environments -\set pgpass `echo "$POSTGRES_PASSWORD"` - -ALTER USER authenticator WITH PASSWORD :'pgpass'; -ALTER USER pgbouncer WITH PASSWORD :'pgpass'; -ALTER USER supabase_auth_admin WITH PASSWORD :'pgpass'; -ALTER USER supabase_functions_admin WITH PASSWORD :'pgpass'; -ALTER USER supabase_storage_admin WITH PASSWORD :'pgpass'; diff --git a/docker/supabase/postgres/webhooks.sql b/docker/supabase/postgres/webhooks.sql deleted file mode 100644 index 5837b86..0000000 --- a/docker/supabase/postgres/webhooks.sql +++ /dev/null @@ -1,208 +0,0 @@ -BEGIN; - -- Create pg_net extension - CREATE EXTENSION IF NOT EXISTS pg_net SCHEMA extensions; - -- Create supabase_functions schema - CREATE SCHEMA supabase_functions AUTHORIZATION supabase_admin; - GRANT USAGE ON SCHEMA supabase_functions TO postgres, anon, authenticated, service_role; - ALTER DEFAULT PRIVILEGES IN SCHEMA supabase_functions GRANT ALL ON TABLES TO postgres, anon, authenticated, service_role; - ALTER DEFAULT PRIVILEGES IN SCHEMA supabase_functions GRANT ALL ON FUNCTIONS TO postgres, anon, authenticated, service_role; - ALTER DEFAULT PRIVILEGES IN SCHEMA supabase_functions GRANT ALL ON SEQUENCES TO postgres, anon, authenticated, service_role; - -- supabase_functions.migrations definition - CREATE TABLE supabase_functions.migrations ( - version text PRIMARY KEY, - inserted_at timestamptz NOT NULL DEFAULT NOW() - ); - -- Initial supabase_functions migration - INSERT INTO supabase_functions.migrations (version) VALUES ('initial'); - -- supabase_functions.hooks definition - CREATE TABLE supabase_functions.hooks ( - id bigserial PRIMARY KEY, - hook_table_id integer NOT NULL, - hook_name text NOT NULL, - created_at timestamptz NOT NULL DEFAULT NOW(), - request_id bigint - ); - CREATE INDEX supabase_functions_hooks_request_id_idx ON supabase_functions.hooks USING btree (request_id); - CREATE INDEX supabase_functions_hooks_h_table_id_h_name_idx ON supabase_functions.hooks USING btree (hook_table_id, hook_name); - COMMENT ON TABLE supabase_functions.hooks IS 'Supabase Functions Hooks: Audit trail for triggered hooks.'; - CREATE FUNCTION supabase_functions.http_request() - RETURNS trigger - LANGUAGE plpgsql - AS $function$ - DECLARE - request_id bigint; - payload jsonb; - url text := TG_ARGV[0]::text; - method text := TG_ARGV[1]::text; - headers jsonb DEFAULT '{}'::jsonb; - params jsonb DEFAULT '{}'::jsonb; - timeout_ms integer DEFAULT 1000; - BEGIN - IF url IS NULL OR url = 'null' THEN - RAISE EXCEPTION 'url argument is missing'; - END IF; - - IF method IS NULL OR method = 'null' THEN - RAISE EXCEPTION 'method argument is missing'; - END IF; - - IF TG_ARGV[2] IS NULL OR TG_ARGV[2] = 'null' THEN - headers = '{"Content-Type": "application/json"}'::jsonb; - ELSE - headers = TG_ARGV[2]::jsonb; - END IF; - - IF TG_ARGV[3] IS NULL OR TG_ARGV[3] = 'null' THEN - params = '{}'::jsonb; - ELSE - params = TG_ARGV[3]::jsonb; - END IF; - - IF TG_ARGV[4] IS NULL OR TG_ARGV[4] = 'null' THEN - timeout_ms = 1000; - ELSE - timeout_ms = TG_ARGV[4]::integer; - END IF; - - CASE - WHEN method = 'GET' THEN - SELECT http_get INTO request_id FROM net.http_get( - url, - params, - headers, - timeout_ms - ); - WHEN method = 'POST' THEN - payload = jsonb_build_object( - 'old_record', OLD, - 'record', NEW, - 'type', TG_OP, - 'table', TG_TABLE_NAME, - 'schema', TG_TABLE_SCHEMA - ); - - SELECT http_post INTO request_id FROM net.http_post( - url, - payload, - params, - headers, - timeout_ms - ); - ELSE - RAISE EXCEPTION 'method argument % is invalid', method; - END CASE; - - INSERT INTO supabase_functions.hooks - (hook_table_id, hook_name, request_id) - VALUES - (TG_RELID, TG_NAME, request_id); - - RETURN NEW; - END - $function$; - -- Supabase super admin - DO - $$ - BEGIN - IF NOT EXISTS ( - SELECT 1 - FROM pg_roles - WHERE rolname = 'supabase_functions_admin' - ) - THEN - CREATE USER supabase_functions_admin NOINHERIT CREATEROLE LOGIN NOREPLICATION; - END IF; - END - $$; - GRANT ALL PRIVILEGES ON SCHEMA supabase_functions TO supabase_functions_admin; - GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA supabase_functions TO supabase_functions_admin; - GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA supabase_functions TO supabase_functions_admin; - ALTER USER supabase_functions_admin SET search_path = "supabase_functions"; - ALTER table "supabase_functions".migrations OWNER TO supabase_functions_admin; - ALTER table "supabase_functions".hooks OWNER TO supabase_functions_admin; - ALTER function "supabase_functions".http_request() OWNER TO supabase_functions_admin; - GRANT supabase_functions_admin TO postgres; - -- Remove unused supabase_pg_net_admin role - DO - $$ - BEGIN - IF EXISTS ( - SELECT 1 - FROM pg_roles - WHERE rolname = 'supabase_pg_net_admin' - ) - THEN - REASSIGN OWNED BY supabase_pg_net_admin TO supabase_admin; - DROP OWNED BY supabase_pg_net_admin; - DROP ROLE supabase_pg_net_admin; - END IF; - END - $$; - -- pg_net grants when extension is already enabled - DO - $$ - BEGIN - IF EXISTS ( - SELECT 1 - FROM pg_extension - WHERE extname = 'pg_net' - ) - THEN - GRANT USAGE ON SCHEMA net TO supabase_functions_admin, postgres, anon, authenticated, service_role; - ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER; - ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER; - ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net; - ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net; - REVOKE ALL ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC; - REVOKE ALL ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC; - GRANT EXECUTE ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role; - GRANT EXECUTE ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role; - END IF; - END - $$; - -- Event trigger for pg_net - CREATE OR REPLACE FUNCTION extensions.grant_pg_net_access() - RETURNS event_trigger - LANGUAGE plpgsql - AS $$ - BEGIN - IF EXISTS ( - SELECT 1 - FROM pg_event_trigger_ddl_commands() AS ev - JOIN pg_extension AS ext - ON ev.objid = ext.oid - WHERE ext.extname = 'pg_net' - ) - THEN - GRANT USAGE ON SCHEMA net TO supabase_functions_admin, postgres, anon, authenticated, service_role; - ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER; - ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER; - ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net; - ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net; - REVOKE ALL ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC; - REVOKE ALL ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC; - GRANT EXECUTE ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role; - GRANT EXECUTE ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role; - END IF; - END; - $$; - COMMENT ON FUNCTION extensions.grant_pg_net_access IS 'Grants access to pg_net'; - DO - $$ - BEGIN - IF NOT EXISTS ( - SELECT 1 - FROM pg_event_trigger - WHERE evtname = 'issue_pg_net_access' - ) THEN - CREATE EVENT TRIGGER issue_pg_net_access ON ddl_command_end WHEN TAG IN ('CREATE EXTENSION') - EXECUTE PROCEDURE extensions.grant_pg_net_access(); - END IF; - END - $$; - INSERT INTO supabase_functions.migrations (version) VALUES ('20210809183423_update_grants'); - ALTER function supabase_functions.http_request() SECURITY DEFINER; - ALTER function supabase_functions.http_request() SET search_path = supabase_functions; - REVOKE ALL ON FUNCTION supabase_functions.http_request() FROM PUBLIC; - GRANT EXECUTE ON FUNCTION supabase_functions.http_request() TO postgres, anon, authenticated, service_role; -COMMIT; diff --git a/docker/supabase/vector/Dockerfile b/docker/supabase/vector/Dockerfile deleted file mode 100644 index 2ca9f85..0000000 --- a/docker/supabase/vector/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -ARG SUPABASE_VECTOR_VERSION=0.28.1-alpine -FROM timberio/vector:${SUPABASE_VECTOR_VERSION} -ARG DOCKER_BUILD_DIR=. - -COPY ${DOCKER_BUILD_DIR}/vector.yml /etc/vector/vector.yml - -VOLUME /etc/vector diff --git a/docker/supabase/vector/vector.yml b/docker/supabase/vector/vector.yml deleted file mode 100644 index cce46df..0000000 --- a/docker/supabase/vector/vector.yml +++ /dev/null @@ -1,232 +0,0 @@ -api: - enabled: true - address: 0.0.0.0:9001 - -sources: - docker_host: - type: docker_logs - exclude_containers: - - supabase-vector - -transforms: - project_logs: - type: remap - inputs: - - docker_host - source: |- - .project = "default" - .event_message = del(.message) - .appname = del(.container_name) - del(.container_created_at) - del(.container_id) - del(.source_type) - del(.stream) - del(.label) - del(.image) - del(.host) - del(.stream) - router: - type: route - inputs: - - project_logs - route: - kong: '.appname == "supabase-kong"' - auth: '.appname == "supabase-auth"' - rest: '.appname == "supabase-rest"' - realtime: '.appname == "supabase-realtime"' - storage: '.appname == "supabase-storage"' - functions: '.appname == "supabase-functions"' - db: '.appname == "supabase-db"' - # Ignores non nginx errors since they are related with kong booting up - kong_logs: - type: remap - inputs: - - router.kong - source: |- - req, err = parse_nginx_log(.event_message, "combined") - if err == null { - .timestamp = req.timestamp - .metadata.request.headers.referer = req.referer - .metadata.request.headers.user_agent = req.agent - .metadata.request.headers.cf_connecting_ip = req.client - .metadata.request.method = req.method - .metadata.request.path = req.path - .metadata.request.protocol = req.protocol - .metadata.response.status_code = req.status - } - if err != null { - abort - } - # Ignores non nginx errors since they are related with kong booting up - kong_err: - type: remap - inputs: - - router.kong - source: |- - .metadata.request.method = "GET" - .metadata.response.status_code = 200 - parsed, err = parse_nginx_log(.event_message, "error") - if err == null { - .timestamp = parsed.timestamp - .severity = parsed.severity - .metadata.request.host = parsed.host - .metadata.request.headers.cf_connecting_ip = parsed.client - url, err = split(parsed.request, " ") - if err == null { - .metadata.request.method = url[0] - .metadata.request.path = url[1] - .metadata.request.protocol = url[2] - } - } - if err != null { - abort - } - # Gotrue logs are structured json strings which frontend parses directly. But we keep metadata for consistency. - auth_logs: - type: remap - inputs: - - router.auth - source: |- - parsed, err = parse_json(.event_message) - if err == null { - .metadata.timestamp = parsed.time - .metadata = merge!(.metadata, parsed) - } - # PostgREST logs are structured so we separate timestamp from message using regex - rest_logs: - type: remap - inputs: - - router.rest - source: |- - parsed, err = parse_regex(.event_message, r'^(?P