├── .github ├── dependabot.yaml └── workflows │ └── test_and_publish.yml ├── README.md ├── cron └── Dockerfile ├── mailhog └── Dockerfile ├── mariadb ├── Dockerfile ├── ee.cnf └── my.cnf ├── newrelic-daemon └── Dockerfile ├── nginx-proxy ├── Dockerfile ├── docker-entrypoint.sh ├── nginx.conf ├── nginx.tmpl └── version.conf ├── nginx ├── Dockerfile ├── bashrc └── conf │ ├── fastcgi_params │ ├── mime.types │ └── nginx.conf ├── php ├── 5.6 │ ├── Dockerfile │ ├── bashrc │ ├── docker-entrypoint.sh │ ├── easyengine.conf │ ├── expose_off.ini │ └── php.ini ├── 7.0 │ ├── Dockerfile │ ├── bashrc │ ├── docker-entrypoint.sh │ ├── easyengine.conf │ ├── expose_off.ini │ └── newrelic.ini ├── 7.2 │ ├── Dockerfile │ ├── bashrc │ ├── docker-entrypoint.sh │ ├── easyengine.conf │ ├── expose_off.ini │ ├── newrelic.ini │ └── php.ini ├── 7.3 │ ├── Dockerfile │ ├── bashrc │ ├── docker-entrypoint.sh │ ├── easyengine.conf │ ├── expose_off.ini │ ├── newrelic.ini │ └── php.ini ├── 7.4 │ ├── Dockerfile │ ├── bashrc │ ├── docker-entrypoint.sh │ ├── easyengine.conf │ ├── expose_off.ini │ ├── newrelic.ini │ └── php.ini ├── 8.0 │ ├── Dockerfile │ ├── bashrc │ ├── docker-entrypoint.sh │ ├── easyengine.conf │ ├── expose_off.ini │ ├── newrelic.ini │ └── php.ini ├── 8.1 │ ├── Dockerfile │ ├── bashrc │ ├── docker-entrypoint.sh │ ├── easyengine.conf │ ├── expose_off.ini │ ├── newrelic.ini │ └── php.ini ├── 8.2 │ ├── Dockerfile │ ├── bashrc │ ├── docker-entrypoint.sh │ ├── easyengine.conf │ ├── expose_off.ini │ ├── newrelic.ini │ └── php.ini ├── 8.3 │ ├── Dockerfile │ ├── bashrc │ ├── docker-entrypoint.sh │ ├── easyengine.conf │ ├── expose_off.ini │ ├── newrelic.ini │ └── php.ini ├── 8.4 │ ├── Dockerfile │ ├── bashrc │ ├── docker-entrypoint.sh │ ├── easyengine.conf │ ├── expose_off.ini │ ├── newrelic.ini │ └── php.ini └── stable │ ├── Dockerfile │ ├── bashrc │ ├── docker-entrypoint.sh │ ├── easyengine.conf │ ├── expose_off.ini │ ├── newrelic.ini │ └── php.ini ├── postfix └── Dockerfile └── redis ├── Dockerfile ├── purge_all_cache.lua └── redis.conf /.github/dependabot.yaml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "github-actions" 9 | directory: "/" # Location of package manifests 10 | schedule: 11 | interval: "weekly" 12 | reviewers: 13 | - mrrobot47 14 | 15 | - package-ecosystem: "docker" 16 | directory: "/cron" 17 | schedule: 18 | interval: "weekly" 19 | reviewers: 20 | - mrrobot47 21 | 22 | - package-ecosystem: "docker" 23 | directory: "/mailhog" 24 | schedule: 25 | interval: "weekly" 26 | reviewers: 27 | - mrrobot47 28 | 29 | - package-ecosystem: "docker" 30 | directory: "/mariadb" 31 | schedule: 32 | interval: "weekly" 33 | reviewers: 34 | - mrrobot47 35 | 36 | - package-ecosystem: "docker" 37 | directory: "/newrelic-daemon" 38 | schedule: 39 | interval: "weekly" 40 | reviewers: 41 | - mrrobot47 42 | 43 | - package-ecosystem: "docker" 44 | directory: "/nginx" 45 | schedule: 46 | interval: "weekly" 47 | reviewers: 48 | - mrrobot47 49 | 50 | - package-ecosystem: "docker" 51 | directory: "/nginx-proxy" 52 | schedule: 53 | interval: "weekly" 54 | reviewers: 55 | - mrrobot47 56 | 57 | 58 | - package-ecosystem: "docker" 59 | directory: "/php/7.4" 60 | ignore: 61 | - dependency-name: "php" 62 | update-types: ["version-update:semver-major", "version-update:semver-minor"] 63 | schedule: 64 | interval: "weekly" 65 | reviewers: 66 | - mrrobot47 67 | 68 | - package-ecosystem: "docker" 69 | directory: "/php/8.0" 70 | ignore: 71 | - dependency-name: "php" 72 | update-types: ["version-update:semver-major", "version-update:semver-minor"] 73 | schedule: 74 | interval: "weekly" 75 | reviewers: 76 | - mrrobot47 77 | 78 | - package-ecosystem: "docker" 79 | directory: "/php/8.1" 80 | ignore: 81 | - dependency-name: "php" 82 | update-types: ["version-update:semver-major", "version-update:semver-minor"] 83 | schedule: 84 | interval: "weekly" 85 | reviewers: 86 | - mrrobot47 87 | 88 | - package-ecosystem: "docker" 89 | directory: "/php/8.2" 90 | ignore: 91 | - dependency-name: "php" 92 | update-types: ["version-update:semver-major", "version-update:semver-minor"] 93 | schedule: 94 | interval: "weekly" 95 | reviewers: 96 | - mrrobot47 97 | 98 | - package-ecosystem: "docker" 99 | directory: "/php/8.3" 100 | ignore: 101 | - dependency-name: "php" 102 | update-types: ["version-update:semver-major", "version-update:semver-minor"] 103 | schedule: 104 | interval: "weekly" 105 | reviewers: 106 | - mrrobot47 107 | 108 | - package-ecosystem: "docker" 109 | directory: "/php/stable" 110 | ignore: 111 | - dependency-name: "php" 112 | update-types: [ "version-update:semver-major", "version-update:semver-minor" ] 113 | schedule: 114 | interval: "weekly" 115 | reviewers: 116 | - mrrobot47 117 | 118 | - package-ecosystem: "docker" 119 | directory: "/postfix" 120 | schedule: 121 | interval: "weekly" 122 | reviewers: 123 | - mrrobot47 124 | 125 | - package-ecosystem: "docker" 126 | directory: "/redis" 127 | schedule: 128 | interval: "weekly" 129 | reviewers: 130 | - mrrobot47 131 | -------------------------------------------------------------------------------- /.github/workflows/test_and_publish.yml: -------------------------------------------------------------------------------- 1 | # # 2 | # # This action will publish EasyEngine docker image. 3 | # # This is set to publish images when tags are created, 4 | # # and test them by just building them on PR. 5 | # # 6 | 7 | name: Test & Publish EE docker images 8 | on: 9 | pull_request: 10 | push: 11 | tags: 12 | - v* 13 | 14 | jobs: 15 | 16 | php: #---------------------------------------------------------------------- 17 | 18 | runs-on: ubuntu-latest 19 | name: Build and push PHP ${{ matrix.php }} 20 | strategy: 21 | fail-fast: false 22 | matrix: 23 | php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] 24 | steps: 25 | - name: Checkout 26 | uses: actions/checkout@v4 27 | 28 | - name: Set up QEMU 29 | uses: docker/setup-qemu-action@v3 30 | 31 | - name: Set up Docker Buildx 32 | uses: docker/setup-buildx-action@v3 33 | 34 | - name: Get tag 35 | id: tag 36 | run: echo "tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT 37 | 38 | - name: Img tag 39 | id: img-tag 40 | run: | 41 | PHP=${{ matrix.php }} 42 | echo "tag=${PHP/stable/}" >> $GITHUB_OUTPUT 43 | 44 | - name: Login to DockerHub 45 | uses: docker/login-action@v3 46 | if: github.event_name != 'pull_request' 47 | with: 48 | username: ${{ secrets.DOCKERHUB_USERNAME }} 49 | password: ${{ secrets.DOCKERHUB_TOKEN }} 50 | 51 | - name: Build PHP - ${{ matrix.php }} image 52 | uses: docker/build-push-action@v6 53 | if: github.event_name == 'pull_request' 54 | with: 55 | context: php/${{ matrix.php }} 56 | tags: easyengine/php${{ steps.img-tag.outputs.tag }}:test 57 | 58 | - name: Build and push PHP - ${{ matrix.php }} image 59 | uses: docker/build-push-action@v6 60 | if: github.event_name != 'pull_request' 61 | with: 62 | context: php/${{ matrix.php }} 63 | push: true 64 | tags: easyengine/php${{ steps.img-tag.outputs.tag }}:${{ steps.tag.outputs.tag }} 65 | 66 | other-images: #---------------------------------------------------------------------- 67 | 68 | runs-on: ubuntu-latest 69 | name: Build and push ${{ matrix.others }} 70 | strategy: 71 | fail-fast: false 72 | matrix: 73 | others: ['nginx', 'nginx-proxy', 'postfix', 'redis', 'cron', 'mailhog', 'mariadb', 'newrelic-daemon'] 74 | steps: 75 | - name: Checkout 76 | uses: actions/checkout@v4 77 | 78 | - name: Set up QEMU 79 | uses: docker/setup-qemu-action@v3 80 | 81 | - name: Set up Docker Buildx 82 | uses: docker/setup-buildx-action@v3 83 | 84 | - name: Get tag 85 | id: tag 86 | run: echo "tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT 87 | 88 | - name: Login to DockerHub 89 | uses: docker/login-action@v3 90 | if: github.event_name != 'pull_request' 91 | with: 92 | username: ${{ secrets.DOCKERHUB_USERNAME }} 93 | password: ${{ secrets.DOCKERHUB_TOKEN }} 94 | 95 | - name: Build ${{ matrix.others }} image 96 | uses: docker/build-push-action@v6 97 | if: github.event_name == 'pull_request' 98 | with: 99 | context: ${{ matrix.others }} 100 | tags: easyengine/${{ matrix.others }}:test 101 | 102 | - name: Build and push ${{ matrix.others }} image 103 | uses: docker/build-push-action@v6 104 | if: github.event_name != 'pull_request' 105 | with: 106 | context: ${{ matrix.others }} 107 | push: true 108 | tags: easyengine/${{ matrix.others }}:${{ steps.tag.outputs.tag }} 109 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Dockerfile 2 | 3 | These are various Dockerfiles in use by EasyEngine. 4 | 5 | Build status: 6 | 7 | | DockerHub Image| Build Status | 8 | | -------------- |:-------------:| 9 | | [nginx-proxy](https://hub.docker.com/r/easyengine/nginx-proxy/) | [![Docker Build Status](https://img.shields.io/docker/build/easyengine/nginx-proxy.svg)]() | 10 | | [nginx](https://hub.docker.com/r/easyengine/nginx/) | [![Docker Build Status](https://img.shields.io/docker/build/easyengine/nginx.svg)]() | 11 | | [php](https://hub.docker.com/r/easyengine/php/) | [![Docker Build Status](https://img.shields.io/docker/build/easyengine/php.svg)]() | 12 | | [redis](https://hub.docker.com/r/easyengine/redis/) | [![Docker Build Status](https://img.shields.io/docker/build/easyengine/redis.svg)]() | 13 | | [mail](https://hub.docker.com/r/easyengine/mail/) | [![Docker Build Status](https://img.shields.io/docker/build/easyengine/mail.svg)]() | 14 | | [mariadb](https://hub.docker.com/r/easyengine/mariadb/) | [![Docker Build Status](https://img.shields.io/docker/build/easyengine/mariadb.svg)]() | 15 | | [phpmyadmin](https://hub.docker.com/r/easyengine/phpmyadmin/) | [![Docker Build Status](https://img.shields.io/docker/build/easyengine/phpmyadmin.svg)]() | 16 | | [base](https://hub.docker.com/r/easyengine/base/) | [![Docker Build Status](https://img.shields.io/docker/build/easyengine/base.svg)]() | 17 | -------------------------------------------------------------------------------- /cron/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcuadros/ofelia:0.3.17 2 | LABEL org.label-schema.schema-version="1.0.0-rc1" 3 | LABEL org.label-schema.vendor="EasyEngine" 4 | LABEL org.label-schema.name="cron" 5 | -------------------------------------------------------------------------------- /mailhog/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mailhog/mailhog:v1.0.1 2 | LABEL org.label-schema.schema-version="1.0.0" 3 | LABEL org.label-schema.vendor="EasyEngine" 4 | LABEL org.label-schema.name="mailhog" 5 | -------------------------------------------------------------------------------- /mariadb/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mariadb:11.5 2 | LABEL org.label-schema.schema-version="1.0.0" 3 | LABEL org.label-schema.vendor="EasyEngine" 4 | LABEL org.label-schema.name="db" 5 | 6 | RUN rm /etc/mysql/my.cnf && rm /etc/mysql/mariadb.cnf 7 | COPY ee.cnf /etc/mysql/conf.d/ee.cnf 8 | COPY my.cnf /etc/mysql/ 9 | -------------------------------------------------------------------------------- /mariadb/ee.cnf: -------------------------------------------------------------------------------- 1 | [mysqld] 2 | log_bin = /var/log/mysql/mariadb-bin 3 | log_bin_index = /var/log/mysql/mariadb-bin.index 4 | binlog_format = statement 5 | # not fab for performance, but safer 6 | #sync_binlog = 1 7 | expire_logs_days = 10 8 | max_binlog_size = 100M 9 | -------------------------------------------------------------------------------- /mariadb/my.cnf: -------------------------------------------------------------------------------- 1 | # The MariaDB configuration file 2 | # 3 | # The MariaDB/MySQL tools read configuration files in the following order: 4 | # 1. "/etc/mysql/my.cnf" (this file) to set global defaults, 5 | # 2. "/etc/mysql/conf.d/*.cnf" to set global options. 6 | # 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options. 7 | # 4. "~/.my.cnf" to set user-specific options. 8 | # 9 | # If the same option is defined multiple times, the last one will apply. 10 | # 11 | # One can use all long options that the program supports. 12 | # Run program with --help to get a list of available options and with 13 | # --print-defaults to see which it would actually understand and use. 14 | 15 | # 16 | # This group is read both by the client and the server 17 | # use it for options that affect everything 18 | # 19 | [client-server] 20 | 21 | socket = /run/mysqld/mysqld.sock 22 | port = 3306 23 | 24 | # 25 | # This group is read by the client library 26 | # Use it for options that affect all clients, but not the server 27 | # 28 | 29 | [client] 30 | # Default is Latin1, if you need UTF-8 set this (also in server section) 31 | default-character-set = utf8mb4 32 | 33 | # Example of client certificate usage 34 | # ssl-cert=/etc/mysql/client-cert.pem 35 | # ssl-key=/etc/mysql/client-key.pem 36 | # 37 | # Allow only TLS encrypted connections 38 | # ssl-verify-server-cert=on 39 | 40 | # This group is *never* read by mysql client library, though this 41 | # /etc/mysql/mariadb.cnf.d/client.cnf file is not read by Oracle MySQL 42 | # client anyway. 43 | # If you use the same .cnf file for MySQL and MariaDB, 44 | # use it for MariaDB-only client options 45 | [client-mariadb] 46 | 47 | # 48 | # These groups are read by MariaDB command-line tools 49 | # Use it for options that affect only one utility 50 | # 51 | 52 | [mysql] 53 | 54 | [mysql_upgrade] 55 | 56 | [mysqladmin] 57 | 58 | [mysqlbinlog] 59 | 60 | [mysqlcheck] 61 | 62 | [mysqldump] 63 | quick 64 | quote-names 65 | max_allowed_packet = 16M 66 | 67 | [mysqlimport] 68 | 69 | [mysqlshow] 70 | 71 | [mysqlslap] 72 | 73 | # NOTE: THIS FILE IS READ ONLY BY THE TRADITIONAL SYSV INIT SCRIPT, NOT SYSTEMD. 74 | # MARIADB SYSTEMD DOES _NOT_ UTILIZE MYSQLD_SAFE NOR READ THIS FILE. 75 | # 76 | # For similar behavior, systemd users should create the following file: 77 | # /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf 78 | # 79 | # To achieve the same result as the default 50-mysqld_safe.cnf, please create 80 | # /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf 81 | # with the following contents: 82 | # 83 | # [Service] 84 | # User=mysql 85 | # StandardOutput=syslog 86 | # StandardError=syslog 87 | # SyslogFacility=daemon 88 | # SyslogLevel=err 89 | # SyslogIdentifier=mysqld 90 | # 91 | # For more information, please read https://mariadb.com/kb/en/mariadb/systemd/ 92 | 93 | [mysqld_safe] 94 | # This will be passed to all mysql clients 95 | # It has been reported that passwords should be enclosed with ticks/quotes 96 | # especially if they contain "#" chars... 97 | socket = /var/run/mysqld/mysqld.sock 98 | nice = 0 99 | skip_log_error 100 | syslog 101 | 102 | # 103 | # These groups are read by MariaDB server. 104 | # Use it for options that only the server (but not clients) should see 105 | 106 | # this is read by the standalone daemon and embedded servers 107 | [server] 108 | 109 | # this is only for the mysqld standalone daemon 110 | [mysqld] 111 | 112 | # 113 | # * Basic Settings 114 | # 115 | 116 | #user = mysql 117 | pid-file = /run/mysqld/mysqld.pid 118 | socket = /var/run/mysqld/mysqld.sock 119 | port = 3306 120 | basedir = /usr 121 | datadir = /var/lib/mysql 122 | tmpdir = /tmp 123 | lc-messages-dir = /usr/share/mysql 124 | lc-messages = en_US 125 | skip-external-locking 126 | 127 | # Broken reverse DNS slows down connections considerably and name resolve is 128 | # safe to skip if there are no "host by domain name" access grants 129 | #skip-name-resolve 130 | 131 | # 132 | # Instead of skip-networking the default is now to listen only on 133 | # localhost which is more compatible and is not less secure. 134 | #bind-address = 127.0.0.1 135 | # 136 | # * Fine Tuning 137 | # 138 | max_connections = 151 139 | connect_timeout = 5 140 | wait_timeout = 600 141 | max_allowed_packet = 16M 142 | thread_cache_size = 128 143 | # join_buffer_size = 1MB 144 | sort_buffer_size = 4M 145 | bulk_insert_buffer_size = 16M 146 | tmp_table_size = 128M 147 | max_heap_table_size = 128M 148 | # 149 | # * MyISAM 150 | # 151 | # This replaces the startup script and checks MyISAM tables if needed 152 | # the first time they are touched. On error, make copy and try a repair. 153 | myisam_recover_options = BACKUP 154 | key_buffer_size = 128M 155 | #open-files-limit = 2000 156 | table_open_cache = 400 157 | myisam_sort_buffer_size = 512M 158 | concurrent_insert = 2 159 | read_buffer_size = 2M 160 | read_rnd_buffer_size = 1M 161 | # 162 | # * Query Cache Configuration 163 | # 164 | # Cache only tiny result sets, so we can fit more in the query cache. 165 | query_cache_limit = 128K 166 | query_cache_size = 128M 167 | # for more write intensive setups, set to DEMAND or OFF 168 | #query_cache_type = DEMAND 169 | 170 | # 171 | # * Logging and Replication 172 | # 173 | 174 | # Both location gets rotated by the cronjob. 175 | # Be aware that this log type is a performance killer. 176 | # Recommend only changing this at runtime for short testing periods if needed! 177 | #general_log_file = /var/log/mysql/mysql.log 178 | #general_log = 1 179 | 180 | # When running under systemd, error logging goes via stdout/stderr to journald 181 | # and when running legacy init error logging goes to syslog due to 182 | # /etc/mysql/conf.d/mariadb.conf.d/50-mysqld_safe.cnf 183 | # Enable this if you want to have error logging into a separate file 184 | # we do want to know about network errors and such 185 | #log_warnings = 2 186 | #log_error = /var/log/mysql/error.log 187 | # Enable the slow query log to see queries with especially long duration 188 | #slow_query_log[={0|1}] 189 | slow_query_log_file = /var/log/mysql/mariadb-slow.log 190 | long_query_time = 10 191 | #log_slow_rate_limit = 1000 192 | #log_slow_verbosity = query_plan,explain 193 | #log-queries-not-using-indexes 194 | #log_slow_admin_statements 195 | #min_examined_row_limit = 1000 196 | 197 | # The following can be used as easy to replay backup logs or for replication. 198 | # note: if you are setting up a replication slave, see README.Debian about 199 | # other settings you may need to change. 200 | #server-id = 1 201 | #log_bin = /var/log/mysql/mysql-bin.log 202 | expire_logs_days = 10 203 | #max_binlog_size = 100M 204 | 205 | # 206 | # If applications support it, this stricter sql_mode prevents some 207 | # mistakes like inserting invalid dates etc. 208 | #sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL 209 | 210 | # 211 | # * InnoDB 212 | # 213 | 214 | # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. 215 | # Read the manual for more InnoDB related options. There are many! 216 | # Most important is to give InnoDB 80 % of the system RAM for buffer use: 217 | # https://mariadb.com/kb/en/innodb-system-variables/#innodb_buffer_pool_size 218 | 219 | default_storage_engine = InnoDB 220 | # you can't just change log file size, requires special procedure 221 | #innodb_log_file_size = 50M 222 | innodb_buffer_pool_size = 512M 223 | innodb_log_buffer_size = 8M 224 | innodb_file_per_table = 1 225 | innodb_open_files = 400 226 | innodb_io_capacity = 400 227 | innodb_flush_method = O_DIRECT 228 | 229 | # 230 | # * SSL/TLS 231 | # 232 | 233 | # For documentation, please read 234 | # https://mariadb.com/kb/en/securing-connections-for-client-and-server/ 235 | #ssl-ca = /etc/mysql/cacert.pem 236 | #ssl-cert = /etc/mysql/server-cert.pem 237 | #ssl-key = /etc/mysql/server-key.pem 238 | 239 | # 240 | # * Character sets 241 | # 242 | 243 | # MySQL/MariaDB default is Latin1, but in Debian we rather default to the full 244 | # utf8 4-byte character set. See also client.cnf 245 | character-set-server = utf8mb4 246 | collation-server = utf8mb4_unicode_ci 247 | 248 | # this is only for embedded server 249 | [embedded] 250 | 251 | # This group is only read by MariaDB servers, not by MySQL. 252 | # If you use the same .cnf file for MySQL and MariaDB, 253 | # you can put MariaDB-only options here 254 | [mariadb] 255 | 256 | # This group is only read by MariaDB-10.5 servers. 257 | # If you use the same .cnf file for MariaDB of different versions, 258 | # use this group for options that older servers don't understand 259 | [mariadb-10.10] 260 | # 261 | # * Galera-related settings 262 | # 263 | # See the examples of server wsrep.cnf files in /usr/share/mysql 264 | 265 | [galera] 266 | # Mandatory settings 267 | #wsrep_on=ON 268 | #wsrep_provider= 269 | #wsrep_cluster_address= 270 | #binlog_format=row 271 | #default_storage_engine=InnoDB 272 | #innodb_autoinc_lock_mode=2 273 | 274 | # Allow server to accept connections on all interfaces. 275 | #bind-address=0.0.0.0 276 | 277 | # Optional settings 278 | #wsrep_slave_threads=1 279 | #innodb_flush_log_at_trx_commit=0 280 | 281 | [isamchk] 282 | key_buffer = 16M 283 | 284 | # 285 | # * IMPORTANT: Additional settings that can override those from this file! 286 | # The files must end with '.cnf', otherwise they'll be ignored. 287 | # 288 | !includedir /etc/mysql/conf.d/ 289 | !includedir /etc/mysql/mariadb.conf.d/ 290 | -------------------------------------------------------------------------------- /newrelic-daemon/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.21.3 2 | 3 | LABEL maintainer="Riddhesh Sanghvi " 4 | LABEL org.label-schema.schema-version="1.0.0" 5 | LABEL org.label-schema.vendor="EasyEngine" 6 | LABEL org.label-schema.name="newrelic-daemon" 7 | 8 | ENV NR_PORT=/run/newrelic/newrelic.sock 9 | 10 | RUN set -ex; \ 11 | apk --no-cache add curl; \ 12 | export NR_FILE_URL="https://download.newrelic.com$(curl -s https://download.newrelic.com/php_agent/release/ | grep 'linux-musl.tar.gz' | sed 's/.*"\(.*\)".*/\1/')"; \ 13 | curl --connect-timeout 10 -o nr.tar.gz -fSL $NR_FILE_URL; \ 14 | tar -xf nr.tar.gz; \ 15 | cp newrelic-php5-*/daemon/newrelic-daemon.x64 /usr/local/bin/newrelic-daemon; \ 16 | mkdir -p /var/log/newrelic /run/newrelic; \ 17 | rm -rf newrelic-php5* nr.tar.gz; 18 | 19 | CMD ["sh", "-c", "/usr/local/bin/newrelic-daemon -f --port ${NR_PORT}"] 20 | -------------------------------------------------------------------------------- /nginx-proxy/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM jwilder/nginx-proxy:1.7.1 2 | LABEL org.label-schema.schema-version="1.0.0" 3 | LABEL org.label-schema.vendor="EasyEngine" 4 | LABEL org.label-schema.name="nginx-proxy" 5 | 6 | COPY nginx.tmpl /app/ 7 | COPY nginx.conf /etc/nginx/nginx.conf 8 | COPY version.conf /version.conf 9 | 10 | RUN apt-get update \ 11 | && apt-get install --no-install-recommends apache2-utils -y && rm -rf /var/lib/apt/lists/* 12 | 13 | RUN chmod +x /app/docker-entrypoint.sh 14 | RUN rm -rf /var/log/nginx/access.log /var/log/nginx/error.log && touch /var/log/nginx/access.log /var/log/nginx/error.log 15 | -------------------------------------------------------------------------------- /nginx-proxy/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | # Warn if the DOCKER_HOST socket does not exist 5 | if [[ $DOCKER_HOST = unix://* ]]; then 6 | socket_file=${DOCKER_HOST#unix://} 7 | if ! [ -S $socket_file ]; then 8 | cat >&2 <<-EOT 9 | ERROR: you need to share your Docker host socket with a volume at $socket_file 10 | Typically you should run your jwilder/nginx-proxy with: \`-v /var/run/docker.sock:$socket_file:ro\` 11 | See the documentation at http://git.io/vZaGJ 12 | EOT 13 | socketMissing=1 14 | fi 15 | fi 16 | 17 | # Generate dhparam file if required 18 | # Note: if $DHPARAM_BITS is not defined, generate-dhparam.sh will use 2048 as a default 19 | /app/generate-dhparam.sh $DHPARAM_BITS 20 | 21 | # Compute the DNS resolvers for use in the templates - if the IP contains ":", it's IPv6 and must be enclosed in [] 22 | export RESOLVERS=$(awk '$1 == "nameserver" {print ($2 ~ ":")? "["$2"]": $2}' ORS=' ' /etc/resolv.conf | sed 's/ *$//g') 23 | if [ "x$RESOLVERS" = "x" ]; then 24 | echo "Warning: unable to determine DNS resolvers for nginx" >&2 25 | unset RESOLVERS 26 | fi 27 | 28 | # If the user has run the default command and the socket doesn't exist, fail 29 | if [ "$socketMissing" = 1 -a "$1" = forego -a "$2" = start -a "$3" = '-r' ]; then 30 | exit 1 31 | fi 32 | 33 | exec "$@" 34 | -------------------------------------------------------------------------------- /nginx-proxy/nginx.conf: -------------------------------------------------------------------------------- 1 | 2 | user nginx; 3 | worker_processes auto; 4 | 5 | pid /var/run/nginx.pid; 6 | 7 | 8 | events { 9 | worker_connections 10240; 10 | } 11 | 12 | 13 | http { 14 | include /etc/nginx/mime.types; 15 | default_type application/octet-stream; 16 | 17 | log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 18 | '$status $body_bytes_sent "$http_referer" ' 19 | '"$http_user_agent" "$http_x_forwarded_for"'; 20 | 21 | access_log /var/log/nginx/access.log main; 22 | error_log /var/log/nginx/error.log warn; 23 | 24 | sendfile on; 25 | #tcp_nopush on; 26 | 27 | keepalive_timeout 65; 28 | 29 | #gzip on; 30 | server_tokens off; 31 | client_max_body_size 100m; 32 | 33 | proxy_buffers 16 16k; 34 | proxy_buffer_size 32k; 35 | 36 | proxy_connect_timeout 300; 37 | proxy_read_timeout 300; 38 | proxy_send_timeout 300; 39 | 40 | include /version.conf; 41 | include /etc/nginx/conf.d/*.conf; 42 | } 43 | -------------------------------------------------------------------------------- /nginx-proxy/nginx.tmpl: -------------------------------------------------------------------------------- 1 | {{ $CurrentContainer := where $ "ID" .Docker.CurrentContainerID | first }} 2 | 3 | {{ define "upstream" }} 4 | {{ if .Address }} 5 | {{/* If we got the containers from swarm and this container's port is published to host, use host IP:PORT */}} 6 | {{ if and .Container.Node.ID .Address.HostPort }} 7 | # {{ .Container.Node.Name }}/{{ .Container.Name }} 8 | server {{ .Container.Node.Address.IP }}:{{ .Address.HostPort }}; 9 | {{/* If there is no swarm node or the port is not published on host, use container's IP:PORT */}} 10 | {{ else if .Network }} 11 | # {{ .Container.Name }} 12 | server {{ .Network.IP }}:{{ .Address.Port }}; 13 | {{ end }} 14 | {{ else if .Network }} 15 | # {{ .Container.Name }} 16 | {{ if .Network.IP }} 17 | server {{ .Network.IP }} down; 18 | {{ else }} 19 | server 127.0.0.1 down; 20 | {{ end }} 21 | {{ end }} 22 | 23 | {{ end }} 24 | 25 | {{ define "location" }} 26 | location {{ .Path }} { 27 | {{ if eq .Proto "uwsgi" }} 28 | include uwsgi_params; 29 | uwsgi_pass {{ trim .Proto }}://{{ trim .Upstream }}; 30 | {{ else if eq .Proto "fastcgi" }} 31 | root {{ trim .Vhostroot }}; 32 | include fastcgi.conf; 33 | fastcgi_pass {{ trim .Upstream }}; 34 | {{ else }} 35 | proxy_pass {{ trim .Proto }}://{{ trim .Upstream }}/; 36 | {{ end }} 37 | 38 | {{ if eq .Path "/ee-admin/mailhog/" }} 39 | {{ if (exists (printf "/etc/nginx/htpasswd/default_admin_tools")) }} 40 | auth_basic "Restricted {{ .Host }} Mailhog"; 41 | auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/default_admin_tools") }}; 42 | {{ if (exists (printf "/etc/nginx/vhost.d/%s_acl" .Host)) }} 43 | include {{ printf "/etc/nginx/vhost.d/%s_acl" .Host}}; 44 | {{ else if (exists "/etc/nginx/vhost.d/default_acl") }} 45 | include /etc/nginx/vhost.d/default_acl; 46 | {{ end }} 47 | {{ else if (exists "/etc/nginx/htpasswd/default") }} 48 | auth_basic "Restricted {{ .Host }} Mailhog"; 49 | auth_basic_user_file /etc/nginx/htpasswd/default; 50 | {{ if (exists (printf "/etc/nginx/vhost.d/%s_acl" .Host)) }} 51 | include {{ printf "/etc/nginx/vhost.d/%s_acl" .Host}}; 52 | {{ else if (exists "/etc/nginx/vhost.d/default_acl") }} 53 | include /etc/nginx/vhost.d/default_acl; 54 | {{ end }} 55 | {{ end }} 56 | {{ else if (exists (printf "/etc/nginx/htpasswd/%s" .Host)) }} 57 | auth_basic "Restricted {{ .Host }}"; 58 | auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/%s" .Host) }}; 59 | {{ if (exists (printf "/etc/nginx/vhost.d/%s_acl" .Host)) }} 60 | include {{ printf "/etc/nginx/vhost.d/%s_acl" .Host}}; 61 | {{ else if (exists "/etc/nginx/vhost.d/default_acl") }} 62 | include /etc/nginx/vhost.d/default_acl; 63 | {{ end }} 64 | {{ else if (exists "/etc/nginx/htpasswd/default") }} 65 | auth_basic "Restricted {{ .Host }}"; 66 | auth_basic_user_file /etc/nginx/htpasswd/default; 67 | {{ if (exists (printf "/etc/nginx/vhost.d/%s_acl" .Host)) }} 68 | include {{ printf "/etc/nginx/vhost.d/%s_acl" .Host}}; 69 | {{ else if (exists "/etc/nginx/vhost.d/default_acl") }} 70 | include /etc/nginx/vhost.d/default_acl; 71 | {{ end }} 72 | {{ end }} 73 | 74 | {{ if (exists (printf "/etc/nginx/vhost.d/%s_location" .Host)) }} 75 | include {{ printf "/etc/nginx/vhost.d/%s_location" .Host}}; 76 | {{ else if (exists "/etc/nginx/vhost.d/default_location") }} 77 | include /etc/nginx/vhost.d/default_location; 78 | {{ end }} 79 | } 80 | {{ end }} 81 | 82 | {{ define "upstream-definition" }} 83 | {{ $networks := .Networks }} 84 | upstream {{ .Upstream }} { 85 | {{ range $container := .Containers }} 86 | {{ $addrLen := len $container.Addresses }} 87 | {{ range $knownNetwork := $networks }} 88 | {{ range $containerNetwork := $container.Networks }} 89 | {{ if (and (ne $containerNetwork.Name "ingress") (or (eq $knownNetwork.Name $containerNetwork.Name) (eq $knownNetwork.Name "host"))) }} 90 | ## Can be connected with "{{ $containerNetwork.Name }}" network 91 | {{/* If only 1 port exposed, use that */}} 92 | {{ if eq $addrLen 1 }} 93 | {{ $address := index $container.Addresses 0 }} 94 | {{ template "upstream" (dict "Container" $container "Address" $address "Network" $containerNetwork) }} 95 | {{/* If more than one port exposed, use the one matching VIRTUAL_PORT env var, falling back to standard web port 80 */}} 96 | {{ else }} 97 | {{ $port := coalesce $container.Env.VIRTUAL_PORT "80" }} 98 | {{ $address := where $container.Addresses "Port" $port | first }} 99 | {{ template "upstream" (dict "Container" $container "Address" $address "Network" $containerNetwork) }} 100 | {{ end }} 101 | {{ else }} 102 | # Cannot connect to network of this container 103 | server 127.0.0.1 down; 104 | {{ end }} 105 | {{ end }} 106 | {{ end }} 107 | {{ end }} 108 | } 109 | {{ end }} 110 | 111 | # If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the 112 | # scheme used to connect to this server 113 | map $http_x_forwarded_proto $proxy_x_forwarded_proto { 114 | default $http_x_forwarded_proto; 115 | '' $scheme; 116 | } 117 | 118 | # If we receive X-Forwarded-Port, pass it through; otherwise, pass along the 119 | # server port the client connected to 120 | map $http_x_forwarded_port $proxy_x_forwarded_port { 121 | default $http_x_forwarded_port; 122 | '' $server_port; 123 | } 124 | 125 | # If we receive Upgrade, set Connection to "upgrade"; otherwise, delete any 126 | # Connection header that may have been passed to this server 127 | map $http_upgrade $proxy_connection { 128 | default upgrade; 129 | '' close; 130 | } 131 | 132 | # Apply fix for very long server names 133 | server_names_hash_bucket_size 128; 134 | 135 | # Default dhparam 136 | {{ if (exists "/etc/nginx/dhparam/dhparam.pem") }} 137 | ssl_dhparam /etc/nginx/dhparam/dhparam.pem; 138 | {{ end }} 139 | 140 | # Set appropriate X-Forwarded-Ssl header 141 | map $scheme $proxy_x_forwarded_ssl { 142 | default off; 143 | https on; 144 | } 145 | 146 | gzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; 147 | 148 | log_format vhost '$host $remote_addr - $remote_user [$time_local] ' 149 | '"$request" $status $body_bytes_sent ' 150 | '"$http_referer" "$http_user_agent"'; 151 | 152 | {{ if $.Env.RESOLVERS }} 153 | resolver {{ $.Env.RESOLVERS }}; 154 | {{ end }} 155 | 156 | {{ if (exists "/etc/nginx/proxy.conf") }} 157 | include /etc/nginx/proxy.conf; 158 | {{ else }} 159 | # HTTP 1.1 support 160 | proxy_http_version 1.1; 161 | proxy_buffering off; 162 | proxy_set_header Host $http_host; 163 | proxy_set_header Upgrade $http_upgrade; 164 | proxy_set_header Connection $proxy_connection; 165 | proxy_set_header X-Real-IP $remote_addr; 166 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 167 | proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto; 168 | proxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl; 169 | proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port; 170 | proxy_set_header X-Original-URI $request_uri; 171 | 172 | # Mitigate httpoxy attack (see README for details) 173 | proxy_set_header Proxy ""; 174 | 175 | server { 176 | location /elb-status { 177 | access_log off; 178 | return 200; 179 | } 180 | } 181 | 182 | {{ end }} 183 | 184 | {{ $enable_ipv6 := eq (or ($.Env.ENABLE_IPV6) "") "true" }} 185 | server { 186 | server_name _; # This is just an invalid value which will never trigger on a real hostname. 187 | listen 80; 188 | {{ if $enable_ipv6 }} 189 | listen [::]:80; 190 | {{ end }} 191 | return 503; 192 | } 193 | 194 | {{ if (and (exists "/etc/nginx/certs/default.crt") (exists "/etc/nginx/certs/default.key")) }} 195 | server { 196 | server_name _; # This is just an invalid value which will never trigger on a real hostname. 197 | listen 443 ssl; 198 | http2 on; 199 | {{ if $enable_ipv6 }} 200 | listen [::]:443 ssl; 201 | http2 on; 202 | {{ end }} 203 | return 503; 204 | 205 | ssl_session_tickets off; 206 | ssl_certificate /etc/nginx/certs/default.crt; 207 | ssl_certificate_key /etc/nginx/certs/default.key; 208 | } 209 | {{ end }} 210 | 211 | {{ range $host, $containers := groupByMulti $ "Env.VIRTUAL_HOST" "," }} 212 | 213 | {{ $host := trim $host }} 214 | {{ $is_regexp := hasPrefix "~" $host }} 215 | {{ $upstream_name := when $is_regexp (sha1 $host) $host }} 216 | 217 | {{ $paths := groupBy $containers "Env.VIRTUAL_PATH" }} 218 | {{ $nPaths := len $paths }} 219 | 220 | {{ if eq $nPaths 0 }} 221 | # {{ $host }} 222 | {{ template "upstream-definition" (dict "Upstream" $upstream_name "Containers" $containers "Networks" $CurrentContainer.Networks) }} 223 | {{ else }} 224 | {{ range $path, $containers := $paths }} 225 | {{ $sum := sha1 $path }} 226 | {{ $upstream := printf "%s-%s" $upstream_name $sum }} 227 | # {{ $host }}{{ $path }} 228 | {{ template "upstream-definition" (dict "Upstream" $upstream "Containers" $containers "Networks" $CurrentContainer.Networks) }} 229 | {{ end }} 230 | {{ end }} 231 | 232 | {{ $default_host := or ($.Env.DEFAULT_HOST) "" }} 233 | {{ $default_server := index (dict $host "" $default_host "default_server") $host }} 234 | 235 | {{/* Get the VIRTUAL_PROTO defined by containers w/ the same vhost, falling back to "http" */}} 236 | {{ $proto := trim (or (first (groupByKeys $containers "Env.VIRTUAL_PROTO")) "http") }} 237 | 238 | {{/* Get the NETWORK_ACCESS defined by containers w/ the same vhost, falling back to "external" */}} 239 | {{ $network_tag := or (first (groupByKeys $containers "Env.NETWORK_ACCESS")) "external" }} 240 | 241 | {{/* Get the HTTPS_METHOD defined by containers w/ the same vhost, falling back to "redirect" */}} 242 | {{ $https_method := or (first (groupByKeys $containers "Env.HTTPS_METHOD")) "redirect" }} 243 | 244 | {{/* Get the SSL_POLICY defined by containers w/ the same vhost, falling back to "Mozilla-Intermediate" */}} 245 | {{ $ssl_policy := or (first (groupByKeys $containers "Env.SSL_POLICY")) "Mozilla-Modern" }} 246 | 247 | {{/* Get the HSTS defined by containers w/ the same vhost, falling back to "max-age=31536000" */}} 248 | {{ $hsts := or (first (groupByKeys $containers "Env.HSTS")) "max-age=31536000" }} 249 | 250 | {{/* Get the VIRTUAL_ROOT By containers w/ use fastcgi root */}} 251 | {{ $vhost_root := or (first (groupByKeys $containers "Env.VIRTUAL_ROOT")) "/var/www/public" }} 252 | 253 | 254 | {{/* Get the first cert name defined by containers w/ the same vhost */}} 255 | {{ $certName := (first (groupByKeys $containers "Env.CERT_NAME")) }} 256 | 257 | {{/* Get the best matching cert by name for the vhost. */}} 258 | {{ $vhostCert := (closest (dir "/etc/nginx/certs") (printf "%s.crt" $host))}} 259 | 260 | {{/* vhostCert is actually a filename so remove any suffixes since they are added later */}} 261 | {{ $vhostCert := trimSuffix ".crt" $vhostCert }} 262 | {{ $vhostCert := trimSuffix ".key" $vhostCert }} 263 | 264 | {{/* Use the cert specified on the container or fallback to the best vhost match */}} 265 | {{ $cert := (coalesce $certName $vhostCert) }} 266 | 267 | {{ $is_https := (and (ne $https_method "nohttps") (ne $cert "") (exists (printf "/etc/nginx/certs/%s.crt" $cert)) (exists (printf "/etc/nginx/certs/%s.key" $cert))) }} 268 | 269 | {{ if $is_https }} 270 | 271 | {{ if eq $https_method "redirect" }} 272 | server { 273 | server_name {{ $host }}; 274 | listen 80 {{ $default_server }}; 275 | {{ if $enable_ipv6 }} 276 | listen [::]:80 {{ $default_server }}; 277 | {{ end }} 278 | return 301 https://$host$request_uri; 279 | } 280 | {{ end }} 281 | 282 | server { 283 | server_name {{ $host }}; 284 | listen 443 ssl {{ $default_server }}; 285 | http2 on; 286 | {{ if $enable_ipv6 }} 287 | listen [::]:443 ssl {{ $default_server }}; 288 | http2 on; 289 | {{ end }} 290 | 291 | {{ if eq $network_tag "internal" }} 292 | # Only allow traffic from internal clients 293 | include /etc/nginx/network_internal.conf; 294 | {{ end }} 295 | 296 | {{ if eq $ssl_policy "Mozilla-Modern" }} 297 | ssl_protocols TLSv1.2 TLSv1.3; 298 | ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256'; 299 | {{ else if eq $ssl_policy "Mozilla-Intermediate" }} 300 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; 301 | ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:!DSS'; 302 | {{ else if eq $ssl_policy "Mozilla-Old" }} 303 | ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; 304 | ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:DES-CBC3-SHA:HIGH:SEED:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!RSAPSK:!aDH:!aECDH:!EDH-DSS-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!SRP'; 305 | {{ else if eq $ssl_policy "AWS-TLS-1-2-2017-01" }} 306 | ssl_protocols TLSv1.2 TLSv1.3; 307 | ssl_ciphers 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:AES128-GCM-SHA256:AES128-SHA256:AES256-GCM-SHA384:AES256-SHA256'; 308 | {{ else if eq $ssl_policy "AWS-TLS-1-1-2017-01" }} 309 | ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3; 310 | ssl_ciphers 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:AES256-GCM-SHA384:AES256-SHA256:AES256-SHA'; 311 | {{ else if eq $ssl_policy "AWS-2016-08" }} 312 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; 313 | ssl_ciphers 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:AES256-GCM-SHA384:AES256-SHA256:AES256-SHA'; 314 | {{ else if eq $ssl_policy "AWS-2015-05" }} 315 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; 316 | ssl_ciphers 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:AES256-GCM-SHA384:AES256-SHA256:AES256-SHA:DES-CBC3-SHA'; 317 | {{ else if eq $ssl_policy "AWS-2015-03" }} 318 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; 319 | ssl_ciphers 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:AES256-GCM-SHA384:AES256-SHA256:AES256-SHA:DHE-DSS-AES128-SHA:DES-CBC3-SHA'; 320 | {{ else if eq $ssl_policy "AWS-2015-02" }} 321 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; 322 | ssl_ciphers 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:AES256-GCM-SHA384:AES256-SHA256:AES256-SHA:DHE-DSS-AES128-SHA'; 323 | {{ end }} 324 | 325 | ssl_prefer_server_ciphers on; 326 | ssl_session_timeout 5m; 327 | ssl_session_cache shared:SSL:50m; 328 | ssl_session_tickets off; 329 | 330 | ssl_certificate /etc/nginx/certs/{{ (printf "%s.crt" $cert) }}; 331 | ssl_certificate_key /etc/nginx/certs/{{ (printf "%s.key" $cert) }}; 332 | 333 | {{ if (exists (printf "/etc/nginx/certs/%s.dhparam.pem" $cert)) }} 334 | ssl_dhparam {{ printf "/etc/nginx/certs/%s.dhparam.pem" $cert }}; 335 | {{ end }} 336 | 337 | {{ if (exists (printf "/etc/nginx/certs/%s.chain.pem" $cert)) }} 338 | ssl_stapling on; 339 | ssl_stapling_verify on; 340 | ssl_trusted_certificate {{ printf "/etc/nginx/certs/%s.chain.pem" $cert }}; 341 | {{ end }} 342 | 343 | {{ if (and (ne $https_method "noredirect") (ne $hsts "off")) }} 344 | add_header Strict-Transport-Security "{{ trim $hsts }}" always; 345 | {{ end }} 346 | 347 | {{ if (exists (printf "/etc/nginx/vhost.d/%s" $host)) }} 348 | include {{ printf "/etc/nginx/vhost.d/%s" $host }}; 349 | {{ else if (exists "/etc/nginx/vhost.d/default") }} 350 | include /etc/nginx/vhost.d/default; 351 | {{ end }} 352 | 353 | {{ if eq $nPaths 0 }} 354 | {{ template "location" (dict "Path" "/" "Proto" $proto "Upstream" $upstream_name "Host" $host "Vhostroot" $vhost_root) }} 355 | {{ else }} 356 | {{ range $path, $containers := $paths }} 357 | {{ $sum := sha1 $path }} 358 | {{ $upstream := printf "%s-%s" $host $sum }} 359 | {{ template "location" (dict "Path" $path "Proto" $proto "Upstream" $upstream "Host" $host "Vhostroot" $vhost_root) }} 360 | {{ end }} 361 | {{ if (or (exists (printf "/etc/nginx/htpasswd/default_admin_tools")) (exists "/etc/nginx/htpasswd/default")) }} 362 | location /ee-admin/ { 363 | {{ $sum := sha1 "/" }} 364 | proxy_pass http://{{ printf "%s-%s" $host $sum }}; 365 | {{ if (exists (printf "/etc/nginx/htpasswd/default_admin_tools")) }} 366 | auth_basic "Restricted {{ $host }} Admin Tools"; 367 | auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/default_admin_tools") }}; 368 | {{ if (exists (printf "/etc/nginx/vhost.d/%s_acl" $host)) }} 369 | include {{ printf "/etc/nginx/vhost.d/%s_acl" $host}}; 370 | {{ else if (exists "/etc/nginx/vhost.d/default_acl") }} 371 | include /etc/nginx/vhost.d/default_acl; 372 | {{ end }} 373 | {{ else if (exists "/etc/nginx/htpasswd/default") }} 374 | auth_basic "Restricted {{ $host }} Admin Tools"; 375 | auth_basic_user_file "/etc/nginx/htpasswd/default"; 376 | {{ if (exists (printf "/etc/nginx/vhost.d/%s_acl" $host)) }} 377 | include {{ printf "/etc/nginx/vhost.d/%s_acl" $host}}; 378 | {{ else if (exists "/etc/nginx/vhost.d/default_acl") }} 379 | include /etc/nginx/vhost.d/default_acl; 380 | {{ end }} 381 | {{ end }} 382 | } 383 | {{ end }} 384 | {{ end }} 385 | } 386 | 387 | {{ end }} 388 | 389 | {{ if or (not $is_https) (eq $https_method "noredirect") }} 390 | 391 | server { 392 | server_name {{ $host }}; 393 | listen 80 {{ $default_server }}; 394 | {{ if $enable_ipv6 }} 395 | listen [::]:80 {{ $default_server }}; 396 | {{ end }} 397 | 398 | {{ if eq $network_tag "internal" }} 399 | # Only allow traffic from internal clients 400 | include /etc/nginx/network_internal.conf; 401 | {{ end }} 402 | 403 | {{ if (exists (printf "/etc/nginx/vhost.d/%s" $host)) }} 404 | include {{ printf "/etc/nginx/vhost.d/%s" $host }}; 405 | {{ else if (exists "/etc/nginx/vhost.d/default") }} 406 | include /etc/nginx/vhost.d/default; 407 | {{ end }} 408 | 409 | {{ if eq $nPaths 0 }} 410 | {{ template "location" (dict "Path" "/" "Proto" $proto "Upstream" $upstream_name "Host" $host "Vhostroot" $vhost_root) }} 411 | {{ else }} 412 | {{ range $path, $containers := $paths }} 413 | {{ $sum := sha1 $path }} 414 | {{ $upstream := printf "%s-%s" $upstream_name $sum }} 415 | {{ template "location" (dict "Path" $path "Proto" $proto "Upstream" $upstream "Host" $host "Vhostroot" $vhost_root) }} 416 | {{ end }} 417 | {{ if (or (exists (printf "/etc/nginx/htpasswd/default_admin_tools")) (exists "/etc/nginx/htpasswd/default")) }} 418 | location /ee-admin/ { 419 | {{ $sum := sha1 "/" }} 420 | proxy_pass http://{{ printf "%s-%s" $host $sum }}; 421 | {{ if (exists (printf "/etc/nginx/htpasswd/default_admin_tools")) }} 422 | auth_basic "Restricted {{ $host }} Admin Tools"; 423 | auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/default_admin_tools") }}; 424 | {{ if (exists (printf "/etc/nginx/vhost.d/%s_acl" $host)) }} 425 | include {{ printf "/etc/nginx/vhost.d/%s_acl" $host}}; 426 | {{ else if (exists "/etc/nginx/vhost.d/default_acl") }} 427 | include /etc/nginx/vhost.d/default_acl; 428 | {{ end }} 429 | {{ else if (exists "/etc/nginx/htpasswd/default") }} 430 | auth_basic "Restricted {{ $host }} Admin Tools"; 431 | auth_basic_user_file "/etc/nginx/htpasswd/default"; 432 | {{ if (exists (printf "/etc/nginx/vhost.d/%s_acl" $host)) }} 433 | include {{ printf "/etc/nginx/vhost.d/%s_acl" $host}}; 434 | {{ else if (exists "/etc/nginx/vhost.d/default_acl") }} 435 | include /etc/nginx/vhost.d/default_acl; 436 | {{ end }} 437 | {{ end }} 438 | } 439 | {{ end }} 440 | {{ end }} 441 | } 442 | 443 | {{ if (and (not $is_https) (exists "/etc/nginx/certs/default.crt") (exists "/etc/nginx/certs/default.key")) }} 444 | server { 445 | server_name {{ $host }}; 446 | listen 443 ssl {{ $default_server }}; 447 | http2 on; 448 | {{ if $enable_ipv6 }} 449 | listen [::]:443 ssl {{ $default_server }}; 450 | http2 on; 451 | {{ end }} 452 | return 500; 453 | 454 | ssl_certificate /etc/nginx/certs/default.crt; 455 | ssl_certificate_key /etc/nginx/certs/default.key; 456 | } 457 | {{ end }} 458 | 459 | {{ end }} 460 | {{ end }} 461 | -------------------------------------------------------------------------------- /nginx-proxy/version.conf: -------------------------------------------------------------------------------- 1 | add_header X-Powered-By "EasyEngine v4"; -------------------------------------------------------------------------------- /nginx/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openresty/openresty:1.27.1.1-buster 2 | LABEL org.label-schema.schema-version="1.0.0" 3 | LABEL org.label-schema.vendor="EasyEngine" 4 | LABEL org.label-schema.name="nginx" 5 | 6 | # Copy EasyEngine nginx configuration files 7 | RUN mkdir -p /var/log/nginx; \ 8 | mkdir -p /usr/local/openresty/nginx/conf/conf.d 9 | COPY conf /usr/local/openresty/nginx/conf 10 | COPY bashrc /root/.bashrc 11 | WORKDIR /var/www/htdocs 12 | EXPOSE 80 13 | -------------------------------------------------------------------------------- /nginx/bashrc: -------------------------------------------------------------------------------- 1 | PS1="\`if [ \$? = 0 ]; then echo \[\e[37m\]^_^[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; else echo \[\e[31m\]O_O[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; fi\`" 2 | export HISTTIMEFORMAT="%d/%m/%y %T " -------------------------------------------------------------------------------- /nginx/conf/fastcgi_params: -------------------------------------------------------------------------------- 1 | 2 | fastcgi_param QUERY_STRING $query_string; 3 | fastcgi_param REQUEST_METHOD $request_method; 4 | fastcgi_param CONTENT_TYPE $content_type; 5 | fastcgi_param CONTENT_LENGTH $content_length; 6 | 7 | fastcgi_param SCRIPT_FILENAME $request_filename; 8 | fastcgi_param SCRIPT_NAME $fastcgi_script_name; 9 | fastcgi_param REQUEST_URI $request_uri; 10 | fastcgi_param DOCUMENT_URI $document_uri; 11 | fastcgi_param DOCUMENT_ROOT $document_root; 12 | fastcgi_param SERVER_PROTOCOL $server_protocol; 13 | fastcgi_param HTTPS $https if_not_empty; 14 | 15 | fastcgi_param GATEWAY_INTERFACE CGI/1.1; 16 | fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; 17 | 18 | fastcgi_param REMOTE_ADDR $remote_addr; 19 | fastcgi_param REMOTE_PORT $remote_port; 20 | fastcgi_param SERVER_ADDR $server_addr; 21 | fastcgi_param SERVER_PORT $server_port; 22 | fastcgi_param SERVER_NAME $server_name; 23 | 24 | # PHP only, required if PHP was built with --enable-force-cgi-redirect 25 | fastcgi_param REDIRECT_STATUS 200; 26 | 27 | # To fix CGI application vulnerability - https://httpoxy.org 28 | fastcgi_param HTTP_PROXY ""; 29 | 30 | fastcgi_connect_timeout 300; 31 | fastcgi_send_timeout 300; 32 | fastcgi_read_timeout 300; 33 | -------------------------------------------------------------------------------- /nginx/conf/mime.types: -------------------------------------------------------------------------------- 1 | 2 | types { 3 | text/html html htm shtml; 4 | text/css css; 5 | text/xml xml; 6 | image/gif gif; 7 | image/jpeg jpeg jpg; 8 | application/javascript js; 9 | application/atom+xml atom; 10 | application/rss+xml rss; 11 | 12 | text/mathml mml; 13 | text/plain txt; 14 | text/vnd.sun.j2me.app-descriptor jad; 15 | text/vnd.wap.wml wml; 16 | text/x-component htc; 17 | 18 | image/png png; 19 | image/svg+xml svg svgz; 20 | image/tiff tif tiff; 21 | image/vnd.wap.wbmp wbmp; 22 | image/webp webp; 23 | image/x-icon ico; 24 | image/x-jng jng; 25 | image/x-ms-bmp bmp; 26 | 27 | application/font-woff woff; 28 | application/font-woff2 woff2; 29 | application/java-archive jar war ear; 30 | application/json json; 31 | application/mac-binhex40 hqx; 32 | application/msword doc; 33 | application/pdf pdf; 34 | application/postscript ps eps ai; 35 | application/rtf rtf; 36 | application/vnd.apple.mpegurl m3u8; 37 | application/vnd.google-earth.kml+xml kml; 38 | application/vnd.google-earth.kmz kmz; 39 | application/vnd.ms-excel xls; 40 | application/vnd.ms-fontobject eot; 41 | application/vnd.ms-powerpoint ppt; 42 | application/vnd.oasis.opendocument.graphics odg; 43 | application/vnd.oasis.opendocument.presentation odp; 44 | application/vnd.oasis.opendocument.spreadsheet ods; 45 | application/vnd.oasis.opendocument.text odt; 46 | application/vnd.openxmlformats-officedocument.presentationml.presentation 47 | pptx; 48 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 49 | xlsx; 50 | application/vnd.openxmlformats-officedocument.wordprocessingml.document 51 | docx; 52 | application/vnd.wap.wmlc wmlc; 53 | application/x-7z-compressed 7z; 54 | application/x-cocoa cco; 55 | application/x-java-archive-diff jardiff; 56 | application/x-java-jnlp-file jnlp; 57 | application/x-makeself run; 58 | application/x-perl pl pm; 59 | application/x-pilot prc pdb; 60 | application/x-rar-compressed rar; 61 | application/x-redhat-package-manager rpm; 62 | application/x-sea sea; 63 | application/x-shockwave-flash swf; 64 | application/x-stuffit sit; 65 | application/x-tcl tcl tk; 66 | application/x-x509-ca-cert der pem crt; 67 | application/x-xpinstall xpi; 68 | application/xhtml+xml xhtml; 69 | application/xspf+xml xspf; 70 | application/zip zip; 71 | 72 | application/octet-stream bin exe dll; 73 | application/octet-stream deb; 74 | application/octet-stream dmg; 75 | application/octet-stream iso img; 76 | application/octet-stream msi msp msm; 77 | 78 | audio/midi mid midi kar; 79 | audio/mpeg mp3; 80 | audio/ogg ogg; 81 | audio/x-m4a m4a; 82 | audio/x-realaudio ra; 83 | 84 | video/3gpp 3gpp 3gp; 85 | video/mp2t ts; 86 | video/mp4 mp4; 87 | video/mpeg mpeg mpg; 88 | video/quicktime mov; 89 | video/webm webm; 90 | video/x-flv flv; 91 | video/x-m4v m4v; 92 | video/x-mng mng; 93 | video/x-ms-asf asx asf; 94 | video/x-ms-wmv wmv; 95 | video/x-msvideo avi; 96 | } 97 | -------------------------------------------------------------------------------- /nginx/conf/nginx.conf: -------------------------------------------------------------------------------- 1 | user www-data; 2 | worker_processes auto; 3 | worker_rlimit_nofile 100000; 4 | pid /run/nginx.pid; 5 | 6 | events { 7 | worker_connections 10240; 8 | multi_accept on; 9 | } 10 | 11 | http { 12 | ## 13 | # EasyEngine Settings 14 | ## 15 | 16 | sendfile on; 17 | tcp_nopush on; 18 | tcp_nodelay on; 19 | keepalive_timeout 30; 20 | types_hash_max_size 2048; 21 | 22 | server_tokens off; 23 | reset_timedout_connection on; 24 | 25 | # Limit Request 26 | limit_req_status 403; 27 | limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s; 28 | 29 | # Proxy Settings 30 | set_real_ip_from 0.0.0.0/0; 31 | real_ip_header X-Forwarded-For; 32 | 33 | client_max_body_size 100m; 34 | 35 | ## 36 | # SSL Settings 37 | ## 38 | 39 | ssl_session_cache shared:SSL:20m; 40 | ssl_session_timeout 10m; 41 | ssl_prefer_server_ciphers on; 42 | ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"; 43 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; 44 | 45 | ## 46 | # Basic Settings 47 | ## 48 | server_names_hash_bucket_size 4096; 49 | # server_name_in_redirect off; 50 | 51 | include mime.types; 52 | default_type application/octet-stream; 53 | 54 | ## 55 | # Logging Settings 56 | ## 57 | 58 | access_log /var/log/nginx/access.log; 59 | error_log /var/log/nginx/error.log; 60 | 61 | # Log format Settings 62 | log_format rt_cache '$remote_addr $upstream_response_time $upstream_cache_status [$time_local] ' 63 | '$http_host "$request" $status $body_bytes_sent ' 64 | '"$http_referer" "$http_user_agent"'; 65 | 66 | ## 67 | # Gzip Settings 68 | ## 69 | 70 | gzip on; 71 | gzip_disable "msie6"; 72 | 73 | gzip_vary on; 74 | gzip_proxied any; 75 | gzip_comp_level 6; 76 | gzip_buffers 16 8k; 77 | gzip_http_version 1.1; 78 | gzip_types 79 | application/atom+xml 80 | application/javascript 81 | application/json 82 | application/rss+xml 83 | application/vnd.ms-fontobject 84 | application/x-font-ttf 85 | application/x-web-app-manifest+json 86 | application/xhtml+xml 87 | application/xml 88 | font/opentype 89 | image/svg+xml 90 | image/x-icon 91 | text/css 92 | text/plain 93 | text/x-component 94 | text/xml 95 | text/javascript; 96 | 97 | fastcgi_buffers 32 32k; 98 | fastcgi_buffer_size 32k; 99 | 100 | ## 101 | # Openfile Cache 102 | ## 103 | 104 | open_file_cache max=10000 inactive=5m; 105 | open_file_cache_valid 2m; 106 | open_file_cache_min_uses 1; 107 | open_file_cache_errors on; 108 | 109 | include /usr/local/openresty/nginx/conf/conf.d/main.conf; 110 | } 111 | -------------------------------------------------------------------------------- /php/5.6/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5.6-fpm 2 | 3 | LABEL maintainer="Riddhesh Sanghvi , Devarshi Sathiya " 4 | LABEL org.label-schema.schema-version="1.0.0-rc1" 5 | LABEL org.label-schema.vendor="EasyEngine" 6 | LABEL org.label-schema.name="php5.6" 7 | 8 | RUN set -ex; \ 9 | apt-get update; \ 10 | apt-get install -y --no-install-recommends \ 11 | imagemagick \ 12 | less \ 13 | libc-client-dev \ 14 | libfreetype6-dev \ 15 | libjpeg-dev \ 16 | libjpeg62-turbo-dev \ 17 | libkrb5-dev \ 18 | libmagickwand-dev \ 19 | libmcrypt-dev \ 20 | libmemcached-dev \ 21 | libxml2-dev \ 22 | libpng-dev \ 23 | libzip-dev \ 24 | mysql-client \ 25 | ssmtp \ 26 | tmux \ 27 | unzip \ 28 | vim \ 29 | zip 30 | 31 | RUN pecl install imagick memcached-2.2.0; \ 32 | printf "\n" | pecl install mcrypt-1.0.1; \ 33 | printf "\n" | pecl install redis; \ 34 | docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \ 35 | docker-php-ext-configure zip --with-libzip; \ 36 | docker-php-ext-configure --with-php-config=/usr/local/bin/php-config; \ 37 | docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \ 38 | docker-php-ext-install gd imap mysqli opcache soap zip; \ 39 | docker-php-ext-enable imagick mcrypt redis; \ 40 | echo "extension=memcached.so" >> /usr/local/etc/php/conf.d/memcached.ini; \ 41 | apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ 42 | rm -rf /var/lib/apt/lists/*; 43 | 44 | # RUN mkdir -p /usr/src/php/ext; \ 45 | # cd /usr/src/php/ext/; \ 46 | # curl -sSL -o php7.zip https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip; \ 47 | # unzip php7.zip; \ 48 | # mv pecl-memcache-NON_BLOCKING_IO_php7 memcache; \ 49 | # rm -rf /tmp/pecl-memcache-php7 /usr/src/php/ext/php7.zip; \ 50 | # docker-php-ext-configure memcache --with-php-config=/usr/local/bin/php-config; \ 51 | # docker-php-ext-install memcache; 52 | 53 | # set recommended PHP.ini settings 54 | # see https://secure.php.net/manual/en/opcache.installation.php 55 | RUN { \ 56 | echo 'opcache.memory_consumption=128'; \ 57 | echo 'opcache.interned_strings_buffer=8'; \ 58 | echo 'opcache.max_accelerated_files=4000'; \ 59 | echo 'opcache.revalidate_freq=2'; \ 60 | echo 'opcache.fast_shutdown=1'; \ 61 | echo 'opcache.enable_cli=1'; \ 62 | } > /usr/local/etc/php/conf.d/opcache-recommended.ini 63 | 64 | # Donwload and install composer 65 | RUN curl -sSL "https://getcomposer.org/installer" | php \ 66 | && mv composer.phar /usr/local/bin/composer 67 | 68 | # Install wp-cli 69 | RUN curl -O "https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar" \ 70 | && chmod +x wp-cli.phar \ 71 | && mv wp-cli.phar /usr/local/bin/wp 72 | 73 | # Setup a config file 74 | RUN mkdir -p /etc/wp-cli 75 | RUN { \ 76 | echo 'path: /var/www/htdocs'; \ 77 | } > /etc/wp-cli/config.yml 78 | 79 | RUN echo "mailhub=postfix\nUseTLS=NO\nFromLineOverride=YES" > /etc/ssmtp/ssmtp.conf 80 | 81 | RUN mkdir -p /usr/local/etc/misc && \ 82 | touch /usr/local/etc/misc/msmtprc && \ 83 | rm -f /etc/ssmtp/revaliases && \ 84 | ln -s /usr/local/etc/misc/msmtprc /etc/ssmtp/revaliases && \ 85 | chown www-data:www-data /usr/local/etc/misc/msmtprc && \ 86 | chown www-data:www-data /etc/ssmtp/revaliases 87 | 88 | # Setup logs 89 | RUN mkdir -p /var/log/php; \ 90 | chown -R www-data: /var/log/php; \ 91 | rm /usr/local/etc/php-fpm.d/*; \ 92 | mv /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini 93 | COPY easyengine.conf /usr/local/etc/php-fpm.d/easyengine.conf 94 | 95 | COPY expose_off.ini /usr/local/etc/php/conf.d/expose_off.ini 96 | COPY bashrc /root/.bashrc 97 | COPY bashrc /var/www/.bashrc 98 | COPY docker-entrypoint.sh /usr/local/bin/ 99 | 100 | WORKDIR /var/www/htdocs 101 | RUN usermod -s /bin/bash www-data 102 | USER www-data 103 | 104 | ENTRYPOINT ["docker-entrypoint.sh"] 105 | CMD ["php-fpm"] 106 | 107 | -------------------------------------------------------------------------------- /php/5.6/bashrc: -------------------------------------------------------------------------------- 1 | PS1="\`if [ \$? = 0 ]; then echo \[\e[37m\]^_^[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; else echo \[\e[31m\]O_O[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; fi\`" 2 | export HISTTIMEFORMAT="%d/%m/%y %T " -------------------------------------------------------------------------------- /php/5.6/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | exec "$@" 5 | 6 | -------------------------------------------------------------------------------- /php/5.6/easyengine.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | error_log = /var/log/php/error.log 3 | daemonize = no 4 | 5 | [www] 6 | ping.path = /ee-admin/ping 7 | pm.status_path = /ee-admin/status 8 | request_terminate_timeout = 300 9 | user = www-data 10 | group = www-data 11 | pm = ondemand 12 | pm.max_children = 20 13 | listen = 9000 14 | ; if we send this to /proc/self/fd/1, it never appears 15 | access.log = /var/log/php/access.log 16 | 17 | clear_env = no 18 | 19 | ; Ensure worker stdout and stderr are sent to the main error log. 20 | catch_workers_output = yes 21 | -------------------------------------------------------------------------------- /php/5.6/expose_off.ini: -------------------------------------------------------------------------------- 1 | expose_php = Off -------------------------------------------------------------------------------- /php/5.6/php.ini: -------------------------------------------------------------------------------- 1 | [PHP] 2 | 3 | ;;;;;;;;;;;;;;;;;;; 4 | ; About php.ini ; 5 | ;;;;;;;;;;;;;;;;;;; 6 | ; PHP's initialization file, generally called php.ini, is responsible for 7 | ; configuring many of the aspects of PHP's behavior. 8 | 9 | ; PHP attempts to find and load this configuration from a number of locations. 10 | ; The following is a summary of its search order: 11 | ; 1. SAPI module specific location. 12 | ; 2. The PHPRC environment variable. (As of PHP 5.2.0) 13 | ; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0) 14 | ; 4. Current working directory (except CLI) 15 | ; 5. The web server's directory (for SAPI modules), or directory of PHP 16 | ; (otherwise in Windows) 17 | ; 6. The directory from the --with-config-file-path compile time option, or the 18 | ; Windows directory (C:\windows or C:\winnt) 19 | ; See the PHP docs for more specific information. 20 | ; http://php.net/configuration.file 21 | 22 | ; The syntax of the file is extremely simple. Whitespace and lines 23 | ; beginning with a semicolon are silently ignored (as you probably guessed). 24 | ; Section headers (e.g. [Foo]) are also silently ignored, even though 25 | ; they might mean something in the future. 26 | 27 | ; Directives following the section heading [PATH=/www/mysite] only 28 | ; apply to PHP files in the /www/mysite directory. Directives 29 | ; following the section heading [HOST=www.example.com] only apply to 30 | ; PHP files served from www.example.com. Directives set in these 31 | ; special sections cannot be overridden by user-defined INI files or 32 | ; at runtime. Currently, [PATH=] and [HOST=] sections only work under 33 | ; CGI/FastCGI. 34 | ; http://php.net/ini.sections 35 | 36 | ; Directives are specified using the following syntax: 37 | ; directive = value 38 | ; Directive names are *case sensitive* - foo=bar is different from FOO=bar. 39 | ; Directives are variables used to configure PHP or PHP extensions. 40 | ; There is no name validation. If PHP can't find an expected 41 | ; directive because it is not set or is mistyped, a default value will be used. 42 | 43 | ; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one 44 | ; of the INI constants (On, Off, True, False, Yes, No and None) or an expression 45 | ; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a 46 | ; previously set variable or directive (e.g. ${foo}) 47 | 48 | ; Expressions in the INI file are limited to bitwise operators and parentheses: 49 | ; | bitwise OR 50 | ; ^ bitwise XOR 51 | ; & bitwise AND 52 | ; ~ bitwise NOT 53 | ; ! boolean NOT 54 | 55 | ; Boolean flags can be turned on using the values 1, On, True or Yes. 56 | ; They can be turned off using the values 0, Off, False or No. 57 | 58 | ; An empty string can be denoted by simply not writing anything after the equal 59 | ; sign, or by using the None keyword: 60 | 61 | ; foo = ; sets foo to an empty string 62 | ; foo = None ; sets foo to an empty string 63 | ; foo = "None" ; sets foo to the string 'None' 64 | 65 | ; If you use constants in your value, and these constants belong to a 66 | ; dynamically loaded extension (either a PHP extension or a Zend extension), 67 | ; you may only use these constants *after* the line that loads the extension. 68 | 69 | ;;;;;;;;;;;;;;;;;;; 70 | ; About this file ; 71 | ;;;;;;;;;;;;;;;;;;; 72 | ; PHP comes packaged with two INI files. One that is recommended to be used 73 | ; in production environments and one that is recommended to be used in 74 | ; development environments. 75 | 76 | ; php.ini-production contains settings which hold security, performance and 77 | ; best practices at its core. But please be aware, these settings may break 78 | ; compatibility with older or less security conscience applications. We 79 | ; recommending using the production ini in production and testing environments. 80 | 81 | ; php.ini-development is very similar to its production variant, except it is 82 | ; much more verbose when it comes to errors. We recommend using the 83 | ; development version only in development environments, as errors shown to 84 | ; application users can inadvertently leak otherwise secure information. 85 | 86 | ; This is php.ini-production INI file. 87 | 88 | ;;;;;;;;;;;;;;;;;;; 89 | ; Quick Reference ; 90 | ;;;;;;;;;;;;;;;;;;; 91 | ; The following are all the settings which are different in either the production 92 | ; or development versions of the INIs with respect to PHP's default behavior. 93 | ; Please see the actual settings later in the document for more details as to why 94 | ; we recommend these changes in PHP's behavior. 95 | 96 | ; display_errors 97 | ; Default Value: On 98 | ; Development Value: On 99 | ; Production Value: Off 100 | 101 | ; display_startup_errors 102 | ; Default Value: Off 103 | ; Development Value: On 104 | ; Production Value: Off 105 | 106 | ; error_reporting 107 | ; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED 108 | ; Development Value: E_ALL 109 | ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT 110 | 111 | ; html_errors 112 | ; Default Value: On 113 | ; Development Value: On 114 | ; Production value: On 115 | 116 | ; log_errors 117 | ; Default Value: Off 118 | ; Development Value: On 119 | ; Production Value: On 120 | 121 | ; max_input_time 122 | ; Default Value: -1 (Unlimited) 123 | ; Development Value: 60 (60 seconds) 124 | ; Production Value: 60 (60 seconds) 125 | 126 | ; output_buffering 127 | ; Default Value: Off 128 | ; Development Value: 4096 129 | ; Production Value: 4096 130 | 131 | ; register_argc_argv 132 | ; Default Value: On 133 | ; Development Value: Off 134 | ; Production Value: Off 135 | 136 | ; request_order 137 | ; Default Value: None 138 | ; Development Value: "GP" 139 | ; Production Value: "GP" 140 | 141 | ; session.gc_divisor 142 | ; Default Value: 100 143 | ; Development Value: 1000 144 | ; Production Value: 1000 145 | 146 | ; session.sid_bits_per_character 147 | ; Default Value: 4 148 | ; Development Value: 5 149 | ; Production Value: 5 150 | 151 | ; short_open_tag 152 | ; Default Value: On 153 | ; Development Value: Off 154 | ; Production Value: Off 155 | 156 | ; track_errors 157 | ; Default Value: Off 158 | ; Development Value: On 159 | ; Production Value: Off 160 | 161 | ; variables_order 162 | ; Default Value: "EGPCS" 163 | ; Development Value: "GPCS" 164 | ; Production Value: "GPCS" 165 | 166 | ;;;;;;;;;;;;;;;;;;;; 167 | ; php.ini Options ; 168 | ;;;;;;;;;;;;;;;;;;;; 169 | ; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini" 170 | ;user_ini.filename = ".user.ini" 171 | 172 | ; To disable this feature set this option to empty value 173 | ;user_ini.filename = 174 | 175 | ; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes) 176 | ;user_ini.cache_ttl = 300 177 | 178 | ;;;;;;;;;;;;;;;;;;;; 179 | ; Language Options ; 180 | ;;;;;;;;;;;;;;;;;;;; 181 | 182 | ; Enable the PHP scripting language engine under Apache. 183 | ; http://php.net/engine 184 | engine = On 185 | 186 | ; This directive determines whether or not PHP will recognize code between 187 | ; tags as PHP source which should be processed as such. It is 188 | ; generally recommended that should be used and that this feature 189 | ; should be disabled, as enabling it may result in issues when generating XML 190 | ; documents, however this remains supported for backward compatibility reasons. 191 | ; Note that this directive does not control the would work. 324 | ; http://php.net/syntax-highlighting 325 | highlight.string = #DD0000 326 | highlight.comment = #FF8000 327 | highlight.keyword = #007700 328 | highlight.default = #0000BB 329 | highlight.html = #000000 330 | 331 | ; If enabled, the request will be allowed to complete even if the user aborts 332 | ; the request. Consider enabling it if executing long requests, which may end up 333 | ; being interrupted by the user or a browser timing out. PHP's default behavior 334 | ; is to disable this feature. 335 | ; http://php.net/ignore-user-abort 336 | ignore_user_abort = 0 337 | 338 | ; Determines the size of the realpath cache to be used by PHP. This value should 339 | ; be increased on systems where PHP opens many files to reflect the quantity of 340 | ; the file operations performed. 341 | ; Note: if open_basedir is set, the cache is disabled 342 | ; http://php.net/realpath-cache-size 343 | realpath_cache_size = 16K 344 | 345 | ; Duration of time, in seconds for which to cache realpath information for a given 346 | ; file or directory. For systems with rarely changing files, consider increasing this 347 | ; value. 348 | ; http://php.net/realpath-cache-ttl 349 | ;realpath_cache_ttl = 120 350 | 351 | ; Enables or disables the circular reference collector. 352 | ; http://php.net/zend.enable-gc 353 | zend.enable_gc = On 354 | 355 | ; If enabled, scripts may be written in encodings that are incompatible with 356 | ; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such 357 | ; encodings. To use this feature, mbstring extension must be enabled. 358 | ; Default: Off 359 | ;zend.multibyte = Off 360 | 361 | ; Allows to set the default encoding for the scripts. This value will be used 362 | ; unless "declare(encoding=...)" directive appears at the top of the script. 363 | ; Only affects if zend.multibyte is set. 364 | ; Default: "" 365 | ;zend.script_encoding = 366 | 367 | ;;;;;;;;;;;;;;;;; 368 | ; Miscellaneous ; 369 | ;;;;;;;;;;;;;;;;; 370 | 371 | ; Decides whether PHP may expose the fact that it is installed on the server 372 | ; (e.g. by adding its signature to the Web server header). It is no security 373 | ; threat in any way, but it makes it possible to determine whether you use PHP 374 | ; on your server or not. 375 | ; http://php.net/expose-php 376 | expose_php = On 377 | 378 | ;;;;;;;;;;;;;;;;;;; 379 | ; Resource Limits ; 380 | ;;;;;;;;;;;;;;;;;;; 381 | 382 | ; Maximum execution time of each script, in seconds 383 | ; http://php.net/max-execution-time 384 | ; Note: This directive is hardcoded to 0 for the CLI SAPI 385 | max_execution_time = 300 386 | 387 | ; Maximum amount of time each script may spend parsing request data. It's a good 388 | ; idea to limit this time on productions servers in order to eliminate unexpectedly 389 | ; long running scripts. 390 | ; Note: This directive is hardcoded to -1 for the CLI SAPI 391 | ; Default Value: -1 (Unlimited) 392 | ; Development Value: 60 (60 seconds) 393 | ; Production Value: 60 (60 seconds) 394 | ; http://php.net/max-input-time 395 | max_input_time = 60 396 | 397 | ; Maximum input variable nesting level 398 | ; http://php.net/max-input-nesting-level 399 | max_input_nesting_level = 64 400 | 401 | ; How many GET/POST/COOKIE input variables may be accepted 402 | max_input_vars = 1000 403 | 404 | ; Maximum amount of memory a script may consume (128MB) 405 | ; http://php.net/memory-limit 406 | memory_limit = 128M 407 | 408 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 409 | ; Error handling and logging ; 410 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 411 | 412 | ; This directive informs PHP of which errors, warnings and notices you would like 413 | ; it to take action for. The recommended way of setting values for this 414 | ; directive is through the use of the error level constants and bitwise 415 | ; operators. The error level constants are below here for convenience as well as 416 | ; some common settings and their meanings. 417 | ; By default, PHP is set to take action on all errors, notices and warnings EXCEPT 418 | ; those related to E_NOTICE and E_STRICT, which together cover best practices and 419 | ; recommended coding standards in PHP. For performance reasons, this is the 420 | ; recommend error reporting setting. Your production server shouldn't be wasting 421 | ; resources complaining about best practices and coding standards. That's what 422 | ; development servers and development settings are for. 423 | ; Note: The php.ini-development file has this setting as E_ALL. This 424 | ; means it pretty much reports everything which is exactly what you want during 425 | ; development and early testing. 426 | ; 427 | ; Error Level Constants: 428 | ; E_ALL - All errors and warnings (includes E_STRICT as of PHP 5.4.0) 429 | ; E_ERROR - fatal run-time errors 430 | ; E_RECOVERABLE_ERROR - almost fatal run-time errors 431 | ; E_WARNING - run-time warnings (non-fatal errors) 432 | ; E_PARSE - compile-time parse errors 433 | ; E_NOTICE - run-time notices (these are warnings which often result 434 | ; from a bug in your code, but it's possible that it was 435 | ; intentional (e.g., using an uninitialized variable and 436 | ; relying on the fact it is automatically initialized to an 437 | ; empty string) 438 | ; E_STRICT - run-time notices, enable to have PHP suggest changes 439 | ; to your code which will ensure the best interoperability 440 | ; and forward compatibility of your code 441 | ; E_CORE_ERROR - fatal errors that occur during PHP's initial startup 442 | ; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's 443 | ; initial startup 444 | ; E_COMPILE_ERROR - fatal compile-time errors 445 | ; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) 446 | ; E_USER_ERROR - user-generated error message 447 | ; E_USER_WARNING - user-generated warning message 448 | ; E_USER_NOTICE - user-generated notice message 449 | ; E_DEPRECATED - warn about code that will not work in future versions 450 | ; of PHP 451 | ; E_USER_DEPRECATED - user-generated deprecation warnings 452 | ; 453 | ; Common Values: 454 | ; E_ALL (Show all errors, warnings and notices including coding standards.) 455 | ; E_ALL & ~E_NOTICE (Show all errors, except for notices) 456 | ; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.) 457 | ; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) 458 | ; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED 459 | ; Development Value: E_ALL 460 | ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT 461 | ; http://php.net/error-reporting 462 | error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT 463 | 464 | ; This directive controls whether or not and where PHP will output errors, 465 | ; notices and warnings too. Error output is very useful during development, but 466 | ; it could be very dangerous in production environments. Depending on the code 467 | ; which is triggering the error, sensitive information could potentially leak 468 | ; out of your application such as database usernames and passwords or worse. 469 | ; For production environments, we recommend logging errors rather than 470 | ; sending them to STDOUT. 471 | ; Possible Values: 472 | ; Off = Do not display any errors 473 | ; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) 474 | ; On or stdout = Display errors to STDOUT 475 | ; Default Value: On 476 | ; Development Value: On 477 | ; Production Value: Off 478 | ; http://php.net/display-errors 479 | display_errors = Off 480 | 481 | ; The display of errors which occur during PHP's startup sequence are handled 482 | ; separately from display_errors. PHP's default behavior is to suppress those 483 | ; errors from clients. Turning the display of startup errors on can be useful in 484 | ; debugging configuration problems. We strongly recommend you 485 | ; set this to 'off' for production servers. 486 | ; Default Value: Off 487 | ; Development Value: On 488 | ; Production Value: Off 489 | ; http://php.net/display-startup-errors 490 | display_startup_errors = Off 491 | 492 | ; Besides displaying errors, PHP can also log errors to locations such as a 493 | ; server-specific log, STDERR, or a location specified by the error_log 494 | ; directive found below. While errors should not be displayed on productions 495 | ; servers they should still be monitored and logging is a great way to do that. 496 | ; Default Value: Off 497 | ; Development Value: On 498 | ; Production Value: On 499 | ; http://php.net/log-errors 500 | log_errors = On 501 | 502 | ; Set maximum length of log_errors. In error_log information about the source is 503 | ; added. The default is 1024 and 0 allows to not apply any maximum length at all. 504 | ; http://php.net/log-errors-max-len 505 | log_errors_max_len = 1024 506 | 507 | ; Do not log repeated messages. Repeated errors must occur in same file on same 508 | ; line unless ignore_repeated_source is set true. 509 | ; http://php.net/ignore-repeated-errors 510 | ignore_repeated_errors = Off 511 | 512 | ; Ignore source of message when ignoring repeated messages. When this setting 513 | ; is On you will not log errors with repeated messages from different files or 514 | ; source lines. 515 | ; http://php.net/ignore-repeated-source 516 | ignore_repeated_source = Off 517 | 518 | ; If this parameter is set to Off, then memory leaks will not be shown (on 519 | ; stdout or in the log). This has only effect in a debug compile, and if 520 | ; error reporting includes E_WARNING in the allowed list 521 | ; http://php.net/report-memleaks 522 | report_memleaks = On 523 | 524 | ; This setting is on by default. 525 | ;report_zend_debug = 0 526 | 527 | ; Store the last error/warning message in $php_errormsg (boolean). Setting this value 528 | ; to On can assist in debugging and is appropriate for development servers. It should 529 | ; however be disabled on production servers. 530 | ; This directive is DEPRECATED. 531 | ; Default Value: Off 532 | ; Development Value: Off 533 | ; Production Value: Off 534 | ; http://php.net/track-errors 535 | ;track_errors = Off 536 | 537 | ; Turn off normal error reporting and emit XML-RPC error XML 538 | ; http://php.net/xmlrpc-errors 539 | ;xmlrpc_errors = 0 540 | 541 | ; An XML-RPC faultCode 542 | ;xmlrpc_error_number = 0 543 | 544 | ; When PHP displays or logs an error, it has the capability of formatting the 545 | ; error message as HTML for easier reading. This directive controls whether 546 | ; the error message is formatted as HTML or not. 547 | ; Note: This directive is hardcoded to Off for the CLI SAPI 548 | ; Default Value: On 549 | ; Development Value: On 550 | ; Production value: On 551 | ; http://php.net/html-errors 552 | html_errors = On 553 | 554 | ; If html_errors is set to On *and* docref_root is not empty, then PHP 555 | ; produces clickable error messages that direct to a page describing the error 556 | ; or function causing the error in detail. 557 | ; You can download a copy of the PHP manual from http://php.net/docs 558 | ; and change docref_root to the base URL of your local copy including the 559 | ; leading '/'. You must also specify the file extension being used including 560 | ; the dot. PHP's default behavior is to leave these settings empty, in which 561 | ; case no links to documentation are generated. 562 | ; Note: Never use this feature for production boxes. 563 | ; http://php.net/docref-root 564 | ; Examples 565 | ;docref_root = "/phpmanual/" 566 | 567 | ; http://php.net/docref-ext 568 | ;docref_ext = .html 569 | 570 | ; String to output before an error message. PHP's default behavior is to leave 571 | ; this setting blank. 572 | ; http://php.net/error-prepend-string 573 | ; Example: 574 | ;error_prepend_string = "" 575 | 576 | ; String to output after an error message. PHP's default behavior is to leave 577 | ; this setting blank. 578 | ; http://php.net/error-append-string 579 | ; Example: 580 | ;error_append_string = "" 581 | 582 | ; Log errors to specified file. PHP's default behavior is to leave this value 583 | ; empty. 584 | ; http://php.net/error-log 585 | ; Example: 586 | ;error_log = php_errors.log 587 | ; Log errors to syslog (Event Log on Windows). 588 | ;error_log = syslog 589 | 590 | ;windows.show_crt_warning 591 | ; Default value: 0 592 | ; Development value: 0 593 | ; Production value: 0 594 | 595 | ;;;;;;;;;;;;;;;;; 596 | ; Data Handling ; 597 | ;;;;;;;;;;;;;;;;; 598 | 599 | ; The separator used in PHP generated URLs to separate arguments. 600 | ; PHP's default setting is "&". 601 | ; http://php.net/arg-separator.output 602 | ; Example: 603 | arg_separator.output = "&" 604 | 605 | ; List of separator(s) used by PHP to parse input URLs into variables. 606 | ; PHP's default setting is "&". 607 | ; NOTE: Every character in this directive is considered as separator! 608 | ; http://php.net/arg-separator.input 609 | ; Example: 610 | arg_separator.input = "&" 611 | 612 | ; This directive determines which super global arrays are registered when PHP 613 | ; starts up. G,P,C,E & S are abbreviations for the following respective super 614 | ; globals: GET, POST, COOKIE, ENV and SERVER. There is a performance penalty 615 | ; paid for the registration of these arrays and because ENV is not as commonly 616 | ; used as the others, ENV is not recommended on productions servers. You 617 | ; can still get access to the environment variables through getenv() should you 618 | ; need to. 619 | ; Default Value: "EGPCS" 620 | ; Development Value: "GPCS" 621 | ; Production Value: "GPCS"; 622 | ; http://php.net/variables-order 623 | variables_order = "GPCS" 624 | 625 | ; This directive determines which super global data (G,P & C) should be 626 | ; registered into the super global array REQUEST. If so, it also determines 627 | ; the order in which that data is registered. The values for this directive 628 | ; are specified in the same manner as the variables_order directive, 629 | ; EXCEPT one. Leaving this value empty will cause PHP to use the value set 630 | ; in the variables_order directive. It does not mean it will leave the super 631 | ; globals array REQUEST empty. 632 | ; Default Value: None 633 | ; Development Value: "GP" 634 | ; Production Value: "GP" 635 | ; http://php.net/request-order 636 | request_order = "GP" 637 | 638 | ; This directive determines whether PHP registers $argv & $argc each time it 639 | ; runs. $argv contains an array of all the arguments passed to PHP when a script 640 | ; is invoked. $argc contains an integer representing the number of arguments 641 | ; that were passed when the script was invoked. These arrays are extremely 642 | ; useful when running scripts from the command line. When this directive is 643 | ; enabled, registering these variables consumes CPU cycles and memory each time 644 | ; a script is executed. For performance reasons, this feature should be disabled 645 | ; on production servers. 646 | ; Note: This directive is hardcoded to On for the CLI SAPI 647 | ; Default Value: On 648 | ; Development Value: Off 649 | ; Production Value: Off 650 | ; http://php.net/register-argc-argv 651 | register_argc_argv = Off 652 | 653 | ; When enabled, the ENV, REQUEST and SERVER variables are created when they're 654 | ; first used (Just In Time) instead of when the script starts. If these 655 | ; variables are not used within a script, having this directive on will result 656 | ; in a performance gain. The PHP directive register_argc_argv must be disabled 657 | ; for this directive to have any affect. 658 | ; http://php.net/auto-globals-jit 659 | auto_globals_jit = On 660 | 661 | ; Whether PHP will read the POST data. 662 | ; This option is enabled by default. 663 | ; Most likely, you won't want to disable this option globally. It causes $_POST 664 | ; and $_FILES to always be empty; the only way you will be able to read the 665 | ; POST data will be through the php://input stream wrapper. This can be useful 666 | ; to proxy requests or to process the POST data in a memory efficient fashion. 667 | ; http://php.net/enable-post-data-reading 668 | enable_post_data_reading = 1 669 | 670 | ; Maximum size of POST data that PHP will accept. 671 | ; Its value may be 0 to disable the limit. It is ignored if POST data reading 672 | ; is disabled through enable_post_data_reading. 673 | ; http://php.net/post-max-size 674 | post_max_size = 100M 675 | 676 | ; Automatically add files before PHP document. 677 | ; http://php.net/auto-prepend-file 678 | auto_prepend_file = 679 | 680 | ; Automatically add files after PHP document. 681 | ; http://php.net/auto-append-file 682 | auto_append_file = 683 | 684 | ; By default, PHP will output a media type using the Content-Type header. To 685 | ; disable this, simply set it to be empty. 686 | ; 687 | ; PHP's built-in default media type is set to text/html. 688 | ; http://php.net/default-mimetype 689 | default_mimetype = "text/html" 690 | 691 | ; PHP's default character set is set to UTF-8. 692 | ; http://php.net/default-charset 693 | default_charset = "UTF-8" 694 | 695 | ; PHP internal character encoding is set to empty. 696 | ; If empty, default_charset is used. 697 | ; http://php.net/internal-encoding 698 | ;internal_encoding = 699 | 700 | ; PHP input character encoding is set to empty. 701 | ; If empty, default_charset is used. 702 | ; http://php.net/input-encoding 703 | ;input_encoding = 704 | 705 | ; PHP output character encoding is set to empty. 706 | ; If empty, default_charset is used. 707 | ; See also output_buffer. 708 | ; http://php.net/output-encoding 709 | ;output_encoding = 710 | 711 | ;;;;;;;;;;;;;;;;;;;;;;;;; 712 | ; Paths and Directories ; 713 | ;;;;;;;;;;;;;;;;;;;;;;;;; 714 | 715 | ; UNIX: "/path1:/path2" 716 | ;include_path = ".:/php/includes" 717 | ; 718 | ; Windows: "\path1;\path2" 719 | ;include_path = ".;c:\php\includes" 720 | ; 721 | ; PHP's default setting for include_path is ".;/path/to/php/pear" 722 | ; http://php.net/include-path 723 | 724 | ; The root of the PHP pages, used only if nonempty. 725 | ; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root 726 | ; if you are running php as a CGI under any web server (other than IIS) 727 | ; see documentation for security issues. The alternate is to use the 728 | ; cgi.force_redirect configuration below 729 | ; http://php.net/doc-root 730 | doc_root = 731 | 732 | ; The directory under which PHP opens the script using /~username used only 733 | ; if nonempty. 734 | ; http://php.net/user-dir 735 | user_dir = 736 | 737 | ; Directory in which the loadable extensions (modules) reside. 738 | ; http://php.net/extension-dir 739 | ; extension_dir = "./" 740 | ; On windows: 741 | ; extension_dir = "ext" 742 | 743 | ; Directory where the temporary files should be placed. 744 | ; Defaults to the system default (see sys_get_temp_dir) 745 | ; sys_temp_dir = "/tmp" 746 | 747 | ; Whether or not to enable the dl() function. The dl() function does NOT work 748 | ; properly in multithreaded servers, such as IIS or Zeus, and is automatically 749 | ; disabled on them. 750 | ; http://php.net/enable-dl 751 | enable_dl = Off 752 | 753 | ; cgi.force_redirect is necessary to provide security running PHP as a CGI under 754 | ; most web servers. Left undefined, PHP turns this on by default. You can 755 | ; turn it off here AT YOUR OWN RISK 756 | ; **You CAN safely turn this off for IIS, in fact, you MUST.** 757 | ; http://php.net/cgi.force-redirect 758 | cgi.force_redirect = 1 759 | 760 | ; if cgi.nph is enabled it will force cgi to always sent Status: 200 with 761 | ; every request. PHP's default behavior is to disable this feature. 762 | cgi.nph = 0 763 | 764 | ; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape 765 | ; (iPlanet) web servers, you MAY need to set an environment variable name that PHP 766 | ; will look for to know it is OK to continue execution. Setting this variable MAY 767 | ; cause security issues, KNOW WHAT YOU ARE DOING FIRST. 768 | ; http://php.net/cgi.redirect-status-env 769 | ;cgi.redirect_status_env = 770 | 771 | ; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's 772 | ; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok 773 | ; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting 774 | ; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting 775 | ; of zero causes PHP to behave as before. Default is 1. You should fix your scripts 776 | ; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. 777 | ; http://php.net/cgi.fix-pathinfo 778 | cgi.fix_pathinfo=1 779 | 780 | ; if cgi.discard_path is enabled, the PHP CGI binary can safely be placed outside 781 | ; of the web tree and people will not be able to circumvent .htaccess security. 782 | ; http://php.net/cgi.dicard-path 783 | cgi.discard_path=0 784 | 785 | ; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate 786 | ; security tokens of the calling client. This allows IIS to define the 787 | ; security context that the request runs under. mod_fastcgi under Apache 788 | ; does not currently support this feature (03/17/2002) 789 | ; Set to 1 if running under IIS. Default is zero. 790 | ; http://php.net/fastcgi.impersonate 791 | ;fastcgi.impersonate = 1 792 | 793 | ; Disable logging through FastCGI connection. PHP's default behavior is to enable 794 | ; this feature. 795 | fastcgi.logging = 1 796 | 797 | ; cgi.rfc2616_headers configuration option tells PHP what type of headers to 798 | ; use when sending HTTP response code. If set to 0, PHP sends Status: header that 799 | ; is supported by Apache. When this option is set to 1, PHP will send 800 | ; RFC2616 compliant header. 801 | ; Default is zero. 802 | ; http://php.net/cgi.rfc2616-headers 803 | cgi.rfc2616_headers = 0 804 | 805 | ; cgi.check_shebang_line controls whether CGI PHP checks for line starting with #! 806 | ; (shebang) at the top of the running script. This line might be needed if the 807 | ; script support running both as stand-alone script and via PHP CGI<. PHP in CGI 808 | ; mode skips this line and ignores its content if this directive is turned on. 809 | ; http://php.net/cgi.check-shebang-line 810 | ;cgi.check_shebang_line=1 811 | 812 | ;;;;;;;;;;;;;;;; 813 | ; File Uploads ; 814 | ;;;;;;;;;;;;;;;; 815 | 816 | ; Whether to allow HTTP file uploads. 817 | ; http://php.net/file-uploads 818 | file_uploads = On 819 | 820 | ; Temporary directory for HTTP uploaded files (will use system default if not 821 | ; specified). 822 | ; http://php.net/upload-tmp-dir 823 | ;upload_tmp_dir = 824 | 825 | ; Maximum allowed size for uploaded files. 826 | ; http://php.net/upload-max-filesize 827 | upload_max_filesize = 100M 828 | 829 | ; Maximum number of files that can be uploaded via a single request 830 | max_file_uploads = 20 831 | 832 | ;;;;;;;;;;;;;;;;;; 833 | ; Fopen wrappers ; 834 | ;;;;;;;;;;;;;;;;;; 835 | 836 | ; Whether to allow the treatment of URLs (like http:// or ftp://) as files. 837 | ; http://php.net/allow-url-fopen 838 | allow_url_fopen = On 839 | 840 | ; Whether to allow include/require to open URLs (like http:// or ftp://) as files. 841 | ; http://php.net/allow-url-include 842 | allow_url_include = Off 843 | 844 | ; Define the anonymous ftp password (your email address). PHP's default setting 845 | ; for this is empty. 846 | ; http://php.net/from 847 | ;from="john@doe.com" 848 | 849 | ; Define the User-Agent string. PHP's default setting for this is empty. 850 | ; http://php.net/user-agent 851 | ;user_agent="PHP" 852 | 853 | ; Default timeout for socket based streams (seconds) 854 | ; http://php.net/default-socket-timeout 855 | default_socket_timeout = 60 856 | 857 | ; If your scripts have to deal with files from Macintosh systems, 858 | ; or you are running on a Mac and need to deal with files from 859 | ; unix or win32 systems, setting this flag will cause PHP to 860 | ; automatically detect the EOL character in those files so that 861 | ; fgets() and file() will work regardless of the source of the file. 862 | ; http://php.net/auto-detect-line-endings 863 | auto_detect_line_endings = Off 864 | 865 | ;;;;;;;;;;;;;;;;;;;;;; 866 | ; Dynamic Extensions ; 867 | ;;;;;;;;;;;;;;;;;;;;;; 868 | 869 | ; If you wish to have an extension loaded automatically, use the following 870 | ; syntax: 871 | ; 872 | ; extension=modulename 873 | ; 874 | ; For example: 875 | ; 876 | ; extension=mysqli 877 | ; 878 | ; When the extension library to load is not located in the default extension 879 | ; directory, You may specify an absolute path to the library file: 880 | ; 881 | ; extension=/path/to/extension/mysqli.so 882 | ; 883 | ; Note : The syntax used in previous PHP versions ('extension=.so' and 884 | ; 'extension='php_.dll') is supported for legacy reasons and may be 885 | ; deprecated in a future PHP major version. So, when it is possible, please 886 | ; move to the new ('extension=) syntax. 887 | ; 888 | ; Notes for Windows environments : 889 | ; 890 | ; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+) 891 | ; extension folders as well as the separate PECL DLL download (PHP 5+). 892 | ; Be sure to appropriately set the extension_dir directive. 893 | ; 894 | ;extension=bz2 895 | ;extension=curl 896 | ;extension=fileinfo 897 | ;extension=gd2 898 | ;extension=gettext 899 | ;extension=gmp 900 | ;extension=intl 901 | ;extension=imap 902 | ;extension=interbase 903 | ;extension=ldap 904 | ;extension=mbstring 905 | ;extension=exif ; Must be after mbstring as it depends on it 906 | ;extension=mysqli 907 | ;extension=oci8_12c ; Use with Oracle Database 12c Instant Client 908 | ;extension=odbc 909 | ;extension=openssl 910 | ;extension=pdo_firebird 911 | ;extension=pdo_mysql 912 | ;extension=pdo_oci 913 | ;extension=pdo_odbc 914 | ;extension=pdo_pgsql 915 | ;extension=pdo_sqlite 916 | ;extension=pgsql 917 | ;extension=shmop 918 | 919 | ; The MIBS data available in the PHP distribution must be installed. 920 | ; See http://www.php.net/manual/en/snmp.installation.php 921 | ;extension=snmp 922 | 923 | ;extension=soap 924 | ;extension=sockets 925 | ;extension=sqlite3 926 | ;extension=tidy 927 | ;extension=xmlrpc 928 | ;extension=xsl 929 | 930 | ;;;;;;;;;;;;;;;;;;; 931 | ; Module Settings ; 932 | ;;;;;;;;;;;;;;;;;;; 933 | 934 | [CLI Server] 935 | ; Whether the CLI web server uses ANSI color coding in its terminal output. 936 | cli_server.color = On 937 | 938 | [Date] 939 | ; Defines the default timezone used by the date functions 940 | ; http://php.net/date.timezone 941 | date.timezone = UTC 942 | 943 | ; http://php.net/date.default-latitude 944 | ;date.default_latitude = 31.7667 945 | 946 | ; http://php.net/date.default-longitude 947 | ;date.default_longitude = 35.2333 948 | 949 | ; http://php.net/date.sunrise-zenith 950 | ;date.sunrise_zenith = 90.583333 951 | 952 | ; http://php.net/date.sunset-zenith 953 | ;date.sunset_zenith = 90.583333 954 | 955 | [filter] 956 | ; http://php.net/filter.default 957 | filter.default = unsafe_raw 958 | 959 | ; http://php.net/filter.default-flags 960 | ;filter.default_flags = 961 | 962 | [iconv] 963 | ; Use of this INI entry is deprecated, use global input_encoding instead. 964 | ; If empty, default_charset or input_encoding or iconv.input_encoding is used. 965 | ; The precedence is: default_charset < intput_encoding < iconv.input_encoding 966 | ;iconv.input_encoding = 967 | 968 | ; Use of this INI entry is deprecated, use global internal_encoding instead. 969 | ; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. 970 | ; The precedence is: default_charset < internal_encoding < iconv.internal_encoding 971 | ;iconv.internal_encoding = 972 | 973 | ; Use of this INI entry is deprecated, use global output_encoding instead. 974 | ; If empty, default_charset or output_encoding or iconv.output_encoding is used. 975 | ; The precedence is: default_charset < output_encoding < iconv.output_encoding 976 | ; To use an output encoding conversion, iconv's output handler must be set 977 | ; otherwise output encoding conversion cannot be performed. 978 | ;iconv.output_encoding = 979 | 980 | [imap] 981 | ; rsh/ssh logins are disabled by default. Use this INI entry if you want to 982 | ; enable them. Note that the IMAP library does not filter mailbox names before 983 | ; passing them to rsh/ssh command, thus passing untrusted data to this function 984 | ; with rsh/ssh enabled is insecure. 985 | ;imap.enable_insecure_rsh=0 986 | 987 | [intl] 988 | ;intl.default_locale = 989 | ; This directive allows you to produce PHP errors when some error 990 | ; happens within intl functions. The value is the level of the error produced. 991 | ; Default is 0, which does not produce any errors. 992 | ;intl.error_level = E_WARNING 993 | ;intl.use_exceptions = 0 994 | 995 | [sqlite3] 996 | ;sqlite3.extension_dir = 997 | 998 | [Pcre] 999 | ;PCRE library backtracking limit. 1000 | ; http://php.net/pcre.backtrack-limit 1001 | pcre.backtrack_limit=1000000 1002 | 1003 | ;PCRE library recursion limit. 1004 | ;Please note that if you set this value to a high number you may consume all 1005 | ;the available process stack and eventually crash PHP (due to reaching the 1006 | ;stack size limit imposed by the Operating System). 1007 | ; http://php.net/pcre.recursion-limit 1008 | pcre.recursion_limit=100000 1009 | 1010 | ;Enables or disables JIT compilation of patterns. This requires the PCRE 1011 | ;library to be compiled with JIT support. 1012 | ;pcre.jit=1 1013 | 1014 | [Pdo] 1015 | ; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off" 1016 | ; http://php.net/pdo-odbc.connection-pooling 1017 | ;pdo_odbc.connection_pooling=strict 1018 | 1019 | ;pdo_odbc.db2_instance_name 1020 | 1021 | [Pdo_mysql] 1022 | ; If mysqlnd is used: Number of cache slots for the internal result set cache 1023 | ; http://php.net/pdo_mysql.cache_size 1024 | pdo_mysql.cache_size = 2000 1025 | 1026 | ; Default socket name for local MySQL connects. If empty, uses the built-in 1027 | ; MySQL defaults. 1028 | ; http://php.net/pdo_mysql.default-socket 1029 | pdo_mysql.default_socket= 1030 | 1031 | [Phar] 1032 | ; http://php.net/phar.readonly 1033 | ;phar.readonly = On 1034 | 1035 | ; http://php.net/phar.require-hash 1036 | ;phar.require_hash = On 1037 | 1038 | ;phar.cache_list = 1039 | 1040 | [mail function] 1041 | ; For Win32 only. 1042 | ; http://php.net/smtp 1043 | SMTP = localhost 1044 | ; http://php.net/smtp-port 1045 | smtp_port = 25 1046 | 1047 | ; For Win32 only. 1048 | ; http://php.net/sendmail-from 1049 | ;sendmail_from = me@example.com 1050 | 1051 | ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). 1052 | ; http://php.net/sendmail-path 1053 | ;sendmail_path = 1054 | 1055 | ; Force the addition of the specified parameters to be passed as extra parameters 1056 | ; to the sendmail binary. These parameters will always replace the value of 1057 | ; the 5th parameter to mail(). 1058 | ;mail.force_extra_parameters = 1059 | 1060 | ; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename 1061 | mail.add_x_header = 1 1062 | 1063 | ; The path to a log file that will log all mail() calls. Log entries include 1064 | ; the full path of the script, line number, To address and headers. 1065 | ;mail.log = 1066 | ; Log mail to syslog (Event Log on Windows). 1067 | ;mail.log = syslog 1068 | 1069 | [ODBC] 1070 | ; http://php.net/odbc.default-db 1071 | ;odbc.default_db = Not yet implemented 1072 | 1073 | ; http://php.net/odbc.default-user 1074 | ;odbc.default_user = Not yet implemented 1075 | 1076 | ; http://php.net/odbc.default-pw 1077 | ;odbc.default_pw = Not yet implemented 1078 | 1079 | ; Controls the ODBC cursor model. 1080 | ; Default: SQL_CURSOR_STATIC (default). 1081 | ;odbc.default_cursortype 1082 | 1083 | ; Allow or prevent persistent links. 1084 | ; http://php.net/odbc.allow-persistent 1085 | odbc.allow_persistent = On 1086 | 1087 | ; Check that a connection is still valid before reuse. 1088 | ; http://php.net/odbc.check-persistent 1089 | odbc.check_persistent = On 1090 | 1091 | ; Maximum number of persistent links. -1 means no limit. 1092 | ; http://php.net/odbc.max-persistent 1093 | odbc.max_persistent = -1 1094 | 1095 | ; Maximum number of links (persistent + non-persistent). -1 means no limit. 1096 | ; http://php.net/odbc.max-links 1097 | odbc.max_links = -1 1098 | 1099 | ; Handling of LONG fields. Returns number of bytes to variables. 0 means 1100 | ; passthru. 1101 | ; http://php.net/odbc.defaultlrl 1102 | odbc.defaultlrl = 4096 1103 | 1104 | ; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char. 1105 | ; See the documentation on odbc_binmode and odbc_longreadlen for an explanation 1106 | ; of odbc.defaultlrl and odbc.defaultbinmode 1107 | ; http://php.net/odbc.defaultbinmode 1108 | odbc.defaultbinmode = 1 1109 | 1110 | ;birdstep.max_links = -1 1111 | 1112 | [Interbase] 1113 | ; Allow or prevent persistent links. 1114 | ibase.allow_persistent = 1 1115 | 1116 | ; Maximum number of persistent links. -1 means no limit. 1117 | ibase.max_persistent = -1 1118 | 1119 | ; Maximum number of links (persistent + non-persistent). -1 means no limit. 1120 | ibase.max_links = -1 1121 | 1122 | ; Default database name for ibase_connect(). 1123 | ;ibase.default_db = 1124 | 1125 | ; Default username for ibase_connect(). 1126 | ;ibase.default_user = 1127 | 1128 | ; Default password for ibase_connect(). 1129 | ;ibase.default_password = 1130 | 1131 | ; Default charset for ibase_connect(). 1132 | ;ibase.default_charset = 1133 | 1134 | ; Default timestamp format. 1135 | ibase.timestampformat = "%Y-%m-%d %H:%M:%S" 1136 | 1137 | ; Default date format. 1138 | ibase.dateformat = "%Y-%m-%d" 1139 | 1140 | ; Default time format. 1141 | ibase.timeformat = "%H:%M:%S" 1142 | 1143 | [MySQLi] 1144 | 1145 | ; Maximum number of persistent links. -1 means no limit. 1146 | ; http://php.net/mysqli.max-persistent 1147 | mysqli.max_persistent = -1 1148 | 1149 | ; Allow accessing, from PHP's perspective, local files with LOAD DATA statements 1150 | ; http://php.net/mysqli.allow_local_infile 1151 | ;mysqli.allow_local_infile = On 1152 | 1153 | ; Allow or prevent persistent links. 1154 | ; http://php.net/mysqli.allow-persistent 1155 | mysqli.allow_persistent = On 1156 | 1157 | ; Maximum number of links. -1 means no limit. 1158 | ; http://php.net/mysqli.max-links 1159 | mysqli.max_links = -1 1160 | 1161 | ; If mysqlnd is used: Number of cache slots for the internal result set cache 1162 | ; http://php.net/mysqli.cache_size 1163 | mysqli.cache_size = 2000 1164 | 1165 | ; Default port number for mysqli_connect(). If unset, mysqli_connect() will use 1166 | ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the 1167 | ; compile-time value defined MYSQL_PORT (in that order). Win32 will only look 1168 | ; at MYSQL_PORT. 1169 | ; http://php.net/mysqli.default-port 1170 | mysqli.default_port = 3306 1171 | 1172 | ; Default socket name for local MySQL connects. If empty, uses the built-in 1173 | ; MySQL defaults. 1174 | ; http://php.net/mysqli.default-socket 1175 | mysqli.default_socket = 1176 | 1177 | ; Default host for mysql_connect() (doesn't apply in safe mode). 1178 | ; http://php.net/mysqli.default-host 1179 | mysqli.default_host = 1180 | 1181 | ; Default user for mysql_connect() (doesn't apply in safe mode). 1182 | ; http://php.net/mysqli.default-user 1183 | mysqli.default_user = 1184 | 1185 | ; Default password for mysqli_connect() (doesn't apply in safe mode). 1186 | ; Note that this is generally a *bad* idea to store passwords in this file. 1187 | ; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw") 1188 | ; and reveal this password! And of course, any users with read access to this 1189 | ; file will be able to reveal the password as well. 1190 | ; http://php.net/mysqli.default-pw 1191 | mysqli.default_pw = 1192 | 1193 | ; Allow or prevent reconnect 1194 | mysqli.reconnect = Off 1195 | 1196 | [mysqlnd] 1197 | ; Enable / Disable collection of general statistics by mysqlnd which can be 1198 | ; used to tune and monitor MySQL operations. 1199 | ; http://php.net/mysqlnd.collect_statistics 1200 | mysqlnd.collect_statistics = On 1201 | 1202 | ; Enable / Disable collection of memory usage statistics by mysqlnd which can be 1203 | ; used to tune and monitor MySQL operations. 1204 | ; http://php.net/mysqlnd.collect_memory_statistics 1205 | mysqlnd.collect_memory_statistics = Off 1206 | 1207 | ; Records communication from all extensions using mysqlnd to the specified log 1208 | ; file. 1209 | ; http://php.net/mysqlnd.debug 1210 | ;mysqlnd.debug = 1211 | 1212 | ; Defines which queries will be logged. 1213 | ; http://php.net/mysqlnd.log_mask 1214 | ;mysqlnd.log_mask = 0 1215 | 1216 | ; Default size of the mysqlnd memory pool, which is used by result sets. 1217 | ; http://php.net/mysqlnd.mempool_default_size 1218 | mysqlnd.mempool_default_size = 16000 1219 | 1220 | ; Size of a pre-allocated buffer used when sending commands to MySQL in bytes. 1221 | ; http://php.net/mysqlnd.net_cmd_buffer_size 1222 | mysqlnd.net_cmd_buffer_size = 4096 1223 | 1224 | ; Size of a pre-allocated buffer used for reading data sent by the server in 1225 | ; bytes. 1226 | ; http://php.net/mysqlnd.net_read_buffer_size 1227 | mysqlnd.net_read_buffer_size = 32768 1228 | 1229 | ; Timeout for network requests in seconds. 1230 | ; http://php.net/mysqlnd.net_read_timeout 1231 | mysqlnd.net_read_timeout = 31536000 1232 | 1233 | ; SHA-256 Authentication Plugin related. File with the MySQL server public RSA 1234 | ; key. 1235 | ; http://php.net/mysqlnd.sha256_server_public_key 1236 | ;mysqlnd.sha256_server_public_key = 1237 | 1238 | [OCI8] 1239 | 1240 | ; Connection: Enables privileged connections using external 1241 | ; credentials (OCI_SYSOPER, OCI_SYSDBA) 1242 | ; http://php.net/oci8.privileged-connect 1243 | ;oci8.privileged_connect = Off 1244 | 1245 | ; Connection: The maximum number of persistent OCI8 connections per 1246 | ; process. Using -1 means no limit. 1247 | ; http://php.net/oci8.max-persistent 1248 | ;oci8.max_persistent = -1 1249 | 1250 | ; Connection: The maximum number of seconds a process is allowed to 1251 | ; maintain an idle persistent connection. Using -1 means idle 1252 | ; persistent connections will be maintained forever. 1253 | ; http://php.net/oci8.persistent-timeout 1254 | ;oci8.persistent_timeout = -1 1255 | 1256 | ; Connection: The number of seconds that must pass before issuing a 1257 | ; ping during oci_pconnect() to check the connection validity. When 1258 | ; set to 0, each oci_pconnect() will cause a ping. Using -1 disables 1259 | ; pings completely. 1260 | ; http://php.net/oci8.ping-interval 1261 | ;oci8.ping_interval = 60 1262 | 1263 | ; Connection: Set this to a user chosen connection class to be used 1264 | ; for all pooled server requests with Oracle 11g Database Resident 1265 | ; Connection Pooling (DRCP). To use DRCP, this value should be set to 1266 | ; the same string for all web servers running the same application, 1267 | ; the database pool must be configured, and the connection string must 1268 | ; specify to use a pooled server. 1269 | ;oci8.connection_class = 1270 | 1271 | ; High Availability: Using On lets PHP receive Fast Application 1272 | ; Notification (FAN) events generated when a database node fails. The 1273 | ; database must also be configured to post FAN events. 1274 | ;oci8.events = Off 1275 | 1276 | ; Tuning: This option enables statement caching, and specifies how 1277 | ; many statements to cache. Using 0 disables statement caching. 1278 | ; http://php.net/oci8.statement-cache-size 1279 | ;oci8.statement_cache_size = 20 1280 | 1281 | ; Tuning: Enables statement prefetching and sets the default number of 1282 | ; rows that will be fetched automatically after statement execution. 1283 | ; http://php.net/oci8.default-prefetch 1284 | ;oci8.default_prefetch = 100 1285 | 1286 | ; Compatibility. Using On means oci_close() will not close 1287 | ; oci_connect() and oci_new_connect() connections. 1288 | ; http://php.net/oci8.old-oci-close-semantics 1289 | ;oci8.old_oci_close_semantics = Off 1290 | 1291 | [PostgreSQL] 1292 | ; Allow or prevent persistent links. 1293 | ; http://php.net/pgsql.allow-persistent 1294 | pgsql.allow_persistent = On 1295 | 1296 | ; Detect broken persistent links always with pg_pconnect(). 1297 | ; Auto reset feature requires a little overheads. 1298 | ; http://php.net/pgsql.auto-reset-persistent 1299 | pgsql.auto_reset_persistent = Off 1300 | 1301 | ; Maximum number of persistent links. -1 means no limit. 1302 | ; http://php.net/pgsql.max-persistent 1303 | pgsql.max_persistent = -1 1304 | 1305 | ; Maximum number of links (persistent+non persistent). -1 means no limit. 1306 | ; http://php.net/pgsql.max-links 1307 | pgsql.max_links = -1 1308 | 1309 | ; Ignore PostgreSQL backends Notice message or not. 1310 | ; Notice message logging require a little overheads. 1311 | ; http://php.net/pgsql.ignore-notice 1312 | pgsql.ignore_notice = 0 1313 | 1314 | ; Log PostgreSQL backends Notice message or not. 1315 | ; Unless pgsql.ignore_notice=0, module cannot log notice message. 1316 | ; http://php.net/pgsql.log-notice 1317 | pgsql.log_notice = 0 1318 | 1319 | [bcmath] 1320 | ; Number of decimal digits for all bcmath functions. 1321 | ; http://php.net/bcmath.scale 1322 | bcmath.scale = 0 1323 | 1324 | [browscap] 1325 | ; http://php.net/browscap 1326 | ;browscap = extra/browscap.ini 1327 | 1328 | [Session] 1329 | ; Handler used to store/retrieve data. 1330 | ; http://php.net/session.save-handler 1331 | session.save_handler = files 1332 | 1333 | ; Argument passed to save_handler. In the case of files, this is the path 1334 | ; where data files are stored. Note: Windows users have to change this 1335 | ; variable in order to use PHP's session functions. 1336 | ; 1337 | ; The path can be defined as: 1338 | ; 1339 | ; session.save_path = "N;/path" 1340 | ; 1341 | ; where N is an integer. Instead of storing all the session files in 1342 | ; /path, what this will do is use subdirectories N-levels deep, and 1343 | ; store the session data in those directories. This is useful if 1344 | ; your OS has problems with many files in one directory, and is 1345 | ; a more efficient layout for servers that handle many sessions. 1346 | ; 1347 | ; NOTE 1: PHP will not create this directory structure automatically. 1348 | ; You can use the script in the ext/session dir for that purpose. 1349 | ; NOTE 2: See the section on garbage collection below if you choose to 1350 | ; use subdirectories for session storage 1351 | ; 1352 | ; The file storage module creates files using mode 600 by default. 1353 | ; You can change that by using 1354 | ; 1355 | ; session.save_path = "N;MODE;/path" 1356 | ; 1357 | ; where MODE is the octal representation of the mode. Note that this 1358 | ; does not overwrite the process's umask. 1359 | ; http://php.net/session.save-path 1360 | ;session.save_path = "/tmp" 1361 | 1362 | ; Whether to use strict session mode. 1363 | ; Strict session mode does not accept uninitialized session ID and regenerate 1364 | ; session ID if browser sends uninitialized session ID. Strict mode protects 1365 | ; applications from session fixation via session adoption vulnerability. It is 1366 | ; disabled by default for maximum compatibility, but enabling it is encouraged. 1367 | ; https://wiki.php.net/rfc/strict_sessions 1368 | session.use_strict_mode = 0 1369 | 1370 | ; Whether to use cookies. 1371 | ; http://php.net/session.use-cookies 1372 | session.use_cookies = 1 1373 | 1374 | ; http://php.net/session.cookie-secure 1375 | ;session.cookie_secure = 1376 | 1377 | ; This option forces PHP to fetch and use a cookie for storing and maintaining 1378 | ; the session id. We encourage this operation as it's very helpful in combating 1379 | ; session hijacking when not specifying and managing your own session id. It is 1380 | ; not the be-all and end-all of session hijacking defense, but it's a good start. 1381 | ; http://php.net/session.use-only-cookies 1382 | session.use_only_cookies = 1 1383 | 1384 | ; Name of the session (used as cookie name). 1385 | ; http://php.net/session.name 1386 | session.name = PHPSESSID 1387 | 1388 | ; Initialize session on request startup. 1389 | ; http://php.net/session.auto-start 1390 | session.auto_start = 0 1391 | 1392 | ; Lifetime in seconds of cookie or, if 0, until browser is restarted. 1393 | ; http://php.net/session.cookie-lifetime 1394 | session.cookie_lifetime = 0 1395 | 1396 | ; The path for which the cookie is valid. 1397 | ; http://php.net/session.cookie-path 1398 | session.cookie_path = / 1399 | 1400 | ; The domain for which the cookie is valid. 1401 | ; http://php.net/session.cookie-domain 1402 | session.cookie_domain = 1403 | 1404 | ; Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser scripting languages such as JavaScript. 1405 | ; http://php.net/session.cookie-httponly 1406 | session.cookie_httponly = 1407 | 1408 | ; Handler used to serialize data. php is the standard serializer of PHP. 1409 | ; http://php.net/session.serialize-handler 1410 | session.serialize_handler = php 1411 | 1412 | ; Defines the probability that the 'garbage collection' process is started 1413 | ; on every session initialization. The probability is calculated by using 1414 | ; gc_probability/gc_divisor. Where session.gc_probability is the numerator 1415 | ; and gc_divisor is the denominator in the equation. Setting this value to 1 1416 | ; when the session.gc_divisor value is 100 will give you approximately a 1% chance 1417 | ; the gc will run on any give request. 1418 | ; Default Value: 1 1419 | ; Development Value: 1 1420 | ; Production Value: 1 1421 | ; http://php.net/session.gc-probability 1422 | session.gc_probability = 0 1423 | 1424 | ; Defines the probability that the 'garbage collection' process is started on every 1425 | ; session initialization. The probability is calculated by using the following equation: 1426 | ; gc_probability/gc_divisor. Where session.gc_probability is the numerator and 1427 | ; session.gc_divisor is the denominator in the equation. Setting this value to 1 1428 | ; when the session.gc_divisor value is 100 will give you approximately a 1% chance 1429 | ; the gc will run on any give request. Increasing this value to 1000 will give you 1430 | ; a 0.1% chance the gc will run on any give request. For high volume production servers, 1431 | ; this is a more efficient approach. 1432 | ; Default Value: 100 1433 | ; Development Value: 1000 1434 | ; Production Value: 1000 1435 | ; http://php.net/session.gc-divisor 1436 | session.gc_divisor = 1000 1437 | 1438 | ; After this number of seconds, stored data will be seen as 'garbage' and 1439 | ; cleaned up by the garbage collection process. 1440 | ; http://php.net/session.gc-maxlifetime 1441 | session.gc_maxlifetime = 1440 1442 | 1443 | ; NOTE: If you are using the subdirectory option for storing session files 1444 | ; (see session.save_path above), then garbage collection does *not* 1445 | ; happen automatically. You will need to do your own garbage 1446 | ; collection through a shell script, cron entry, or some other method. 1447 | ; For example, the following script would is the equivalent of 1448 | ; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): 1449 | ; find /path/to/sessions -cmin +24 -type f | xargs rm 1450 | 1451 | ; Check HTTP Referer to invalidate externally stored URLs containing ids. 1452 | ; HTTP_REFERER has to contain this substring for the session to be 1453 | ; considered as valid. 1454 | ; http://php.net/session.referer-check 1455 | session.referer_check = 1456 | 1457 | ; Set to {nocache,private,public,} to determine HTTP caching aspects 1458 | ; or leave this empty to avoid sending anti-caching headers. 1459 | ; http://php.net/session.cache-limiter 1460 | session.cache_limiter = nocache 1461 | 1462 | ; Document expires after n minutes. 1463 | ; http://php.net/session.cache-expire 1464 | session.cache_expire = 180 1465 | 1466 | ; trans sid support is disabled by default. 1467 | ; Use of trans sid may risk your users' security. 1468 | ; Use this option with caution. 1469 | ; - User may send URL contains active session ID 1470 | ; to other person via. email/irc/etc. 1471 | ; - URL that contains active session ID may be stored 1472 | ; in publicly accessible computer. 1473 | ; - User may access your site with the same session ID 1474 | ; always using URL stored in browser's history or bookmarks. 1475 | ; http://php.net/session.use-trans-sid 1476 | session.use_trans_sid = 0 1477 | 1478 | ; Set session ID character length. This value could be between 22 to 256. 1479 | ; Shorter length than default is supported only for compatibility reason. 1480 | ; Users should use 32 or more chars. 1481 | ; http://php.net/session.sid-length 1482 | ; Default Value: 32 1483 | ; Development Value: 26 1484 | ; Production Value: 26 1485 | session.sid_length = 26 1486 | 1487 | ; The URL rewriter will look for URLs in a defined set of HTML tags. 1488 | ;
is special; if you include them here, the rewriter will 1489 | ; add a hidden field with the info which is otherwise appended 1490 | ; to URLs. tag's action attribute URL will not be modified 1491 | ; unless it is specified. 1492 | ; Note that all valid entries require a "=", even if no value follows. 1493 | ; Default Value: "a=href,area=href,frame=src,form=" 1494 | ; Development Value: "a=href,area=href,frame=src,form=" 1495 | ; Production Value: "a=href,area=href,frame=src,form=" 1496 | ; http://php.net/url-rewriter.tags 1497 | session.trans_sid_tags = "a=href,area=href,frame=src,form=" 1498 | 1499 | ; URL rewriter does not rewrite absolute URLs by default. 1500 | ; To enable rewrites for absolute pathes, target hosts must be specified 1501 | ; at RUNTIME. i.e. use ini_set() 1502 | ; tags is special. PHP will check action attribute's URL regardless 1503 | ; of session.trans_sid_tags setting. 1504 | ; If no host is defined, HTTP_HOST will be used for allowed host. 1505 | ; Example value: php.net,www.php.net,wiki.php.net 1506 | ; Use "," for multiple hosts. No spaces are allowed. 1507 | ; Default Value: "" 1508 | ; Development Value: "" 1509 | ; Production Value: "" 1510 | ;session.trans_sid_hosts="" 1511 | 1512 | ; Define how many bits are stored in each character when converting 1513 | ; the binary hash data to something readable. 1514 | ; Possible values: 1515 | ; 4 (4 bits: 0-9, a-f) 1516 | ; 5 (5 bits: 0-9, a-v) 1517 | ; 6 (6 bits: 0-9, a-z, A-Z, "-", ",") 1518 | ; Default Value: 4 1519 | ; Development Value: 5 1520 | ; Production Value: 5 1521 | ; http://php.net/session.hash-bits-per-character 1522 | session.sid_bits_per_character = 5 1523 | 1524 | ; Enable upload progress tracking in $_SESSION 1525 | ; Default Value: On 1526 | ; Development Value: On 1527 | ; Production Value: On 1528 | ; http://php.net/session.upload-progress.enabled 1529 | ;session.upload_progress.enabled = On 1530 | 1531 | ; Cleanup the progress information as soon as all POST data has been read 1532 | ; (i.e. upload completed). 1533 | ; Default Value: On 1534 | ; Development Value: On 1535 | ; Production Value: On 1536 | ; http://php.net/session.upload-progress.cleanup 1537 | ;session.upload_progress.cleanup = On 1538 | 1539 | ; A prefix used for the upload progress key in $_SESSION 1540 | ; Default Value: "upload_progress_" 1541 | ; Development Value: "upload_progress_" 1542 | ; Production Value: "upload_progress_" 1543 | ; http://php.net/session.upload-progress.prefix 1544 | ;session.upload_progress.prefix = "upload_progress_" 1545 | 1546 | ; The index name (concatenated with the prefix) in $_SESSION 1547 | ; containing the upload progress information 1548 | ; Default Value: "PHP_SESSION_UPLOAD_PROGRESS" 1549 | ; Development Value: "PHP_SESSION_UPLOAD_PROGRESS" 1550 | ; Production Value: "PHP_SESSION_UPLOAD_PROGRESS" 1551 | ; http://php.net/session.upload-progress.name 1552 | ;session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS" 1553 | 1554 | ; How frequently the upload progress should be updated. 1555 | ; Given either in percentages (per-file), or in bytes 1556 | ; Default Value: "1%" 1557 | ; Development Value: "1%" 1558 | ; Production Value: "1%" 1559 | ; http://php.net/session.upload-progress.freq 1560 | ;session.upload_progress.freq = "1%" 1561 | 1562 | ; The minimum delay between updates, in seconds 1563 | ; Default Value: 1 1564 | ; Development Value: 1 1565 | ; Production Value: 1 1566 | ; http://php.net/session.upload-progress.min-freq 1567 | ;session.upload_progress.min_freq = "1" 1568 | 1569 | ; Only write session data when session data is changed. Enabled by default. 1570 | ; http://php.net/session.lazy-write 1571 | ;session.lazy_write = On 1572 | 1573 | [Assertion] 1574 | ; Switch whether to compile assertions at all (to have no overhead at run-time) 1575 | ; -1: Do not compile at all 1576 | ; 0: Jump over assertion at run-time 1577 | ; 1: Execute assertions 1578 | ; Changing from or to a negative value is only possible in php.ini! (For turning assertions on and off at run-time, see assert.active, when zend.assertions = 1) 1579 | ; Default Value: 1 1580 | ; Development Value: 1 1581 | ; Production Value: -1 1582 | ; http://php.net/zend.assertions 1583 | zend.assertions = -1 1584 | 1585 | ; Assert(expr); active by default. 1586 | ; http://php.net/assert.active 1587 | assert.active = On 1588 | 1589 | ; Throw an AssertationException on failed assertions 1590 | ; http://php.net/assert.exception 1591 | ;assert.exception = On 1592 | 1593 | ; Issue a PHP warning for each failed assertion. (Overridden by assert.exception if active) 1594 | ; http://php.net/assert.warning 1595 | assert.warning = On 1596 | 1597 | ; Don't bail out by default. 1598 | ; http://php.net/assert.bail 1599 | assert.bail = Off 1600 | 1601 | ; User-function to be called if an assertion fails. 1602 | ; http://php.net/assert.callback 1603 | ;assert.callback = 0 1604 | 1605 | ; Eval the expression with current error_reporting(). Set to true if you want 1606 | ; error_reporting(0) around the eval(). 1607 | ; http://php.net/assert.quiet-eval 1608 | assert.quiet_eval = 0 1609 | 1610 | [COM] 1611 | ; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs 1612 | ; http://php.net/com.typelib-file 1613 | ;com.typelib_file = 1614 | 1615 | ; allow Distributed-COM calls 1616 | ; http://php.net/com.allow-dcom 1617 | ;com.allow_dcom = true 1618 | 1619 | ; autoregister constants of a components typlib on com_load() 1620 | ; http://php.net/com.autoregister-typelib 1621 | ;com.autoregister_typelib = true 1622 | 1623 | ; register constants casesensitive 1624 | ; http://php.net/com.autoregister-casesensitive 1625 | ;com.autoregister_casesensitive = false 1626 | 1627 | ; show warnings on duplicate constant registrations 1628 | ; http://php.net/com.autoregister-verbose 1629 | ;com.autoregister_verbose = true 1630 | 1631 | ; The default character set code-page to use when passing strings to and from COM objects. 1632 | ; Default: system ANSI code page 1633 | ;com.code_page= 1634 | 1635 | [mbstring] 1636 | ; language for internal character representation. 1637 | ; This affects mb_send_mail() and mbstring.detect_order. 1638 | ; http://php.net/mbstring.language 1639 | mbstring.language = neutral 1640 | 1641 | ; Use of this INI entry is deprecated, use global internal_encoding instead. 1642 | ; internal/script encoding. 1643 | ; Some encoding cannot work as internal encoding. (e.g. SJIS, BIG5, ISO-2022-*) 1644 | ; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. 1645 | ; The precedence is: default_charset < internal_encoding < iconv.internal_encoding 1646 | ;mbstring.internal_encoding = 1647 | 1648 | ; Use of this INI entry is deprecated, use global input_encoding instead. 1649 | ; http input encoding. 1650 | ; mbstring.encoding_traslation = On is needed to use this setting. 1651 | ; If empty, default_charset or input_encoding or mbstring.input is used. 1652 | ; The precedence is: default_charset < intput_encoding < mbsting.http_input 1653 | ; http://php.net/mbstring.http-input 1654 | ;mbstring.http_input = 1655 | 1656 | ; Use of this INI entry is deprecated, use global output_encoding instead. 1657 | ; http output encoding. 1658 | ; mb_output_handler must be registered as output buffer to function. 1659 | ; If empty, default_charset or output_encoding or mbstring.http_output is used. 1660 | ; The precedence is: default_charset < output_encoding < mbstring.http_output 1661 | ; To use an output encoding conversion, mbstring's output handler must be set 1662 | ; otherwise output encoding conversion cannot be performed. 1663 | ; http://php.net/mbstring.http-output 1664 | ;mbstring.http_output = 1665 | 1666 | ; enable automatic encoding translation according to 1667 | ; mbstring.internal_encoding setting. Input chars are 1668 | ; converted to internal encoding by setting this to On. 1669 | ; Note: Do _not_ use automatic encoding translation for 1670 | ; portable libs/applications. 1671 | ; http://php.net/mbstring.encoding-translation 1672 | ;mbstring.encoding_translation = Off 1673 | 1674 | ; automatic encoding detection order. 1675 | ; "auto" detect order is changed according to mbstring.language 1676 | ; http://php.net/mbstring.detect-order 1677 | ;mbstring.detect_order = auto 1678 | 1679 | ; substitute_character used when character cannot be converted 1680 | ; one from another 1681 | ; http://php.net/mbstring.substitute-character 1682 | ;mbstring.substitute_character = none 1683 | 1684 | ; overload(replace) single byte functions by mbstring functions. 1685 | ; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(), 1686 | ; etc. Possible values are 0,1,2,4 or combination of them. 1687 | ; For example, 7 for overload everything. 1688 | ; 0: No overload 1689 | ; 1: Overload mail() function 1690 | ; 2: Overload str*() functions 1691 | ; 4: Overload ereg*() functions 1692 | ; http://php.net/mbstring.func-overload 1693 | ;mbstring.func_overload = 0 1694 | 1695 | ; enable strict encoding detection. 1696 | ; Default: Off 1697 | ;mbstring.strict_detection = On 1698 | 1699 | ; This directive specifies the regex pattern of content types for which mb_output_handler() 1700 | ; is activated. 1701 | ; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml) 1702 | ;mbstring.http_output_conv_mimetype= 1703 | 1704 | [gd] 1705 | ; Tell the jpeg decode to ignore warnings and try to create 1706 | ; a gd image. The warning will then be displayed as notices 1707 | ; disabled by default 1708 | ; http://php.net/gd.jpeg-ignore-warning 1709 | gd.jpeg_ignore_warning = 0 1710 | 1711 | [exif] 1712 | ; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS. 1713 | ; With mbstring support this will automatically be converted into the encoding 1714 | ; given by corresponding encode setting. When empty mbstring.internal_encoding 1715 | ; is used. For the decode settings you can distinguish between motorola and 1716 | ; intel byte order. A decode setting cannot be empty. 1717 | ; http://php.net/exif.encode-unicode 1718 | exif.encode_unicode = ISO-8859-15 1719 | 1720 | ; http://php.net/exif.decode-unicode-motorola 1721 | ;exif.decode_unicode_motorola = UCS-2BE 1722 | 1723 | ; http://php.net/exif.decode-unicode-intel 1724 | ;exif.decode_unicode_intel = UCS-2LE 1725 | 1726 | ; http://php.net/exif.encode-jis 1727 | ;exif.encode_jis = 1728 | 1729 | ; http://php.net/exif.decode-jis-motorola 1730 | exif.decode_jis_motorola = JIS 1731 | 1732 | ; http://php.net/exif.decode-jis-intel 1733 | exif.decode_jis_intel = JIS 1734 | 1735 | [Tidy] 1736 | ; The path to a default tidy configuration file to use when using tidy 1737 | ; http://php.net/tidy.default-config 1738 | ;tidy.default_config = /usr/local/lib/php/default.tcfg 1739 | 1740 | ; Should tidy clean and repair output automatically? 1741 | ; WARNING: Do not use this option if you are generating non-html content 1742 | ; such as dynamic images 1743 | ; http://php.net/tidy.clean-output 1744 | tidy.clean_output = Off 1745 | 1746 | [soap] 1747 | ; Enables or disables WSDL caching feature. 1748 | ; http://php.net/soap.wsdl-cache-enabled 1749 | soap.wsdl_cache_enabled=1 1750 | 1751 | ; Sets the directory name where SOAP extension will put cache files. 1752 | ; http://php.net/soap.wsdl-cache-dir 1753 | soap.wsdl_cache_dir="/tmp" 1754 | 1755 | ; (time to live) Sets the number of second while cached file will be used 1756 | ; instead of original one. 1757 | ; http://php.net/soap.wsdl-cache-ttl 1758 | soap.wsdl_cache_ttl=86400 1759 | 1760 | ; Sets the size of the cache limit. (Max. number of WSDL files to cache) 1761 | soap.wsdl_cache_limit = 5 1762 | 1763 | [sysvshm] 1764 | ; A default size of the shared memory segment 1765 | ;sysvshm.init_mem = 10000 1766 | 1767 | [ldap] 1768 | ; Sets the maximum number of open links or -1 for unlimited. 1769 | ldap.max_links = -1 1770 | 1771 | [dba] 1772 | ;dba.default_handler= 1773 | 1774 | [opcache] 1775 | ; Determines if Zend OPCache is enabled 1776 | opcache.enable=1 1777 | 1778 | ; Determines if Zend OPCache is enabled for the CLI version of PHP 1779 | opcache.enable_cli=0 1780 | 1781 | ; The OPcache shared memory storage size. 1782 | opcache.memory_consumption=64 1783 | 1784 | ; The amount of memory for interned strings in Mbytes. 1785 | ;opcache.interned_strings_buffer=8 1786 | 1787 | ; The maximum number of keys (scripts) in the OPcache hash table. 1788 | ; Only numbers between 200 and 1000000 are allowed. 1789 | opcache.max_accelerated_files=2000 1790 | 1791 | ; The maximum percentage of "wasted" memory until a restart is scheduled. 1792 | ;opcache.max_wasted_percentage=5 1793 | 1794 | ; When this directive is enabled, the OPcache appends the current working 1795 | ; directory to the script key, thus eliminating possible collisions between 1796 | ; files with the same name (basename). Disabling the directive improves 1797 | ; performance, but may break existing applications. 1798 | ;opcache.use_cwd=1 1799 | 1800 | ; When disabled, you must reset the OPcache manually or restart the 1801 | ; webserver for changes to the filesystem to take effect. 1802 | ;opcache.validate_timestamps=1 1803 | 1804 | ; How often (in seconds) to check file timestamps for changes to the shared 1805 | ; memory storage allocation. ("1" means validate once per second, but only 1806 | ; once per request. "0" means always validate) 1807 | ;opcache.revalidate_freq=2 1808 | 1809 | ; Enables or disables file search in include_path optimization 1810 | ;opcache.revalidate_path=0 1811 | 1812 | ; If disabled, all PHPDoc comments are dropped from the code to reduce the 1813 | ; size of the optimized code. 1814 | ;opcache.save_comments=1 1815 | 1816 | ; Allow file existence override (file_exists, etc.) performance feature. 1817 | ;opcache.enable_file_override=0 1818 | 1819 | ; A bitmask, where each bit enables or disables the appropriate OPcache 1820 | ; passes 1821 | opcache.optimization_level=0x7FFFBFFF 1822 | 1823 | ;opcache.inherited_hack=1 1824 | ;opcache.dups_fix=0 1825 | 1826 | ; The location of the OPcache blacklist file (wildcards allowed). 1827 | ; Each OPcache blacklist file is a text file that holds the names of files 1828 | ; that should not be accelerated. The file format is to add each filename 1829 | ; to a new line. The filename may be a full path or just a file prefix 1830 | ; (i.e., /var/www/x blacklists all the files and directories in /var/www 1831 | ; that start with 'x'). Line starting with a ; are ignored (comments). 1832 | ;opcache.blacklist_filename= 1833 | 1834 | ; Allows exclusion of large files from being cached. By default all files 1835 | ; are cached. 1836 | ;opcache.max_file_size=0 1837 | 1838 | ; Check the cache checksum each N requests. 1839 | ; The default value of "0" means that the checks are disabled. 1840 | ;opcache.consistency_checks=0 1841 | 1842 | ; How long to wait (in seconds) for a scheduled restart to begin if the cache 1843 | ; is not being accessed. 1844 | ;opcache.force_restart_timeout=180 1845 | 1846 | ; OPcache error_log file name. Empty string assumes "stderr". 1847 | ;opcache.error_log= 1848 | 1849 | ; All OPcache errors go to the Web server log. 1850 | ; By default, only fatal errors (level 0) or errors (level 1) are logged. 1851 | ; You can also enable warnings (level 2), info messages (level 3) or 1852 | ; debug messages (level 4). 1853 | ;opcache.log_verbosity_level=1 1854 | 1855 | ; Preferred Shared Memory back-end. Leave empty and let the system decide. 1856 | ;opcache.preferred_memory_model= 1857 | 1858 | ; Protect the shared memory from unexpected writing during script execution. 1859 | ; Useful for internal debugging only. 1860 | ;opcache.protect_memory=0 1861 | 1862 | ; Allows calling OPcache API functions only from PHP scripts which path is 1863 | ; started from specified string. The default "" means no restriction 1864 | ;opcache.restrict_api= 1865 | 1866 | ; Mapping base of shared memory segments (for Windows only). All the PHP 1867 | ; processes have to map shared memory into the same address space. This 1868 | ; directive allows to manually fix the "Unable to reattach to base address" 1869 | ; errors. 1870 | ;opcache.mmap_base= 1871 | 1872 | ; Enables and sets the second level cache directory. 1873 | ; It should improve performance when SHM memory is full, at server restart or 1874 | ; SHM reset. The default "" disables file based caching. 1875 | ;opcache.file_cache= 1876 | 1877 | ; Enables or disables opcode caching in shared memory. 1878 | ;opcache.file_cache_only=0 1879 | 1880 | ; Enables or disables checksum validation when script loaded from file cache. 1881 | ;opcache.file_cache_consistency_checks=1 1882 | 1883 | ; Implies opcache.file_cache_only=1 for a certain process that failed to 1884 | ; reattach to the shared memory (for Windows only). Explicitly enabled file 1885 | ; cache is required. 1886 | ;opcache.file_cache_fallback=1 1887 | 1888 | ; Enables or disables copying of PHP code (text segment) into HUGE PAGES. 1889 | ; This should improve performance, but requires appropriate OS configuration. 1890 | ;opcache.huge_code_pages=1 1891 | 1892 | ; Validate cached file permissions. 1893 | ;opcache.validate_permission=0 1894 | 1895 | ; Prevent name collisions in chroot'ed environment. 1896 | ;opcache.validate_root=0 1897 | 1898 | ; If specified, it produces opcode dumps for debugging different stages of 1899 | ; optimizations. 1900 | ;opcache.opt_debug_level=0 1901 | 1902 | [curl] 1903 | ; A default value for the CURLOPT_CAINFO option. This is required to be an 1904 | ; absolute path. 1905 | ;curl.cainfo = 1906 | 1907 | [openssl] 1908 | ; The location of a Certificate Authority (CA) file on the local filesystem 1909 | ; to use when verifying the identity of SSL/TLS peers. Most users should 1910 | ; not specify a value for this directive as PHP will attempt to use the 1911 | ; OS-managed cert stores in its absence. If specified, this value may still 1912 | ; be overridden on a per-stream basis via the "cafile" SSL stream context 1913 | ; option. 1914 | ;openssl.cafile= 1915 | 1916 | ; If openssl.cafile is not specified or if the CA file is not found, the 1917 | ; directory pointed to by openssl.capath is searched for a suitable 1918 | ; certificate. This value must be a correctly hashed certificate directory. 1919 | ; Most users should not specify a value for this directive as PHP will 1920 | ; attempt to use the OS-managed cert stores in its absence. If specified, 1921 | ; this value may still be overridden on a per-stream basis via the "capath" 1922 | ; SSL stream context option. 1923 | ;openssl.capath= 1924 | 1925 | ; Local Variables: 1926 | ; tab-width: 4 1927 | ; End: 1928 | -------------------------------------------------------------------------------- /php/7.0/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.0-fpm@sha256:8e8644c0fd61424939fff072ca617469550bbb659158301a2dcadf334746a1c2 2 | 3 | LABEL maintainer="Devarshi Sathiya , Riddhesh Sanghvi " 4 | LABEL org.label-schema.schema-version="1.0.0-rc1" 5 | LABEL org.label-schema.vendor="EasyEngine" 6 | LABEL org.label-schema.name="php" 7 | 8 | RUN set -ex; \ 9 | apt-get update; \ 10 | apt-get install -y --no-install-recommends \ 11 | imagemagick \ 12 | less \ 13 | mariadb-client msmtp \ 14 | libc-client-dev \ 15 | libfreetype6-dev \ 16 | libjpeg-dev \ 17 | libjpeg62-turbo-dev \ 18 | libkrb5-dev \ 19 | libmagickwand-dev \ 20 | libmcrypt-dev \ 21 | libmemcached-dev \ 22 | libxml2-dev \ 23 | libpng-dev \ 24 | libzip-dev \ 25 | libssl-dev \ 26 | libicu-dev \ 27 | libwebp-dev \ 28 | tmux \ 29 | unzip \ 30 | vim \ 31 | zip 32 | 33 | RUN pecl install imagick; \ 34 | pecl install memcached; \ 35 | pecl install mcrypt-1.0.3; \ 36 | pecl install redis; \ 37 | docker-php-ext-configure gd --enable-gd-native-ttf --with-freetype-dir=/usr/include/freetype2 --with-png-dir=/usr/include --with-jpeg-dir=/usr/include --with-webp-dir=/usr/include; \ 38 | docker-php-ext-configure zip; \ 39 | docker-php-ext-install gd; \ 40 | PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \ 41 | echo "extension=memcached.so" >> /usr/local/etc/php/conf.d/memcached.ini; \ 42 | docker-php-ext-install imap; \ 43 | docker-php-ext-install mysqli; \ 44 | docker-php-ext-install pdo_mysql; \ 45 | docker-php-ext-install opcache; \ 46 | docker-php-ext-install soap; \ 47 | docker-php-ext-install intl; \ 48 | docker-php-ext-install zip; \ 49 | docker-php-ext-install exif; \ 50 | docker-php-ext-enable imagick mcrypt redis; \ 51 | docker-php-ext-install bcmath; \ 52 | apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ 53 | rm -rf /var/lib/apt/lists/*; 54 | 55 | # set recommended PHP.ini settings 56 | # see https://secure.php.net/manual/en/opcache.installation.php 57 | RUN { \ 58 | echo 'opcache.memory_consumption=128'; \ 59 | echo 'opcache.interned_strings_buffer=8'; \ 60 | echo 'opcache.max_accelerated_files=4000'; \ 61 | echo 'opcache.revalidate_freq=2'; \ 62 | echo 'opcache.fast_shutdown=1'; \ 63 | echo 'opcache.enable_cli=1'; \ 64 | } > /usr/local/etc/php/conf.d/opcache-recommended.ini 65 | 66 | # Donwload and install composer 67 | RUN curl -sSL "https://getcomposer.org/installer" | php \ 68 | && mv composer.phar /usr/local/bin/composer 69 | 70 | # Install wp-cli 71 | RUN curl -O "https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar" \ 72 | && chmod +x wp-cli.phar \ 73 | && mv wp-cli.phar /usr/local/bin/wp 74 | 75 | # Setup a config file 76 | RUN mkdir -p /etc/wp-cli 77 | RUN { \ 78 | echo 'path: /var/www/htdocs'; \ 79 | } > /etc/wp-cli/config.yml 80 | 81 | RUN mkdir /usr/local/etc/misc && \ 82 | touch /usr/local/etc/misc/msmtprc && \ 83 | ln -s /usr/local/etc/misc/msmtprc /etc/msmtprc && \ 84 | chown www-data:www-data /usr/local/etc/misc/msmtprc && \ 85 | chown www-data:www-data /etc/msmtprc 86 | 87 | RUN latest_build=$(curl -s https://download.newrelic.com/php_agent/release/ | grep 'linux.tar.gz' | sed 's/.*"\(.*\)".*/\1/') && \ 88 | curl -L "https://download.newrelic.com$latest_build" | tar -C /tmp -zx && \ 89 | export NR_INSTALL_USE_CP_NOT_LN=1 && \ 90 | export NR_INSTALL_SILENT=1 && \ 91 | /tmp/newrelic-php5-*/newrelic-install install && \ 92 | rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* 93 | 94 | ENV NR_PORT=/run/newrelic/newrelic.sock 95 | 96 | 97 | # Setup logs 98 | RUN mkdir -p /var/log/php; \ 99 | chown -R www-data: /var/log/php; \ 100 | rm /usr/local/etc/php-fpm.d/*; \ 101 | mv /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini 102 | COPY easyengine.conf /usr/local/etc/php-fpm.d/easyengine.conf 103 | 104 | COPY expose_off.ini /usr/local/etc/php/conf.d/expose_off.ini 105 | COPY bashrc /root/.bashrc 106 | COPY bashrc /var/www/.bashrc 107 | COPY docker-entrypoint.sh /usr/local/bin/ 108 | COPY newrelic.ini /usr/local/etc/php/conf.d/newrelic.ini 109 | 110 | WORKDIR /var/www/htdocs 111 | RUN usermod -s /bin/bash www-data 112 | USER www-data 113 | 114 | ENTRYPOINT ["docker-entrypoint.sh"] 115 | CMD ["php-fpm"] 116 | -------------------------------------------------------------------------------- /php/7.0/bashrc: -------------------------------------------------------------------------------- 1 | PS1="\`if [ \$? = 0 ]; then echo \[\e[37m\]^_^[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; else echo \[\e[31m\]O_O[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; fi\`" 2 | export HISTTIMEFORMAT="%d/%m/%y %T " -------------------------------------------------------------------------------- /php/7.0/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | exec "$@" 5 | -------------------------------------------------------------------------------- /php/7.0/easyengine.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | error_log = /var/log/php/error.log 3 | daemonize = no 4 | 5 | [www] 6 | ping.path = /ee-admin/ping 7 | pm.status_path = /ee-admin/status 8 | request_terminate_timeout = 300 9 | user = www-data 10 | group = www-data 11 | pm = ondemand 12 | pm.max_children = 20 13 | listen = 9000 14 | ; if we send this to /proc/self/fd/1, it never appears 15 | access.log = /var/log/php/access.log 16 | 17 | clear_env = no 18 | 19 | ; Ensure worker stdout and stderr are sent to the main error log. 20 | catch_workers_output = yes -------------------------------------------------------------------------------- /php/7.0/expose_off.ini: -------------------------------------------------------------------------------- 1 | expose_php = Off -------------------------------------------------------------------------------- /php/7.0/newrelic.ini: -------------------------------------------------------------------------------- 1 | ; This file contains the various settings for the New Relic PHP agent. There 2 | ; are many options, all of which are described in detail at the following URL: 3 | ; https://docs.newrelic.com/docs/agents/php-agent/configuration/php-agent-configuration 4 | ; 5 | 6 | extension = "newrelic.so" 7 | 8 | [newrelic] 9 | newrelic.license = "REPLACE_WITH_REAL_KEY" 10 | newrelic.appname = "PHP Application" 11 | newrelic.logfile = "/var/log/newrelic/php_agent.log" 12 | newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log" 13 | newrelic.daemon.port = "/run/newrelic/newrelic.sock" 14 | newrelic.transaction_tracer.record_sql = "raw" 15 | newrelic.transaction_tracer.threshold = "1s" 16 | newrelic.browser_monitoring.auto_instrument = 0 17 | newrelic.application_logging.forwarding.log_level = error 18 | newrelic.daemon.dont_launch = 3 19 | -------------------------------------------------------------------------------- /php/7.2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.2-fpm@sha256:a8d1ebf6390aa47574fd8aec875d907a4fa1169de8c88bd256890921e6454436 2 | 3 | LABEL maintainer="Devarshi Sathiya , Riddhesh Sanghvi " 4 | LABEL org.label-schema.schema-version="1.0.0-rc1" 5 | LABEL org.label-schema.vendor="EasyEngine" 6 | LABEL org.label-schema.name="php" 7 | 8 | RUN set -ex; \ 9 | apt-get update; \ 10 | apt-get install -y --no-install-recommends \ 11 | imagemagick \ 12 | less \ 13 | mariadb-client msmtp \ 14 | libc-client-dev \ 15 | libfreetype6-dev \ 16 | libjpeg-dev \ 17 | libjpeg62-turbo-dev \ 18 | libkrb5-dev \ 19 | libmagickwand-dev \ 20 | libmcrypt-dev \ 21 | libmemcached-dev \ 22 | libxml2-dev \ 23 | libpng-dev \ 24 | libzip-dev \ 25 | libssl-dev \ 26 | libicu-dev \ 27 | libwebp-dev \ 28 | tmux \ 29 | unzip \ 30 | vim \ 31 | zip 32 | 33 | RUN pecl install imagick; \ 34 | pecl install memcached; \ 35 | pecl install mcrypt-1.0.3; \ 36 | pecl install redis; \ 37 | docker-php-ext-configure gd --with-freetype-dir=/usr/include/freetype2 --with-png-dir=/usr/include --with-jpeg-dir=/usr/include --with-webp-dir=/usr/include; \ 38 | docker-php-ext-configure zip; \ 39 | docker-php-ext-install gd; \ 40 | PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \ 41 | echo "extension=memcached.so" >> /usr/local/etc/php/conf.d/memcached.ini; \ 42 | docker-php-ext-install imap; \ 43 | docker-php-ext-install mysqli; \ 44 | docker-php-ext-install pdo_mysql; \ 45 | docker-php-ext-install opcache; \ 46 | docker-php-ext-install soap; \ 47 | docker-php-ext-install intl; \ 48 | docker-php-ext-install zip; \ 49 | docker-php-ext-install exif; \ 50 | docker-php-ext-enable imagick mcrypt redis; \ 51 | docker-php-ext-install bcmath; \ 52 | apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ 53 | rm -rf /var/lib/apt/lists/*; 54 | 55 | RUN mkdir -p /usr/src/php/ext; \ 56 | cd /usr/src/php/ext/; \ 57 | curl -sSL -o php7.zip https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip; \ 58 | unzip php7.zip; \ 59 | mv pecl-memcache-NON_BLOCKING_IO_php7 memcache; \ 60 | rm -rf /tmp/pecl-memcache-php7 /usr/src/php/ext/php7.zip; \ 61 | docker-php-ext-configure memcache --with-php-config=/usr/local/bin/php-config; \ 62 | docker-php-ext-install memcache; 63 | 64 | # set recommended PHP.ini settings 65 | # see https://secure.php.net/manual/en/opcache.installation.php 66 | RUN { \ 67 | echo 'opcache.memory_consumption=128'; \ 68 | echo 'opcache.interned_strings_buffer=8'; \ 69 | echo 'opcache.max_accelerated_files=4000'; \ 70 | echo 'opcache.revalidate_freq=2'; \ 71 | echo 'opcache.fast_shutdown=1'; \ 72 | echo 'opcache.enable_cli=1'; \ 73 | } > /usr/local/etc/php/conf.d/opcache-recommended.ini 74 | 75 | # Donwload and install composer 76 | RUN curl -sSL "https://getcomposer.org/installer" | php \ 77 | && mv composer.phar /usr/local/bin/composer 78 | 79 | # Install wp-cli 80 | RUN curl -O "https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar" \ 81 | && chmod +x wp-cli.phar \ 82 | && mv wp-cli.phar /usr/local/bin/wp 83 | 84 | # Setup a config file 85 | RUN mkdir -p /etc/wp-cli 86 | RUN { \ 87 | echo 'path: /var/www/htdocs'; \ 88 | } > /etc/wp-cli/config.yml 89 | 90 | RUN mkdir /usr/local/etc/misc && \ 91 | touch /usr/local/etc/misc/msmtprc && \ 92 | ln -s /usr/local/etc/misc/msmtprc /etc/msmtprc && \ 93 | chown www-data:www-data /usr/local/etc/misc/msmtprc && \ 94 | chown www-data:www-data /etc/msmtprc 95 | 96 | RUN latest_build=$(curl -s https://download.newrelic.com/php_agent/release/ | grep 'linux.tar.gz' | sed 's/.*"\(.*\)".*/\1/') && \ 97 | curl -L "https://download.newrelic.com$latest_build" | tar -C /tmp -zx && \ 98 | export NR_INSTALL_USE_CP_NOT_LN=1 && \ 99 | export NR_INSTALL_SILENT=1 && \ 100 | /tmp/newrelic-php5-*/newrelic-install install && \ 101 | rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* 102 | 103 | ENV NR_PORT=/run/newrelic/newrelic.sock 104 | 105 | 106 | # Setup logs 107 | RUN mkdir -p /var/log/php; \ 108 | chown -R www-data: /var/log/php; \ 109 | rm /usr/local/etc/php-fpm.d/*; 110 | COPY php.ini /usr/local/etc/php/php.ini 111 | COPY easyengine.conf /usr/local/etc/php-fpm.d/easyengine.conf 112 | 113 | COPY expose_off.ini /usr/local/etc/php/conf.d/expose_off.ini 114 | COPY bashrc /root/.bashrc 115 | COPY bashrc /var/www/.bashrc 116 | COPY docker-entrypoint.sh /usr/local/bin/ 117 | COPY newrelic.ini /usr/local/etc/php/conf.d/newrelic.ini 118 | 119 | WORKDIR /var/www/htdocs 120 | RUN usermod -s /bin/bash www-data 121 | USER www-data 122 | 123 | ENTRYPOINT ["docker-entrypoint.sh"] 124 | CMD ["php-fpm"] 125 | -------------------------------------------------------------------------------- /php/7.2/bashrc: -------------------------------------------------------------------------------- 1 | PS1="\`if [ \$? = 0 ]; then echo \[\e[37m\]^_^[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; else echo \[\e[31m\]O_O[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; fi\`" 2 | export HISTTIMEFORMAT="%d/%m/%y %T " -------------------------------------------------------------------------------- /php/7.2/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail -o nounset 3 | 4 | if [[ -z "${NEWRELIC_LICENSE_KEY:-}" ]] || [[ -z "${NEWRELIC_APPNAME:-}" ]]; then 5 | : 6 | else 7 | sed -i -e "s/\"REPLACE_WITH_REAL_KEY\"/\"$NEWRELIC_LICENSE_KEY\"/" \ 8 | -e "s/newrelic.appname = \"PHP Application\"/newrelic.appname = \"$NEWRELIC_APPNAME\"/" \ 9 | /usr/local/etc/php/conf.d/newrelic.ini 10 | fi 11 | 12 | exec "$@" 13 | -------------------------------------------------------------------------------- /php/7.2/easyengine.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | error_log = /var/log/php/error.log 3 | daemonize = no 4 | 5 | [www] 6 | ping.path = /ee-admin/ping 7 | pm.status_path = /ee-admin/status 8 | request_terminate_timeout = 300 9 | user = www-data 10 | group = www-data 11 | pm = ondemand 12 | pm.max_children = 20 13 | listen = 9000 14 | ; if we send this to /proc/self/fd/1, it never appears 15 | access.log = /var/log/php/access.log 16 | 17 | clear_env = no 18 | 19 | ; Ensure worker stdout and stderr are sent to the main error log. 20 | catch_workers_output = yes -------------------------------------------------------------------------------- /php/7.2/expose_off.ini: -------------------------------------------------------------------------------- 1 | expose_php = Off -------------------------------------------------------------------------------- /php/7.2/newrelic.ini: -------------------------------------------------------------------------------- 1 | ; This file contains the various settings for the New Relic PHP agent. There 2 | ; are many options, all of which are described in detail at the following URL: 3 | ; https://docs.newrelic.com/docs/agents/php-agent/configuration/php-agent-configuration 4 | ; 5 | 6 | extension = "newrelic.so" 7 | 8 | [newrelic] 9 | newrelic.license = "REPLACE_WITH_REAL_KEY" 10 | newrelic.appname = "PHP Application" 11 | newrelic.logfile = "/var/log/newrelic/php_agent.log" 12 | newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log" 13 | newrelic.daemon.port = "/run/newrelic/newrelic.sock" 14 | newrelic.transaction_tracer.record_sql = "raw" 15 | newrelic.transaction_tracer.threshold = "1s" 16 | newrelic.browser_monitoring.auto_instrument = 0 17 | newrelic.application_logging.forwarding.log_level = error 18 | newrelic.daemon.dont_launch = 3 19 | -------------------------------------------------------------------------------- /php/7.3/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.3-fpm@sha256:a810876c96407cbbddef949379d2057f4f85d5c1d892dcf2c8d9503239549990 2 | 3 | LABEL maintainer="Devarshi Sathiya , Riddhesh Sanghvi " 4 | LABEL org.label-schema.schema-version="1.0.0" 5 | LABEL org.label-schema.vendor="EasyEngine" 6 | LABEL org.label-schema.name="php" 7 | 8 | RUN set -ex; \ 9 | apt-get update; \ 10 | apt-get install -y --no-install-recommends \ 11 | imagemagick \ 12 | less \ 13 | mariadb-client msmtp \ 14 | libc-client-dev \ 15 | libfreetype6-dev \ 16 | libjpeg-dev \ 17 | libjpeg62-turbo-dev \ 18 | libkrb5-dev \ 19 | libmagickwand-dev \ 20 | libgraphicsmagick1-dev \ 21 | libmcrypt-dev \ 22 | libmemcached-dev \ 23 | libxml2-dev \ 24 | libpng-dev \ 25 | libzip-dev \ 26 | libssl-dev \ 27 | libgmp-dev \ 28 | libicu-dev \ 29 | libwebp-dev \ 30 | tmux \ 31 | unzip \ 32 | vim \ 33 | zip 34 | 35 | RUN pecl install imagick; \ 36 | pecl install memcached; \ 37 | pecl install mcrypt; \ 38 | pecl install redis; \ 39 | pecl install apcu; \ 40 | pecl install gmagick-2.0.6RC1; \ 41 | pecl install timezonedb; \ 42 | docker-php-ext-configure gd --with-freetype-dir=/usr/include/freetype2 --with-png-dir=/usr/include --with-jpeg-dir=/usr/include --with-webp; \ 43 | docker-php-ext-configure zip; \ 44 | docker-php-ext-install gd; \ 45 | PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \ 46 | docker-php-ext-install imap; \ 47 | docker-php-ext-install mysqli; \ 48 | docker-php-ext-install pdo_mysql; \ 49 | docker-php-ext-install opcache; \ 50 | docker-php-ext-install soap; \ 51 | docker-php-ext-install intl; \ 52 | docker-php-ext-install zip; \ 53 | docker-php-ext-install exif; \ 54 | docker-php-ext-install calendar; \ 55 | docker-php-ext-install gmp; \ 56 | docker-php-ext-install pcntl; \ 57 | docker-php-ext-install shmop; \ 58 | docker-php-ext-install sockets; \ 59 | docker-php-ext-install sysvsem; \ 60 | docker-php-ext-install sysvshm; \ 61 | docker-php-ext-install bcmath; \ 62 | docker-php-ext-enable imagick mcrypt redis timezonedb apcu; \ 63 | echo "extension=memcached.so" >> /usr/local/etc/php/conf.d/memcached.ini; \ 64 | echo "extension=gmagick.so" >> /usr/local/etc/php/conf.d/gmagick.ini; \ 65 | apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ 66 | rm -rf /var/lib/apt/lists/*; 67 | 68 | # set recommended PHP.ini settings 69 | # see https://secure.php.net/manual/en/opcache.installation.php 70 | RUN { \ 71 | echo 'opcache.memory_consumption=128'; \ 72 | echo 'opcache.interned_strings_buffer=8'; \ 73 | echo 'opcache.max_accelerated_files=4000'; \ 74 | echo 'opcache.revalidate_freq=2'; \ 75 | echo 'opcache.fast_shutdown=1'; \ 76 | echo 'opcache.enable_cli=1'; \ 77 | } > /usr/local/etc/php/conf.d/opcache-recommended.ini 78 | 79 | # Donwload and install composer 80 | RUN curl -sSL "https://getcomposer.org/installer" | php \ 81 | && mv composer.phar /usr/local/bin/composer 82 | 83 | # Install wp-cli 84 | RUN curl -O "https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar" \ 85 | && chmod +x wp-cli.phar \ 86 | && mv wp-cli.phar /usr/local/bin/wp 87 | 88 | # Setup a config file 89 | RUN mkdir -p /etc/wp-cli 90 | RUN { \ 91 | echo 'path: /var/www/htdocs'; \ 92 | } > /etc/wp-cli/config.yml 93 | 94 | RUN mkdir /usr/local/etc/misc && \ 95 | touch /usr/local/etc/misc/msmtprc && \ 96 | ln -s /usr/local/etc/misc/msmtprc /etc/msmtprc && \ 97 | chown www-data:www-data /usr/local/etc/misc/msmtprc && \ 98 | chown www-data:www-data /etc/msmtprc 99 | 100 | RUN latest_build=$(curl -s https://download.newrelic.com/php_agent/release/ | grep 'linux.tar.gz' | sed 's/.*"\(.*\)".*/\1/') && \ 101 | curl -L "https://download.newrelic.com$latest_build" | tar -C /tmp -zx && \ 102 | export NR_INSTALL_USE_CP_NOT_LN=1 && \ 103 | export NR_INSTALL_SILENT=1 && \ 104 | /tmp/newrelic-php5-*/newrelic-install install && \ 105 | rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* 106 | 107 | ENV NR_PORT=/run/newrelic/newrelic.sock 108 | 109 | 110 | # Setup logs 111 | RUN mkdir -p /var/log/php; \ 112 | chown -R www-data: /var/log/php; \ 113 | rm /usr/local/etc/php-fpm.d/*; 114 | COPY php.ini /usr/local/etc/php/php.ini 115 | COPY easyengine.conf /usr/local/etc/php-fpm.d/easyengine.conf 116 | 117 | COPY expose_off.ini /usr/local/etc/php/conf.d/expose_off.ini 118 | COPY bashrc /root/.bashrc 119 | COPY bashrc /var/www/.bashrc 120 | COPY docker-entrypoint.sh /usr/local/bin/ 121 | COPY newrelic.ini /usr/local/etc/php/conf.d/newrelic.ini 122 | 123 | WORKDIR /var/www/htdocs 124 | RUN usermod -s /bin/bash www-data 125 | USER www-data 126 | 127 | ENTRYPOINT ["docker-entrypoint.sh"] 128 | CMD ["php-fpm"] 129 | -------------------------------------------------------------------------------- /php/7.3/bashrc: -------------------------------------------------------------------------------- 1 | PS1="\`if [ \$? = 0 ]; then echo \[\e[37m\]^_^[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; else echo \[\e[31m\]O_O[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; fi\`" 2 | export HISTTIMEFORMAT="%d/%m/%y %T " -------------------------------------------------------------------------------- /php/7.3/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail -o nounset 3 | 4 | if [[ -z "${NEWRELIC_LICENSE_KEY:-}" ]] || [[ -z "${NEWRELIC_APPNAME:-}" ]]; then 5 | : 6 | else 7 | sed -i -e "s/\"REPLACE_WITH_REAL_KEY\"/\"$NEWRELIC_LICENSE_KEY\"/" \ 8 | -e "s/newrelic.appname = \"PHP Application\"/newrelic.appname = \"$NEWRELIC_APPNAME\"/" \ 9 | /usr/local/etc/php/conf.d/newrelic.ini 10 | fi 11 | 12 | exec "$@" 13 | -------------------------------------------------------------------------------- /php/7.3/easyengine.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | error_log = /var/log/php/error.log 3 | daemonize = no 4 | 5 | [www] 6 | ping.path = /ee-admin/ping 7 | pm.status_path = /ee-admin/status 8 | request_terminate_timeout = 300 9 | user = www-data 10 | group = www-data 11 | pm = ondemand 12 | pm.max_children = 20 13 | listen = 9000 14 | ; if we send this to /proc/self/fd/1, it never appears 15 | access.log = /var/log/php/access.log 16 | 17 | clear_env = no 18 | 19 | ; Ensure worker stdout and stderr are sent to the main error log. 20 | catch_workers_output = yes -------------------------------------------------------------------------------- /php/7.3/expose_off.ini: -------------------------------------------------------------------------------- 1 | expose_php = Off -------------------------------------------------------------------------------- /php/7.3/newrelic.ini: -------------------------------------------------------------------------------- 1 | ; This file contains the various settings for the New Relic PHP agent. There 2 | ; are many options, all of which are described in detail at the following URL: 3 | ; https://docs.newrelic.com/docs/agents/php-agent/configuration/php-agent-configuration 4 | ; 5 | 6 | extension = "newrelic.so" 7 | 8 | [newrelic] 9 | newrelic.license = "REPLACE_WITH_REAL_KEY" 10 | newrelic.appname = "PHP Application" 11 | newrelic.logfile = "/var/log/newrelic/php_agent.log" 12 | newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log" 13 | newrelic.daemon.port = "/run/newrelic/newrelic.sock" 14 | newrelic.transaction_tracer.record_sql = "raw" 15 | newrelic.transaction_tracer.threshold = "1s" 16 | newrelic.browser_monitoring.auto_instrument = 0 17 | newrelic.application_logging.forwarding.log_level = error 18 | newrelic.daemon.dont_launch = 3 19 | -------------------------------------------------------------------------------- /php/7.4/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.4.33-fpm 2 | 3 | LABEL maintainer="Devarshi Sathiya , Riddhesh Sanghvi " 4 | LABEL org.label-schema.schema-version="1.0.0" 5 | LABEL org.label-schema.vendor="EasyEngine" 6 | LABEL org.label-schema.name="php" 7 | 8 | RUN set -ex; \ 9 | apt-get update; \ 10 | apt-get install -y --no-install-recommends \ 11 | imagemagick \ 12 | less \ 13 | mariadb-client msmtp \ 14 | libc-client-dev \ 15 | libfreetype6-dev \ 16 | libjpeg-dev \ 17 | libjpeg62-turbo-dev \ 18 | libkrb5-dev \ 19 | libmagickwand-dev \ 20 | libgraphicsmagick1-dev \ 21 | libmcrypt-dev \ 22 | libicu-dev \ 23 | libmemcached-dev \ 24 | libxml2-dev \ 25 | libpng-dev \ 26 | libzip-dev \ 27 | libssl-dev \ 28 | libgmp-dev \ 29 | tmux \ 30 | unzip \ 31 | vim \ 32 | zip 33 | 34 | RUN pecl install imagick; \ 35 | pecl install memcached; \ 36 | pecl install mcrypt; \ 37 | pecl install redis; \ 38 | pecl install apcu; \ 39 | pecl install gmagick-2.0.6RC1; \ 40 | pecl install timezonedb; \ 41 | docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ 42 | docker-php-ext-configure zip; \ 43 | docker-php-ext-install gd; \ 44 | PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \ 45 | docker-php-ext-install imap; \ 46 | docker-php-ext-install mysqli; \ 47 | docker-php-ext-install pdo_mysql; \ 48 | docker-php-ext-install opcache; \ 49 | docker-php-ext-install soap; \ 50 | docker-php-ext-install intl; \ 51 | docker-php-ext-install zip; \ 52 | docker-php-ext-install exif; \ 53 | docker-php-ext-install calendar; \ 54 | docker-php-ext-install gmp; \ 55 | docker-php-ext-install pcntl; \ 56 | docker-php-ext-install shmop; \ 57 | docker-php-ext-install sockets; \ 58 | docker-php-ext-install sysvsem; \ 59 | docker-php-ext-install sysvshm; \ 60 | docker-php-ext-install bcmath; \ 61 | docker-php-ext-enable imagick mcrypt redis timezonedb apcu; \ 62 | echo "extension=memcached.so" >> /usr/local/etc/php/conf.d/memcached.ini; \ 63 | echo "extension=gmagick.so" >> /usr/local/etc/php/conf.d/gmagick.ini; \ 64 | apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ 65 | rm -rf /var/lib/apt/lists/*; 66 | 67 | # set recommended PHP.ini settings 68 | # see https://secure.php.net/manual/en/opcache.installation.php 69 | RUN { \ 70 | echo 'opcache.memory_consumption=128'; \ 71 | echo 'opcache.interned_strings_buffer=8'; \ 72 | echo 'opcache.max_accelerated_files=4000'; \ 73 | echo 'opcache.revalidate_freq=2'; \ 74 | echo 'opcache.fast_shutdown=1'; \ 75 | echo 'opcache.enable_cli=1'; \ 76 | } > /usr/local/etc/php/conf.d/opcache-recommended.ini 77 | 78 | # Donwload and install composer 79 | RUN curl -sSL "https://getcomposer.org/installer" | php \ 80 | && mv composer.phar /usr/local/bin/composer 81 | 82 | # Install wp-cli 83 | RUN curl -O "https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar" \ 84 | && chmod +x wp-cli.phar \ 85 | && mv wp-cli.phar /usr/local/bin/wp 86 | 87 | # Setup a config file 88 | RUN mkdir -p /etc/wp-cli 89 | RUN { \ 90 | echo 'path: /var/www/htdocs'; \ 91 | } > /etc/wp-cli/config.yml 92 | 93 | RUN mkdir /usr/local/etc/misc && \ 94 | touch /usr/local/etc/misc/msmtprc && \ 95 | ln -s /usr/local/etc/misc/msmtprc /etc/msmtprc && \ 96 | chown www-data:www-data /usr/local/etc/misc/msmtprc && \ 97 | chown www-data:www-data /etc/msmtprc 98 | 99 | RUN latest_build=$(curl -s https://download.newrelic.com/php_agent/release/ | grep 'linux.tar.gz' | sed 's/.*"\(.*\)".*/\1/') && \ 100 | curl -L "https://download.newrelic.com$latest_build" | tar -C /tmp -zx && \ 101 | export NR_INSTALL_USE_CP_NOT_LN=1 && \ 102 | export NR_INSTALL_SILENT=1 && \ 103 | /tmp/newrelic-php5-*/newrelic-install install && \ 104 | rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* 105 | 106 | ENV NR_PORT=/run/newrelic/newrelic.sock 107 | 108 | 109 | # Setup logs 110 | RUN mkdir -p /var/log/php; \ 111 | chown -R www-data: /var/log/php; \ 112 | rm /usr/local/etc/php-fpm.d/*; 113 | COPY php.ini /usr/local/etc/php/php.ini 114 | COPY easyengine.conf /usr/local/etc/php-fpm.d/easyengine.conf 115 | 116 | COPY expose_off.ini /usr/local/etc/php/conf.d/expose_off.ini 117 | COPY bashrc /root/.bashrc 118 | COPY bashrc /var/www/.bashrc 119 | COPY docker-entrypoint.sh /usr/local/bin/ 120 | COPY newrelic.ini /usr/local/etc/php/conf.d/newrelic.ini 121 | COPY newrelic.ini /data/newrelic.ini 122 | 123 | WORKDIR /var/www/htdocs 124 | RUN usermod -s /bin/bash www-data 125 | USER www-data 126 | 127 | ENTRYPOINT ["docker-entrypoint.sh"] 128 | CMD ["php-fpm"] 129 | -------------------------------------------------------------------------------- /php/7.4/bashrc: -------------------------------------------------------------------------------- 1 | PS1="\`if [ \$? = 0 ]; then echo \[\e[37m\]^_^[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; else echo \[\e[31m\]O_O[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; fi\`" 2 | export HISTTIMEFORMAT="%d/%m/%y %T " -------------------------------------------------------------------------------- /php/7.4/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail -o nounset 3 | 4 | if [[ -z "${NEWRELIC_LICENSE_KEY:-}" ]] || [[ -z "${NEWRELIC_APPNAME:-}" ]]; then 5 | : 6 | else 7 | cp /data/newrelic.ini /usr/local/etc/php/conf.d/newrelic.ini 8 | sed -i -e "s/\"REPLACE_WITH_REAL_KEY\"/\"$NEWRELIC_LICENSE_KEY\"/" \ 9 | -e "s/newrelic.appname = \"PHP Application\"/newrelic.appname = \"$NEWRELIC_APPNAME\"/" \ 10 | /usr/local/etc/php/conf.d/newrelic.ini 11 | fi 12 | 13 | exec "$@" 14 | -------------------------------------------------------------------------------- /php/7.4/easyengine.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | error_log = /var/log/php/error.log 3 | daemonize = no 4 | 5 | [www] 6 | ping.path = /ee-admin/ping 7 | pm.status_path = /ee-admin/status 8 | request_terminate_timeout = 300 9 | user = www-data 10 | group = www-data 11 | pm = ondemand 12 | pm.max_children = 20 13 | listen = 9000 14 | ; if we send this to /proc/self/fd/1, it never appears 15 | access.log = /var/log/php/access.log 16 | 17 | clear_env = no 18 | 19 | ; Ensure worker stdout and stderr are sent to the main error log. 20 | catch_workers_output = yes -------------------------------------------------------------------------------- /php/7.4/expose_off.ini: -------------------------------------------------------------------------------- 1 | expose_php = Off -------------------------------------------------------------------------------- /php/7.4/newrelic.ini: -------------------------------------------------------------------------------- 1 | ; This file contains the various settings for the New Relic PHP agent. There 2 | ; are many options, all of which are described in detail at the following URL: 3 | ; https://docs.newrelic.com/docs/agents/php-agent/configuration/php-agent-configuration 4 | ; Additional options added from https://github.com/newrelic/newrelic-php-agent/issues/577#issue-1435830462 5 | 6 | extension = "newrelic.so" 7 | 8 | [newrelic] 9 | newrelic.license = "REPLACE_WITH_REAL_KEY" 10 | newrelic.appname = "PHP Application" 11 | newrelic.logfile = "/var/log/newrelic/php_agent.log" 12 | newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log" 13 | newrelic.daemon.port = "/run/newrelic/newrelic.sock" 14 | newrelic.transaction_tracer.record_sql = "raw" 15 | newrelic.transaction_tracer.threshold = "1s" 16 | newrelic.browser_monitoring.auto_instrument = 0 17 | newrelic.application_logging.forwarding.log_level = error 18 | newrelic.daemon.dont_launch = 3 19 | newrelic.cross_application_tracer.enabled = false 20 | newrelic.distributed_tracing_enabled = false 21 | newrelic.span_events_enabled = false 22 | newrelic.application_logging.enabled = false 23 | newrelic.application_logging.forwarding.enabled = false 24 | newrelic.application_logging.metrics.enabled = false 25 | -------------------------------------------------------------------------------- /php/8.0/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.0.30-fpm 2 | 3 | LABEL maintainer="Riddhesh Sanghvi , Devarshi Sathiya " 4 | LABEL org.label-schema.schema-version="1.0.0" 5 | LABEL org.label-schema.vendor="EasyEngine" 6 | LABEL org.label-schema.name="php" 7 | 8 | RUN set -ex; \ 9 | apt-get update; \ 10 | apt-get install -y --no-install-recommends \ 11 | imagemagick \ 12 | less \ 13 | mariadb-client msmtp \ 14 | libc-client-dev \ 15 | libfreetype6-dev \ 16 | libjpeg-dev \ 17 | libjpeg62-turbo-dev \ 18 | libkrb5-dev \ 19 | libmagickwand-dev \ 20 | libgraphicsmagick1-dev \ 21 | libmcrypt-dev \ 22 | libicu-dev \ 23 | libmemcached-dev \ 24 | libxml2-dev \ 25 | libpng-dev \ 26 | libzip-dev \ 27 | libssl-dev \ 28 | libgmp-dev \ 29 | tmux \ 30 | unzip \ 31 | vim \ 32 | zip 33 | 34 | RUN pecl install imagick; \ 35 | pecl install memcached; \ 36 | pecl install redis; \ 37 | pecl install apcu; \ 38 | pecl install mcrypt; \ 39 | pecl install gmagick-2.0.6RC1; \ 40 | pecl install timezonedb; \ 41 | docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ 42 | docker-php-ext-configure zip; \ 43 | docker-php-ext-install gd; \ 44 | PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \ 45 | docker-php-ext-install imap; \ 46 | docker-php-ext-install mysqli; \ 47 | docker-php-ext-install pdo_mysql; \ 48 | docker-php-ext-install opcache; \ 49 | docker-php-ext-install soap; \ 50 | docker-php-ext-install intl; \ 51 | docker-php-ext-install zip; \ 52 | docker-php-ext-install exif; \ 53 | docker-php-ext-install calendar; \ 54 | docker-php-ext-install gmp; \ 55 | docker-php-ext-install pcntl; \ 56 | docker-php-ext-install shmop; \ 57 | docker-php-ext-install sockets; \ 58 | docker-php-ext-install sysvsem; \ 59 | docker-php-ext-install sysvshm; \ 60 | docker-php-ext-install bcmath; \ 61 | docker-php-ext-enable imagick mcrypt redis timezonedb apcu; \ 62 | echo "extension=memcached.so" >> /usr/local/etc/php/conf.d/memcached.ini; \ 63 | echo "extension=gmagick.so" >> /usr/local/etc/php/conf.d/gmagick.ini; \ 64 | apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ 65 | rm -rf /var/lib/apt/lists/*; 66 | 67 | # set recommended PHP.ini settings 68 | # see https://secure.php.net/manual/en/opcache.installation.php 69 | RUN { \ 70 | echo 'opcache.memory_consumption=128'; \ 71 | echo 'opcache.interned_strings_buffer=8'; \ 72 | echo 'opcache.max_accelerated_files=4000'; \ 73 | echo 'opcache.revalidate_freq=2'; \ 74 | echo 'opcache.fast_shutdown=1'; \ 75 | echo 'opcache.enable_cli=1'; \ 76 | } > /usr/local/etc/php/conf.d/opcache-recommended.ini 77 | 78 | # Donwload and install composer 79 | RUN curl -sSL "https://getcomposer.org/installer" | php \ 80 | && mv composer.phar /usr/local/bin/composer 81 | 82 | # Install wp-cli 83 | RUN curl -O "https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar" \ 84 | && chmod +x wp-cli.phar \ 85 | && mv wp-cli.phar /usr/local/bin/wp 86 | 87 | # Setup a config file 88 | RUN mkdir -p /etc/wp-cli 89 | RUN { \ 90 | echo 'path: /var/www/htdocs'; \ 91 | } > /etc/wp-cli/config.yml 92 | 93 | RUN mkdir /usr/local/etc/misc && \ 94 | touch /usr/local/etc/misc/msmtprc && \ 95 | ln -s /usr/local/etc/misc/msmtprc /etc/msmtprc && \ 96 | chown www-data:www-data /usr/local/etc/misc/msmtprc && \ 97 | chown www-data:www-data /etc/msmtprc 98 | 99 | RUN latest_build=$(curl -s https://download.newrelic.com/php_agent/release/ | grep 'linux.tar.gz' | sed 's/.*"\(.*\)".*/\1/') && \ 100 | curl -L "https://download.newrelic.com$latest_build" | tar -C /tmp -zx && \ 101 | export NR_INSTALL_USE_CP_NOT_LN=1 && \ 102 | export NR_INSTALL_SILENT=1 && \ 103 | /tmp/newrelic-php5-*/newrelic-install install && \ 104 | rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* 105 | 106 | ENV NR_PORT=/run/newrelic/newrelic.sock 107 | 108 | 109 | # Setup logs 110 | RUN mkdir -p /var/log/php; \ 111 | chown -R www-data: /var/log/php; \ 112 | rm /usr/local/etc/php-fpm.d/*; 113 | COPY php.ini /usr/local/etc/php/php.ini 114 | COPY easyengine.conf /usr/local/etc/php-fpm.d/easyengine.conf 115 | 116 | COPY expose_off.ini /usr/local/etc/php/conf.d/expose_off.ini 117 | COPY bashrc /root/.bashrc 118 | COPY bashrc /var/www/.bashrc 119 | COPY docker-entrypoint.sh /usr/local/bin/ 120 | COPY newrelic.ini /usr/local/etc/php/conf.d/newrelic.ini 121 | COPY newrelic.ini /data/newrelic.ini 122 | 123 | WORKDIR /var/www/htdocs 124 | RUN usermod -s /bin/bash www-data 125 | USER www-data 126 | 127 | ENTRYPOINT ["docker-entrypoint.sh"] 128 | CMD ["php-fpm"] 129 | -------------------------------------------------------------------------------- /php/8.0/bashrc: -------------------------------------------------------------------------------- 1 | PS1="\`if [ \$? = 0 ]; then echo \[\e[37m\]^_^[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; else echo \[\e[31m\]O_O[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; fi\`" 2 | export HISTTIMEFORMAT="%d/%m/%y %T " -------------------------------------------------------------------------------- /php/8.0/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail -o nounset 3 | 4 | if [[ -z "${NEWRELIC_LICENSE_KEY:-}" ]] || [[ -z "${NEWRELIC_APPNAME:-}" ]]; then 5 | : 6 | else 7 | cp /data/newrelic.ini /usr/local/etc/php/conf.d/newrelic.ini 8 | sed -i -e "s/\"REPLACE_WITH_REAL_KEY\"/\"$NEWRELIC_LICENSE_KEY\"/" \ 9 | -e "s/newrelic.appname = \"PHP Application\"/newrelic.appname = \"$NEWRELIC_APPNAME\"/" \ 10 | /usr/local/etc/php/conf.d/newrelic.ini 11 | fi 12 | 13 | exec "$@" 14 | -------------------------------------------------------------------------------- /php/8.0/easyengine.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | error_log = /var/log/php/error.log 3 | daemonize = no 4 | 5 | [www] 6 | ping.path = /ee-admin/ping 7 | pm.status_path = /ee-admin/status 8 | request_terminate_timeout = 300 9 | user = www-data 10 | group = www-data 11 | pm = ondemand 12 | pm.max_children = 20 13 | listen = 9000 14 | ; if we send this to /proc/self/fd/1, it never appears 15 | access.log = /var/log/php/access.log 16 | 17 | clear_env = no 18 | 19 | ; Ensure worker stdout and stderr are sent to the main error log. 20 | catch_workers_output = yes -------------------------------------------------------------------------------- /php/8.0/expose_off.ini: -------------------------------------------------------------------------------- 1 | expose_php = Off -------------------------------------------------------------------------------- /php/8.0/newrelic.ini: -------------------------------------------------------------------------------- 1 | ; This file contains the various settings for the New Relic PHP agent. There 2 | ; are many options, all of which are described in detail at the following URL: 3 | ; https://docs.newrelic.com/docs/agents/php-agent/configuration/php-agent-configuration 4 | ; Additional options added from https://github.com/newrelic/newrelic-php-agent/issues/577#issue-1435830462 5 | 6 | extension = "newrelic.so" 7 | 8 | [newrelic] 9 | newrelic.license = "REPLACE_WITH_REAL_KEY" 10 | newrelic.appname = "PHP Application" 11 | newrelic.logfile = "/var/log/newrelic/php_agent.log" 12 | newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log" 13 | newrelic.daemon.port = "/run/newrelic/newrelic.sock" 14 | newrelic.transaction_tracer.record_sql = "raw" 15 | newrelic.transaction_tracer.threshold = "1s" 16 | newrelic.browser_monitoring.auto_instrument = 0 17 | newrelic.application_logging.forwarding.log_level = error 18 | newrelic.daemon.dont_launch = 3 19 | newrelic.cross_application_tracer.enabled = false 20 | newrelic.distributed_tracing_enabled = false 21 | newrelic.span_events_enabled = false 22 | newrelic.application_logging.enabled = false 23 | newrelic.application_logging.forwarding.enabled = false 24 | newrelic.application_logging.metrics.enabled = false 25 | -------------------------------------------------------------------------------- /php/8.1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.1.32-fpm 2 | 3 | LABEL maintainer="Riddhesh Sanghvi , Devarshi Sathiya " 4 | LABEL org.label-schema.schema-version="1.0.0" 5 | LABEL org.label-schema.vendor="EasyEngine" 6 | LABEL org.label-schema.name="php" 7 | 8 | RUN set -ex; \ 9 | apt-get update; \ 10 | apt-get install -y --no-install-recommends \ 11 | imagemagick \ 12 | less \ 13 | mariadb-client msmtp \ 14 | libc-client-dev \ 15 | libfreetype6-dev \ 16 | libjpeg-dev \ 17 | libjpeg62-turbo-dev \ 18 | libkrb5-dev \ 19 | libmagickwand-dev \ 20 | libgraphicsmagick1-dev \ 21 | libmcrypt-dev \ 22 | libicu-dev \ 23 | libmemcached-dev \ 24 | libxml2-dev \ 25 | libpng-dev \ 26 | libzip-dev \ 27 | libssl-dev \ 28 | libgmp-dev \ 29 | tmux \ 30 | unzip \ 31 | vim \ 32 | zip 33 | 34 | RUN pecl install imagick; \ 35 | pecl install memcached; \ 36 | pecl install redis; \ 37 | pecl install apcu; \ 38 | # https://github.com/php/pecl-encryption-mcrypt/issues/7#issuecomment-1050994596 39 | pecl install -n mcrypt; \ 40 | pecl install gmagick-2.0.6RC1; \ 41 | pecl install timezonedb; \ 42 | docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ 43 | docker-php-ext-configure zip; \ 44 | docker-php-ext-install gd; \ 45 | PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \ 46 | docker-php-ext-install imap; \ 47 | docker-php-ext-install mysqli; \ 48 | docker-php-ext-install pdo_mysql; \ 49 | docker-php-ext-install opcache; \ 50 | docker-php-ext-install soap; \ 51 | docker-php-ext-install intl; \ 52 | docker-php-ext-install zip; \ 53 | docker-php-ext-install exif; \ 54 | docker-php-ext-install calendar; \ 55 | docker-php-ext-install gmp; \ 56 | docker-php-ext-install pcntl; \ 57 | docker-php-ext-install shmop; \ 58 | docker-php-ext-install sockets; \ 59 | docker-php-ext-install sysvsem; \ 60 | docker-php-ext-install sysvshm; \ 61 | docker-php-ext-install bcmath; \ 62 | docker-php-ext-enable imagick mcrypt redis timezonedb apcu; \ 63 | echo "extension=memcached.so" >> /usr/local/etc/php/conf.d/memcached.ini; \ 64 | echo "extension=gmagick.so" >> /usr/local/etc/php/conf.d/gmagick.ini; \ 65 | apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ 66 | rm -rf /var/lib/apt/lists/*; 67 | 68 | # set recommended PHP.ini settings 69 | # see https://secure.php.net/manual/en/opcache.installation.php 70 | RUN { \ 71 | echo 'opcache.memory_consumption=128'; \ 72 | echo 'opcache.interned_strings_buffer=8'; \ 73 | echo 'opcache.max_accelerated_files=4000'; \ 74 | echo 'opcache.revalidate_freq=2'; \ 75 | echo 'opcache.fast_shutdown=1'; \ 76 | echo 'opcache.enable_cli=1'; \ 77 | } > /usr/local/etc/php/conf.d/opcache-recommended.ini 78 | 79 | # Donwload and install composer 80 | RUN curl -sSL "https://getcomposer.org/installer" | php \ 81 | && mv composer.phar /usr/local/bin/composer 82 | 83 | # Install wp-cli 84 | RUN curl -O "https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar" \ 85 | && chmod +x wp-cli.phar \ 86 | && mv wp-cli.phar /usr/local/bin/wp 87 | 88 | # Setup a config file 89 | RUN mkdir -p /etc/wp-cli 90 | RUN { \ 91 | echo 'path: /var/www/htdocs'; \ 92 | } > /etc/wp-cli/config.yml 93 | 94 | RUN mkdir /usr/local/etc/misc && \ 95 | touch /usr/local/etc/misc/msmtprc && \ 96 | ln -s /usr/local/etc/misc/msmtprc /etc/msmtprc && \ 97 | chown www-data:www-data /usr/local/etc/misc/msmtprc && \ 98 | chown www-data:www-data /etc/msmtprc 99 | 100 | RUN latest_build=$(curl -s https://download.newrelic.com/php_agent/release/ | grep 'linux.tar.gz' | sed 's/.*"\(.*\)".*/\1/') && \ 101 | curl -L "https://download.newrelic.com$latest_build" | tar -C /tmp -zx && \ 102 | export NR_INSTALL_USE_CP_NOT_LN=1 && \ 103 | export NR_INSTALL_SILENT=1 && \ 104 | /tmp/newrelic-php5-*/newrelic-install install && \ 105 | rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* 106 | 107 | ENV NR_PORT=/run/newrelic/newrelic.sock 108 | 109 | # Setup logs 110 | RUN mkdir -p /var/log/php; \ 111 | chown -R www-data: /var/log/php; \ 112 | rm /usr/local/etc/php-fpm.d/*; 113 | COPY php.ini /usr/local/etc/php/php.ini 114 | COPY easyengine.conf /usr/local/etc/php-fpm.d/easyengine.conf 115 | 116 | COPY expose_off.ini /usr/local/etc/php/conf.d/expose_off.ini 117 | COPY bashrc /root/.bashrc 118 | COPY bashrc /var/www/.bashrc 119 | COPY docker-entrypoint.sh /usr/local/bin/ 120 | COPY newrelic.ini /usr/local/etc/php/conf.d/newrelic.ini 121 | COPY newrelic.ini /data/newrelic.ini 122 | 123 | WORKDIR /var/www/htdocs 124 | RUN usermod -s /bin/bash www-data 125 | USER www-data 126 | 127 | ENTRYPOINT ["docker-entrypoint.sh"] 128 | CMD ["php-fpm"] 129 | -------------------------------------------------------------------------------- /php/8.1/bashrc: -------------------------------------------------------------------------------- 1 | PS1="\`if [ \$? = 0 ]; then echo \[\e[37m\]^_^[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; else echo \[\e[31m\]O_O[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; fi\`" 2 | export HISTTIMEFORMAT="%d/%m/%y %T " -------------------------------------------------------------------------------- /php/8.1/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail -o nounset 3 | 4 | if [[ -z "${NEWRELIC_LICENSE_KEY:-}" ]] || [[ -z "${NEWRELIC_APPNAME:-}" ]]; then 5 | : 6 | else 7 | cp /data/newrelic.ini /usr/local/etc/php/conf.d/newrelic.ini 8 | sed -i -e "s/\"REPLACE_WITH_REAL_KEY\"/\"$NEWRELIC_LICENSE_KEY\"/" \ 9 | -e "s/newrelic.appname = \"PHP Application\"/newrelic.appname = \"$NEWRELIC_APPNAME\"/" \ 10 | /usr/local/etc/php/conf.d/newrelic.ini 11 | fi 12 | 13 | exec "$@" 14 | -------------------------------------------------------------------------------- /php/8.1/easyengine.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | error_log = /var/log/php/error.log 3 | daemonize = no 4 | 5 | [www] 6 | ping.path = /ee-admin/ping 7 | pm.status_path = /ee-admin/status 8 | request_terminate_timeout = 300 9 | user = www-data 10 | group = www-data 11 | pm = ondemand 12 | pm.max_children = 20 13 | listen = 9000 14 | ; if we send this to /proc/self/fd/1, it never appears 15 | access.log = /var/log/php/access.log 16 | 17 | clear_env = no 18 | 19 | ; Ensure worker stdout and stderr are sent to the main error log. 20 | catch_workers_output = yes -------------------------------------------------------------------------------- /php/8.1/expose_off.ini: -------------------------------------------------------------------------------- 1 | expose_php = Off -------------------------------------------------------------------------------- /php/8.1/newrelic.ini: -------------------------------------------------------------------------------- 1 | ; This file contains the various settings for the New Relic PHP agent. There 2 | ; are many options, all of which are described in detail at the following URL: 3 | ; https://docs.newrelic.com/docs/agents/php-agent/configuration/php-agent-configuration 4 | ; Additional options added from https://github.com/newrelic/newrelic-php-agent/issues/577#issue-1435830462 5 | 6 | extension = "newrelic.so" 7 | 8 | [newrelic] 9 | newrelic.license = "REPLACE_WITH_REAL_KEY" 10 | newrelic.appname = "PHP Application" 11 | newrelic.logfile = "/var/log/newrelic/php_agent.log" 12 | newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log" 13 | newrelic.daemon.port = "/run/newrelic/newrelic.sock" 14 | newrelic.transaction_tracer.record_sql = "raw" 15 | newrelic.transaction_tracer.threshold = "1s" 16 | newrelic.browser_monitoring.auto_instrument = 0 17 | newrelic.application_logging.forwarding.log_level = error 18 | newrelic.daemon.dont_launch = 3 19 | newrelic.cross_application_tracer.enabled = false 20 | newrelic.distributed_tracing_enabled = false 21 | newrelic.span_events_enabled = false 22 | newrelic.application_logging.enabled = false 23 | newrelic.application_logging.forwarding.enabled = false 24 | newrelic.application_logging.metrics.enabled = false 25 | -------------------------------------------------------------------------------- /php/8.2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.2.28-fpm 2 | 3 | LABEL maintainer="Riddhesh Sanghvi , Devarshi Sathiya " 4 | LABEL org.label-schema.schema-version="1.0.0" 5 | LABEL org.label-schema.vendor="EasyEngine" 6 | LABEL org.label-schema.name="php" 7 | 8 | RUN set -ex; \ 9 | apt-get update; \ 10 | apt-get install -y --no-install-recommends \ 11 | imagemagick \ 12 | less \ 13 | mariadb-client msmtp \ 14 | libc-client-dev \ 15 | libfreetype6-dev \ 16 | libjpeg-dev \ 17 | libjpeg62-turbo-dev \ 18 | libkrb5-dev \ 19 | libmagickwand-dev \ 20 | libgraphicsmagick1-dev \ 21 | libmcrypt-dev \ 22 | libicu-dev \ 23 | libmemcached-dev \ 24 | libxml2-dev \ 25 | libpng-dev \ 26 | libzip-dev \ 27 | libssl-dev \ 28 | libgmp-dev \ 29 | tmux \ 30 | unzip \ 31 | vim \ 32 | zip 33 | 34 | RUN pecl install imagick; \ 35 | pecl install memcached; \ 36 | pecl install redis; \ 37 | pecl install apcu; \ 38 | # https://github.com/php/pecl-encryption-mcrypt/issues/7#issuecomment-1050994596 39 | pecl install -n mcrypt; \ 40 | pecl install gmagick-2.0.6RC1; \ 41 | pecl install timezonedb; \ 42 | docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ 43 | docker-php-ext-configure zip; \ 44 | docker-php-ext-install gd; \ 45 | PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \ 46 | docker-php-ext-install imap; \ 47 | docker-php-ext-install mysqli; \ 48 | docker-php-ext-install pdo_mysql; \ 49 | docker-php-ext-install opcache; \ 50 | docker-php-ext-install soap; \ 51 | docker-php-ext-install intl; \ 52 | docker-php-ext-install zip; \ 53 | docker-php-ext-install exif; \ 54 | docker-php-ext-install calendar; \ 55 | docker-php-ext-install gmp; \ 56 | docker-php-ext-install pcntl; \ 57 | docker-php-ext-install shmop; \ 58 | docker-php-ext-install sockets; \ 59 | docker-php-ext-install sysvsem; \ 60 | docker-php-ext-install sysvshm; \ 61 | docker-php-ext-install bcmath; \ 62 | docker-php-ext-enable imagick mcrypt redis timezonedb apcu; \ 63 | echo "extension=memcached.so" >> /usr/local/etc/php/conf.d/memcached.ini; \ 64 | echo "extension=gmagick.so" >> /usr/local/etc/php/conf.d/gmagick.ini; \ 65 | apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ 66 | rm -rf /var/lib/apt/lists/*; 67 | 68 | # set recommended PHP.ini settings 69 | # see https://secure.php.net/manual/en/opcache.installation.php 70 | RUN { \ 71 | echo 'opcache.memory_consumption=128'; \ 72 | echo 'opcache.interned_strings_buffer=8'; \ 73 | echo 'opcache.max_accelerated_files=4000'; \ 74 | echo 'opcache.revalidate_freq=2'; \ 75 | echo 'opcache.fast_shutdown=1'; \ 76 | echo 'opcache.enable_cli=1'; \ 77 | } > /usr/local/etc/php/conf.d/opcache-recommended.ini 78 | 79 | # Donwload and install composer 80 | RUN curl -sSL "https://getcomposer.org/installer" | php \ 81 | && mv composer.phar /usr/local/bin/composer 82 | 83 | # Install wp-cli 84 | RUN curl -O "https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar" \ 85 | && chmod +x wp-cli.phar \ 86 | && mv wp-cli.phar /usr/local/bin/wp 87 | 88 | # Setup a config file 89 | RUN mkdir -p /etc/wp-cli 90 | RUN { \ 91 | echo 'path: /var/www/htdocs'; \ 92 | } > /etc/wp-cli/config.yml 93 | 94 | RUN mkdir /usr/local/etc/misc && \ 95 | touch /usr/local/etc/misc/msmtprc && \ 96 | ln -s /usr/local/etc/misc/msmtprc /etc/msmtprc && \ 97 | chown www-data:www-data /usr/local/etc/misc/msmtprc && \ 98 | chown www-data:www-data /etc/msmtprc 99 | 100 | RUN latest_build=$(curl -s https://download.newrelic.com/php_agent/release/ | grep 'linux.tar.gz' | sed 's/.*"\(.*\)".*/\1/') && \ 101 | curl -L "https://download.newrelic.com$latest_build" | tar -C /tmp -zx && \ 102 | export NR_INSTALL_USE_CP_NOT_LN=1 && \ 103 | export NR_INSTALL_SILENT=1 && \ 104 | /tmp/newrelic-php5-*/newrelic-install install && \ 105 | rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* 106 | 107 | ENV NR_PORT=/run/newrelic/newrelic.sock 108 | 109 | # Setup logs 110 | RUN mkdir -p /var/log/php; \ 111 | chown -R www-data: /var/log/php; \ 112 | rm /usr/local/etc/php-fpm.d/*; 113 | COPY php.ini /usr/local/etc/php/php.ini 114 | COPY easyengine.conf /usr/local/etc/php-fpm.d/easyengine.conf 115 | 116 | COPY expose_off.ini /usr/local/etc/php/conf.d/expose_off.ini 117 | COPY bashrc /root/.bashrc 118 | COPY bashrc /var/www/.bashrc 119 | COPY docker-entrypoint.sh /usr/local/bin/ 120 | COPY newrelic.ini /usr/local/etc/php/conf.d/newrelic.ini 121 | COPY newrelic.ini /data/newrelic.ini 122 | 123 | WORKDIR /var/www/htdocs 124 | RUN usermod -s /bin/bash www-data 125 | USER www-data 126 | 127 | ENTRYPOINT ["docker-entrypoint.sh"] 128 | CMD ["php-fpm"] 129 | -------------------------------------------------------------------------------- /php/8.2/bashrc: -------------------------------------------------------------------------------- 1 | PS1="\`if [ \$? = 0 ]; then echo \[\e[37m\]^_^[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; else echo \[\e[31m\]O_O[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; fi\`" 2 | export HISTTIMEFORMAT="%d/%m/%y %T " -------------------------------------------------------------------------------- /php/8.2/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail -o nounset 3 | 4 | if [[ -z "${NEWRELIC_LICENSE_KEY:-}" ]] || [[ -z "${NEWRELIC_APPNAME:-}" ]]; then 5 | : 6 | else 7 | sed -i -e "s/\"REPLACE_WITH_REAL_KEY\"/\"$NEWRELIC_LICENSE_KEY\"/" \ 8 | -e "s/newrelic.appname = \"PHP Application\"/newrelic.appname = \"$NEWRELIC_APPNAME\"/" \ 9 | /usr/local/etc/php/conf.d/newrelic.ini 10 | fi 11 | 12 | exec "$@" 13 | -------------------------------------------------------------------------------- /php/8.2/easyengine.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | error_log = /var/log/php/error.log 3 | daemonize = no 4 | 5 | [www] 6 | ping.path = /ee-admin/ping 7 | pm.status_path = /ee-admin/status 8 | request_terminate_timeout = 300 9 | user = www-data 10 | group = www-data 11 | pm = ondemand 12 | pm.max_children = 20 13 | listen = 9000 14 | ; if we send this to /proc/self/fd/1, it never appears 15 | access.log = /var/log/php/access.log 16 | 17 | clear_env = no 18 | 19 | ; Ensure worker stdout and stderr are sent to the main error log. 20 | catch_workers_output = yes -------------------------------------------------------------------------------- /php/8.2/expose_off.ini: -------------------------------------------------------------------------------- 1 | expose_php = Off -------------------------------------------------------------------------------- /php/8.2/newrelic.ini: -------------------------------------------------------------------------------- 1 | ; This file contains the various settings for the New Relic PHP agent. There 2 | ; are many options, all of which are described in detail at the following URL: 3 | ; https://docs.newrelic.com/docs/agents/php-agent/configuration/php-agent-configuration 4 | ; 5 | 6 | extension = "newrelic.so" 7 | 8 | [newrelic] 9 | newrelic.license = "REPLACE_WITH_REAL_KEY" 10 | newrelic.appname = "PHP Application" 11 | newrelic.logfile = "/var/log/newrelic/php_agent.log" 12 | newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log" 13 | newrelic.daemon.port = "/run/newrelic/newrelic.sock" 14 | newrelic.transaction_tracer.record_sql = "raw" 15 | newrelic.transaction_tracer.threshold = "1s" 16 | newrelic.browser_monitoring.auto_instrument = 0 17 | newrelic.application_logging.forwarding.log_level = error 18 | newrelic.daemon.dont_launch = 3 19 | -------------------------------------------------------------------------------- /php/8.3/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.3.21-fpm 2 | 3 | LABEL maintainer="Riddhesh Sanghvi , Devarshi Sathiya " 4 | LABEL org.label-schema.schema-version="1.0.0" 5 | LABEL org.label-schema.vendor="EasyEngine" 6 | LABEL org.label-schema.name="php" 7 | 8 | RUN set -ex; \ 9 | apt-get update; \ 10 | apt-get install -y --no-install-recommends \ 11 | imagemagick \ 12 | less \ 13 | mariadb-client msmtp \ 14 | libc-client-dev \ 15 | libfreetype6-dev \ 16 | libjpeg-dev \ 17 | libjpeg62-turbo-dev \ 18 | libkrb5-dev \ 19 | libmagickwand-dev \ 20 | libgraphicsmagick1-dev \ 21 | libmcrypt-dev \ 22 | libicu-dev \ 23 | libmemcached-dev \ 24 | libxml2-dev \ 25 | libpng-dev \ 26 | libzip-dev \ 27 | libssl-dev \ 28 | libgmp-dev \ 29 | tmux \ 30 | unzip \ 31 | vim \ 32 | zip 33 | 34 | # RUN pecl install imagick; \ # This is not working with PHP 8.3 35 | RUN pecl install memcached; \ 36 | pecl install redis; \ 37 | pecl install apcu; \ 38 | # https://github.com/php/pecl-encryption-mcrypt/issues/7#issuecomment-1050994596 39 | pecl install -n mcrypt; \ 40 | pecl install gmagick-2.0.6RC1; \ 41 | pecl install timezonedb; \ 42 | docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ 43 | docker-php-ext-configure zip; \ 44 | docker-php-ext-install gd; \ 45 | PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \ 46 | docker-php-ext-install imap; \ 47 | docker-php-ext-install mysqli; \ 48 | docker-php-ext-install pdo_mysql; \ 49 | docker-php-ext-install opcache; \ 50 | docker-php-ext-install soap; \ 51 | docker-php-ext-install intl; \ 52 | docker-php-ext-install zip; \ 53 | docker-php-ext-install exif; \ 54 | docker-php-ext-install calendar; \ 55 | docker-php-ext-install gmp; \ 56 | docker-php-ext-install pcntl; \ 57 | docker-php-ext-install shmop; \ 58 | docker-php-ext-install sockets; \ 59 | docker-php-ext-install sysvsem; \ 60 | docker-php-ext-install sysvshm; \ 61 | docker-php-ext-install bcmath; \ 62 | docker-php-ext-enable mcrypt redis timezonedb apcu; \ 63 | echo "extension=memcached.so" >> /usr/local/etc/php/conf.d/memcached.ini; \ 64 | echo "extension=gmagick.so" >> /usr/local/etc/php/conf.d/gmagick.ini; \ 65 | apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ 66 | rm -rf /var/lib/apt/lists/*; 67 | 68 | # Temp workaround for imagick 69 | RUN apt update && apt install -y git --no-install-recommends && \ 70 | git clone https://github.com/Imagick/imagick.git --depth 1 /tmp/imagick && \ 71 | cd /tmp/imagick && \ 72 | git fetch origin master && \ 73 | git switch master && \ 74 | cd /tmp/imagick && \ 75 | phpize && \ 76 | ./configure && \ 77 | make && \ 78 | make install && \ 79 | docker-php-ext-enable imagick && \ 80 | apt remove -y git && \ 81 | apt autoremove -y && \ 82 | apt clean && \ 83 | rm -rf /var/lib/apt/lists/* && \ 84 | rm -rf /tmp/imagick 85 | 86 | # set recommended PHP.ini settings 87 | # see https://secure.php.net/manual/en/opcache.installation.php 88 | RUN { \ 89 | echo 'opcache.memory_consumption=128'; \ 90 | echo 'opcache.interned_strings_buffer=8'; \ 91 | echo 'opcache.max_accelerated_files=4000'; \ 92 | echo 'opcache.revalidate_freq=2'; \ 93 | echo 'opcache.fast_shutdown=1'; \ 94 | echo 'opcache.enable_cli=1'; \ 95 | } > /usr/local/etc/php/conf.d/opcache-recommended.ini 96 | 97 | # Donwload and install composer 98 | RUN curl -sSL "https://getcomposer.org/installer" | php \ 99 | && mv composer.phar /usr/local/bin/composer 100 | 101 | # Install wp-cli 102 | RUN curl -O "https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar" \ 103 | && chmod +x wp-cli.phar \ 104 | && mv wp-cli.phar /usr/local/bin/wp 105 | 106 | # Setup a config file 107 | RUN mkdir -p /etc/wp-cli 108 | RUN { \ 109 | echo 'path: /var/www/htdocs'; \ 110 | } > /etc/wp-cli/config.yml 111 | 112 | RUN mkdir /usr/local/etc/misc && \ 113 | touch /usr/local/etc/misc/msmtprc && \ 114 | ln -s /usr/local/etc/misc/msmtprc /etc/msmtprc && \ 115 | chown www-data:www-data /usr/local/etc/misc/msmtprc && \ 116 | chown www-data:www-data /etc/msmtprc 117 | 118 | RUN latest_build=$(curl -s https://download.newrelic.com/php_agent/release/ | grep 'linux.tar.gz' | sed 's/.*"\(.*\)".*/\1/') && \ 119 | curl -L "https://download.newrelic.com$latest_build" | tar -C /tmp -zx && \ 120 | export NR_INSTALL_USE_CP_NOT_LN=1 && \ 121 | export NR_INSTALL_SILENT=1 && \ 122 | /tmp/newrelic-php5-*/newrelic-install install && \ 123 | rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* 124 | 125 | ENV NR_PORT=/run/newrelic/newrelic.sock 126 | 127 | # Setup logs 128 | RUN mkdir -p /var/log/php; \ 129 | chown -R www-data: /var/log/php; \ 130 | rm /usr/local/etc/php-fpm.d/*; 131 | COPY php.ini /usr/local/etc/php/php.ini 132 | COPY easyengine.conf /usr/local/etc/php-fpm.d/easyengine.conf 133 | 134 | COPY expose_off.ini /usr/local/etc/php/conf.d/expose_off.ini 135 | COPY bashrc /root/.bashrc 136 | COPY bashrc /var/www/.bashrc 137 | COPY docker-entrypoint.sh /usr/local/bin/ 138 | COPY newrelic.ini /usr/local/etc/php/conf.d/newrelic.ini 139 | COPY newrelic.ini /data/newrelic.ini 140 | 141 | WORKDIR /var/www/htdocs 142 | RUN usermod -s /bin/bash www-data 143 | USER www-data 144 | 145 | ENTRYPOINT ["docker-entrypoint.sh"] 146 | CMD ["php-fpm"] 147 | -------------------------------------------------------------------------------- /php/8.3/bashrc: -------------------------------------------------------------------------------- 1 | PS1="\`if [ \$? = 0 ]; then echo \[\e[37m\]^_^[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; else echo \[\e[31m\]O_O[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; fi\`" 2 | export HISTTIMEFORMAT="%d/%m/%y %T " -------------------------------------------------------------------------------- /php/8.3/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail -o nounset 3 | 4 | if [[ -z "${NEWRELIC_LICENSE_KEY:-}" ]] || [[ -z "${NEWRELIC_APPNAME:-}" ]]; then 5 | : 6 | else 7 | sed -i -e "s/\"REPLACE_WITH_REAL_KEY\"/\"$NEWRELIC_LICENSE_KEY\"/" \ 8 | -e "s/newrelic.appname = \"PHP Application\"/newrelic.appname = \"$NEWRELIC_APPNAME\"/" \ 9 | /usr/local/etc/php/conf.d/newrelic.ini 10 | fi 11 | 12 | exec "$@" 13 | -------------------------------------------------------------------------------- /php/8.3/easyengine.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | error_log = /var/log/php/error.log 3 | daemonize = no 4 | 5 | [www] 6 | ping.path = /ee-admin/ping 7 | pm.status_path = /ee-admin/status 8 | request_terminate_timeout = 300 9 | user = www-data 10 | group = www-data 11 | pm = ondemand 12 | pm.max_children = 20 13 | listen = 9000 14 | ; if we send this to /proc/self/fd/1, it never appears 15 | access.log = /var/log/php/access.log 16 | 17 | clear_env = no 18 | 19 | ; Ensure worker stdout and stderr are sent to the main error log. 20 | catch_workers_output = yes -------------------------------------------------------------------------------- /php/8.3/expose_off.ini: -------------------------------------------------------------------------------- 1 | expose_php = Off -------------------------------------------------------------------------------- /php/8.3/newrelic.ini: -------------------------------------------------------------------------------- 1 | ; This file contains the various settings for the New Relic PHP agent. There 2 | ; are many options, all of which are described in detail at the following URL: 3 | ; https://docs.newrelic.com/docs/agents/php-agent/configuration/php-agent-configuration 4 | ; 5 | 6 | extension = "newrelic.so" 7 | 8 | [newrelic] 9 | newrelic.license = "REPLACE_WITH_REAL_KEY" 10 | newrelic.appname = "PHP Application" 11 | newrelic.logfile = "/var/log/newrelic/php_agent.log" 12 | newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log" 13 | newrelic.daemon.port = "/run/newrelic/newrelic.sock" 14 | newrelic.transaction_tracer.record_sql = "raw" 15 | newrelic.transaction_tracer.threshold = "1s" 16 | newrelic.browser_monitoring.auto_instrument = 0 17 | newrelic.application_logging.forwarding.log_level = error 18 | newrelic.daemon.dont_launch = 3 19 | -------------------------------------------------------------------------------- /php/8.4/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.4.1-fpm 2 | 3 | LABEL maintainer="Riddhesh Sanghvi " 4 | LABEL org.label-schema.schema-version="1.0.0" 5 | LABEL org.label-schema.vendor="EasyEngine" 6 | LABEL org.label-schema.name="php" 7 | 8 | RUN set -ex; \ 9 | apt-get update; \ 10 | apt-get install -y --no-install-recommends \ 11 | imagemagick \ 12 | less \ 13 | mariadb-client msmtp \ 14 | libc-client-dev \ 15 | libfreetype6-dev \ 16 | libjpeg-dev \ 17 | libjpeg62-turbo-dev \ 18 | libkrb5-dev \ 19 | libmagickwand-dev \ 20 | libgraphicsmagick1-dev \ 21 | libmcrypt-dev \ 22 | libicu-dev \ 23 | libmemcached-dev \ 24 | libxml2-dev \ 25 | libpng-dev \ 26 | libzip-dev \ 27 | libssl-dev \ 28 | libgmp-dev \ 29 | tmux \ 30 | unzip \ 31 | vim \ 32 | zip 33 | 34 | # RUN curl -fsSLOJ https://pecl.php.net/get/mcrypt/stable \ 35 | # && tar -xf mcrypt-1.0.7.tgz 36 | # RUN cd mcrypt-1.0.7 \ 37 | # && phpize \ 38 | # && ./configure \ 39 | # && make \ 40 | # && curl -fsSLOJ https://github.com/php/pecl-encryption-mcrypt/commit/5b16bf1c97c1bbab400fc877285bf0919ae73256.diff \ 41 | # && git apply 5b16bf1c97c1bbab400fc877285bf0919ae73256.diff \ 42 | # && make test \ 43 | # && cp modules/*.so $(pecl config-get ext_dir) \ 44 | # && cd .. \ 45 | # && rm -rf mcrypt-1.0.7.tgz mcrypt-1.0.7 46 | # RUN echo extension="mcrypt.so" > /usr/local/etc/php/conf.d/php-ext-mcrypt.ini 47 | 48 | RUN pecl install imagick; \ 49 | pecl install memcached; \ 50 | pecl install redis; \ 51 | pecl install apcu; \ 52 | # https://github.com/php/pecl-encryption-mcrypt/issues/7#issuecomment-1050994596 53 | pecl install -n mcrypt; \ 54 | echo "yes" | pecl install imap; \ 55 | pecl install gmagick-2.0.6RC1; \ 56 | pecl install timezonedb; \ 57 | docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ 58 | docker-php-ext-configure zip; \ 59 | docker-php-ext-install gd; \ 60 | docker-php-ext-install mysqli; \ 61 | docker-php-ext-install pdo_mysql; \ 62 | docker-php-ext-install opcache; \ 63 | docker-php-ext-install soap; \ 64 | docker-php-ext-install intl; \ 65 | docker-php-ext-install zip; \ 66 | docker-php-ext-install exif; \ 67 | docker-php-ext-install calendar; \ 68 | docker-php-ext-install gmp; \ 69 | docker-php-ext-install pcntl; \ 70 | docker-php-ext-install shmop; \ 71 | docker-php-ext-install sockets; \ 72 | docker-php-ext-install sysvsem; \ 73 | docker-php-ext-install sysvshm; \ 74 | docker-php-ext-install bcmath; \ 75 | docker-php-ext-enable mcrypt; \ 76 | docker-php-ext-enable redis; \ 77 | docker-php-ext-enable timezonedb; \ 78 | docker-php-ext-enable apcu; \ 79 | docker-php-ext-enable imagick; \ 80 | echo "extension=memcached.so" >> /usr/local/etc/php/conf.d/memcached.ini; \ 81 | echo "extension=gmagick.so" >> /usr/local/etc/php/conf.d/gmagick.ini; \ 82 | echo "extension=imap.so" > /usr/local/etc/php/conf.d/imap.ini; \ 83 | apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ 84 | rm -rf /var/lib/apt/lists/*; 85 | 86 | # Temp workaround for imagick 87 | # RUN apt update && apt install -y git --no-install-recommends && \ 88 | # git clone https://github.com/Imagick/imagick.git --depth 1 /tmp/imagick && \ 89 | # cd /tmp/imagick && \ 90 | # git fetch origin master && \ 91 | # git switch master && \ 92 | # cd /tmp/imagick && \ 93 | # phpize && \ 94 | # ./configure && \ 95 | # make && \ 96 | # make install && \ 97 | # docker-php-ext-enable imagick && \ 98 | # apt remove -y git && \ 99 | # apt autoremove -y && \ 100 | # apt clean && \ 101 | # rm -rf /var/lib/apt/lists/* && \ 102 | # rm -rf /tmp/imagick 103 | 104 | # set recommended PHP.ini settings 105 | # see https://secure.php.net/manual/en/opcache.installation.php 106 | RUN { \ 107 | echo 'opcache.memory_consumption=128'; \ 108 | echo 'opcache.interned_strings_buffer=8'; \ 109 | echo 'opcache.max_accelerated_files=4000'; \ 110 | echo 'opcache.revalidate_freq=2'; \ 111 | echo 'opcache.fast_shutdown=1'; \ 112 | echo 'opcache.enable_cli=1'; \ 113 | } > /usr/local/etc/php/conf.d/opcache-recommended.ini 114 | 115 | # Donwload and install composer 116 | RUN curl -sSL "https://getcomposer.org/installer" | php \ 117 | && mv composer.phar /usr/local/bin/composer 118 | 119 | # Install wp-cli 120 | RUN curl -O "https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar" \ 121 | && chmod +x wp-cli.phar \ 122 | && mv wp-cli.phar /usr/local/bin/wp 123 | 124 | # Setup a config file 125 | RUN mkdir -p /etc/wp-cli 126 | RUN { \ 127 | echo 'path: /var/www/htdocs'; \ 128 | } > /etc/wp-cli/config.yml 129 | 130 | RUN mkdir /usr/local/etc/misc && \ 131 | touch /usr/local/etc/misc/msmtprc && \ 132 | ln -s /usr/local/etc/misc/msmtprc /etc/msmtprc && \ 133 | chown www-data:www-data /usr/local/etc/misc/msmtprc && \ 134 | chown www-data:www-data /etc/msmtprc 135 | 136 | # RUN latest_build=$(curl -s https://download.newrelic.com/php_agent/release/ | grep 'linux.tar.gz' | sed 's/.*"\(.*\)".*/\1/') && \ 137 | # curl -L "https://download.newrelic.com$latest_build" | tar -C /tmp -zx && \ 138 | # export NR_INSTALL_USE_CP_NOT_LN=1 && \ 139 | # export NR_INSTALL_SILENT=1 && \ 140 | # /tmp/newrelic-php5-*/newrelic-install install && \ 141 | # rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* 142 | 143 | # ENV NR_PORT=/run/newrelic/newrelic.sock 144 | 145 | # Setup logs 146 | RUN mkdir -p /var/log/php; \ 147 | chown -R www-data: /var/log/php; \ 148 | rm /usr/local/etc/php-fpm.d/*; 149 | COPY php.ini /usr/local/etc/php/php.ini 150 | COPY easyengine.conf /usr/local/etc/php-fpm.d/easyengine.conf 151 | 152 | COPY expose_off.ini /usr/local/etc/php/conf.d/expose_off.ini 153 | COPY bashrc /root/.bashrc 154 | COPY bashrc /var/www/.bashrc 155 | COPY docker-entrypoint.sh /usr/local/bin/ 156 | # COPY newrelic.ini /usr/local/etc/php/conf.d/newrelic.ini 157 | # COPY newrelic.ini /data/newrelic.ini 158 | 159 | WORKDIR /var/www/htdocs 160 | RUN usermod -s /bin/bash www-data 161 | USER www-data 162 | 163 | ENTRYPOINT ["docker-entrypoint.sh"] 164 | CMD ["php-fpm"] 165 | -------------------------------------------------------------------------------- /php/8.4/bashrc: -------------------------------------------------------------------------------- 1 | PS1="\`if [ \$? = 0 ]; then echo \[\e[37m\]^_^[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; else echo \[\e[31m\]O_O[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; fi\`" 2 | export HISTTIMEFORMAT="%d/%m/%y %T " -------------------------------------------------------------------------------- /php/8.4/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail -o nounset 3 | 4 | if [[ -z "${NEWRELIC_LICENSE_KEY:-}" ]] || [[ -z "${NEWRELIC_APPNAME:-}" ]]; then 5 | : 6 | else 7 | sed -i -e "s/\"REPLACE_WITH_REAL_KEY\"/\"$NEWRELIC_LICENSE_KEY\"/" \ 8 | -e "s/newrelic.appname = \"PHP Application\"/newrelic.appname = \"$NEWRELIC_APPNAME\"/" \ 9 | /usr/local/etc/php/conf.d/newrelic.ini 10 | fi 11 | 12 | exec "$@" 13 | -------------------------------------------------------------------------------- /php/8.4/easyengine.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | error_log = /var/log/php/error.log 3 | daemonize = no 4 | 5 | [www] 6 | ping.path = /ee-admin/ping 7 | pm.status_path = /ee-admin/status 8 | request_terminate_timeout = 300 9 | user = www-data 10 | group = www-data 11 | pm = ondemand 12 | pm.max_children = 20 13 | listen = 9000 14 | ; if we send this to /proc/self/fd/1, it never appears 15 | access.log = /var/log/php/access.log 16 | 17 | clear_env = no 18 | 19 | ; Ensure worker stdout and stderr are sent to the main error log. 20 | catch_workers_output = yes -------------------------------------------------------------------------------- /php/8.4/expose_off.ini: -------------------------------------------------------------------------------- 1 | expose_php = Off -------------------------------------------------------------------------------- /php/8.4/newrelic.ini: -------------------------------------------------------------------------------- 1 | ; This file contains the various settings for the New Relic PHP agent. There 2 | ; are many options, all of which are described in detail at the following URL: 3 | ; https://docs.newrelic.com/docs/agents/php-agent/configuration/php-agent-configuration 4 | ; 5 | 6 | extension = "newrelic.so" 7 | 8 | [newrelic] 9 | newrelic.license = "REPLACE_WITH_REAL_KEY" 10 | newrelic.appname = "PHP Application" 11 | newrelic.logfile = "/var/log/newrelic/php_agent.log" 12 | newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log" 13 | newrelic.daemon.port = "/run/newrelic/newrelic.sock" 14 | newrelic.transaction_tracer.record_sql = "raw" 15 | newrelic.transaction_tracer.threshold = "1s" 16 | newrelic.browser_monitoring.auto_instrument = 0 17 | newrelic.application_logging.forwarding.log_level = error 18 | newrelic.daemon.dont_launch = 3 19 | -------------------------------------------------------------------------------- /php/stable/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.4-fpm@sha256:3ac7c8c74b2b047c7cb273469d74fc0d59b857aa44043e6ea6a0084372811d5b 2 | 3 | LABEL maintainer="Devarshi Sathiya , Riddhesh Sanghvi " 4 | LABEL org.label-schema.schema-version="1.0.0" 5 | LABEL org.label-schema.vendor="EasyEngine" 6 | LABEL org.label-schema.name="php" 7 | 8 | RUN set -ex; \ 9 | apt-get update; \ 10 | apt-get install -y --no-install-recommends \ 11 | imagemagick \ 12 | less \ 13 | mariadb-client msmtp \ 14 | libc-client-dev \ 15 | libfreetype6-dev \ 16 | libjpeg-dev \ 17 | libjpeg62-turbo-dev \ 18 | libkrb5-dev \ 19 | libmagickwand-dev \ 20 | libgraphicsmagick1-dev \ 21 | libmcrypt-dev \ 22 | libicu-dev \ 23 | libmemcached-dev \ 24 | libxml2-dev \ 25 | libpng-dev \ 26 | libzip-dev \ 27 | libssl-dev \ 28 | libgmp-dev \ 29 | unzip \ 30 | vim \ 31 | zip 32 | 33 | RUN pecl install imagick; \ 34 | pecl install memcached; \ 35 | pecl install mcrypt; \ 36 | pecl install redis; \ 37 | pecl install apcu; \ 38 | pecl install gmagick-2.0.6RC1; \ 39 | pecl install timezonedb; \ 40 | docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ 41 | docker-php-ext-configure zip; \ 42 | docker-php-ext-install gd; \ 43 | PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \ 44 | docker-php-ext-install imap; \ 45 | docker-php-ext-install mysqli; \ 46 | docker-php-ext-install pdo_mysql; \ 47 | docker-php-ext-install opcache; \ 48 | docker-php-ext-install soap; \ 49 | docker-php-ext-install intl; \ 50 | docker-php-ext-install zip; \ 51 | docker-php-ext-install exif; \ 52 | docker-php-ext-install calendar; \ 53 | docker-php-ext-install gmp; \ 54 | docker-php-ext-install pcntl; \ 55 | docker-php-ext-install shmop; \ 56 | docker-php-ext-install sockets; \ 57 | docker-php-ext-install sysvsem; \ 58 | docker-php-ext-install sysvshm; \ 59 | docker-php-ext-install bcmath; \ 60 | docker-php-ext-enable imagick mcrypt redis timezonedb apcu; \ 61 | echo "extension=memcached.so" >> /usr/local/etc/php/conf.d/memcached.ini; \ 62 | echo "extension=gmagick.so" >> /usr/local/etc/php/conf.d/gmagick.ini; \ 63 | apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ 64 | rm -rf /var/lib/apt/lists/*; 65 | 66 | # set recommended PHP.ini settings 67 | # see https://secure.php.net/manual/en/opcache.installation.php 68 | RUN { \ 69 | echo 'opcache.memory_consumption=128'; \ 70 | echo 'opcache.interned_strings_buffer=8'; \ 71 | echo 'opcache.max_accelerated_files=4000'; \ 72 | echo 'opcache.revalidate_freq=2'; \ 73 | echo 'opcache.fast_shutdown=1'; \ 74 | echo 'opcache.enable_cli=1'; \ 75 | } > /usr/local/etc/php/conf.d/opcache-recommended.ini 76 | 77 | # Donwload and install composer 78 | RUN curl -sSL "https://getcomposer.org/installer" | php \ 79 | && mv composer.phar /usr/local/bin/composer 80 | 81 | # Install wp-cli 82 | RUN curl -O "https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar" \ 83 | && chmod +x wp-cli.phar \ 84 | && mv wp-cli.phar /usr/local/bin/wp 85 | 86 | # Setup a config file 87 | RUN mkdir -p /etc/wp-cli 88 | RUN { \ 89 | echo 'path: /var/www/htdocs'; \ 90 | } > /etc/wp-cli/config.yml 91 | 92 | RUN mkdir /usr/local/etc/misc && \ 93 | touch /usr/local/etc/misc/msmtprc && \ 94 | ln -s /usr/local/etc/misc/msmtprc /etc/msmtprc && \ 95 | chown www-data:www-data /usr/local/etc/misc/msmtprc && \ 96 | chown www-data:www-data /etc/msmtprc 97 | 98 | RUN latest_build=$(curl -s https://download.newrelic.com/php_agent/release/ | grep 'linux.tar.gz' | sed 's/.*"\(.*\)".*/\1/') && \ 99 | curl -L "https://download.newrelic.com$latest_build" | tar -C /tmp -zx && \ 100 | export NR_INSTALL_USE_CP_NOT_LN=1 && \ 101 | export NR_INSTALL_SILENT=1 && \ 102 | /tmp/newrelic-php5-*/newrelic-install install && \ 103 | rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* 104 | 105 | ENV NR_PORT=/run/newrelic/newrelic.sock 106 | 107 | 108 | # Setup logs 109 | RUN mkdir -p /var/log/php; \ 110 | chown -R www-data: /var/log/php; \ 111 | rm /usr/local/etc/php-fpm.d/*; 112 | COPY php.ini /usr/local/etc/php/php.ini 113 | COPY easyengine.conf /usr/local/etc/php-fpm.d/easyengine.conf 114 | 115 | COPY expose_off.ini /usr/local/etc/php/conf.d/expose_off.ini 116 | COPY bashrc /root/.bashrc 117 | COPY bashrc /var/www/.bashrc 118 | COPY docker-entrypoint.sh /usr/local/bin/ 119 | COPY newrelic.ini /usr/local/etc/php/conf.d/newrelic.ini 120 | COPY newrelic.ini /data/newrelic.ini 121 | 122 | WORKDIR /var/www/htdocs 123 | USER www-data 124 | 125 | ENTRYPOINT ["docker-entrypoint.sh"] 126 | CMD ["php-fpm"] 127 | -------------------------------------------------------------------------------- /php/stable/bashrc: -------------------------------------------------------------------------------- 1 | PS1="\`if [ \$? = 0 ]; then echo \[\e[37m\]^_^[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; else echo \[\e[31m\]O_O[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; fi\`" 2 | export HISTTIMEFORMAT="%d/%m/%y %T " -------------------------------------------------------------------------------- /php/stable/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail -o nounset 3 | 4 | if [[ -z "${NEWRELIC_LICENSE_KEY:-}" ]] || [[ -z "${NEWRELIC_APPNAME:-}" ]]; then 5 | : 6 | else 7 | cp /data/newrelic.ini /usr/local/etc/php/conf.d/newrelic.ini 8 | sed -i -e "s/\"REPLACE_WITH_REAL_KEY\"/\"$NEWRELIC_LICENSE_KEY\"/" \ 9 | -e "s/newrelic.appname = \"PHP Application\"/newrelic.appname = \"$NEWRELIC_APPNAME\"/" \ 10 | /usr/local/etc/php/conf.d/newrelic.ini 11 | fi 12 | 13 | exec "$@" 14 | -------------------------------------------------------------------------------- /php/stable/easyengine.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | error_log = /var/log/php/error.log 3 | daemonize = no 4 | 5 | [www] 6 | ping.path = /ee-admin/ping 7 | pm.status_path = /ee-admin/status 8 | request_terminate_timeout = 300 9 | user = www-data 10 | group = www-data 11 | pm = ondemand 12 | pm.max_children = 20 13 | listen = 9000 14 | ; if we send this to /proc/self/fd/1, it never appears 15 | access.log = /var/log/php/access.log 16 | 17 | clear_env = no 18 | 19 | ; Ensure worker stdout and stderr are sent to the main error log. 20 | catch_workers_output = yes -------------------------------------------------------------------------------- /php/stable/expose_off.ini: -------------------------------------------------------------------------------- 1 | expose_php = Off -------------------------------------------------------------------------------- /php/stable/newrelic.ini: -------------------------------------------------------------------------------- 1 | ; This file contains the various settings for the New Relic PHP agent. There 2 | ; are many options, all of which are described in detail at the following URL: 3 | ; https://docs.newrelic.com/docs/agents/php-agent/configuration/php-agent-configuration 4 | ; Additional options added from https://github.com/newrelic/newrelic-php-agent/issues/577#issue-1435830462 5 | 6 | extension = "newrelic.so" 7 | 8 | [newrelic] 9 | newrelic.license = "REPLACE_WITH_REAL_KEY" 10 | newrelic.appname = "PHP Application" 11 | newrelic.logfile = "/var/log/newrelic/php_agent.log" 12 | newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log" 13 | newrelic.daemon.port = "/run/newrelic/newrelic.sock" 14 | newrelic.transaction_tracer.record_sql = "raw" 15 | newrelic.transaction_tracer.threshold = "1s" 16 | newrelic.browser_monitoring.auto_instrument = 0 17 | newrelic.application_logging.forwarding.log_level = error 18 | newrelic.daemon.dont_launch = 3 19 | newrelic.cross_application_tracer.enabled = false 20 | newrelic.distributed_tracing_enabled = false 21 | newrelic.span_events_enabled = false 22 | newrelic.application_logging.enabled = false 23 | newrelic.application_logging.forwarding.enabled = false 24 | newrelic.application_logging.metrics.enabled = false 25 | -------------------------------------------------------------------------------- /postfix/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:12.10-slim 2 | 3 | LABEL maintainer="Riddhesh Sanghvi " 4 | LABEL org.label-schema.schema-version="1.0.0" 5 | LABEL org.label-schema.vendor="EasyEngine" 6 | LABEL org.label-schema.name="postfix" 7 | 8 | 9 | # Build and install Postfix 10 | # https://git.launchpad.net/postfix/tree/debian/rules?id=94dfb9850484db5f47958eaa86f958857ab9834c 11 | RUN apt-get update \ 12 | && apt-get upgrade -y \ 13 | && apt-get install -y --no-install-recommends --no-install-suggests \ 14 | openssl \ 15 | m4 \ 16 | inetutils-syslogd \ 17 | ca-certificates \ 18 | && update-ca-certificates \ 19 | \ 20 | # Install Postfix dependencies 21 | && apt-get install -y --no-install-recommends --no-install-suggests \ 22 | libpcre3 libicu72 \ 23 | libdb5.3 libpq5 libmariadb3 libmariadb-dev-compat libsqlite3-0 \ 24 | libsasl2-2 \ 25 | libldap-2.4 \ 26 | libsasl2-modules \ 27 | \ 28 | # Install tools for building 29 | && toolDeps=" \ 30 | curl make gcc g++ libc-dev \ 31 | " \ 32 | && apt-get install -y --no-install-recommends --no-install-suggests \ 33 | $toolDeps \ 34 | \ 35 | # Install Postfix build dependencies 36 | && buildDeps=" \ 37 | libssl-dev \ 38 | libpcre3-dev libicu-dev \ 39 | libdb-dev libpq-dev libmariadb-dev libsqlite3-dev \ 40 | libsasl2-dev \ 41 | libldap2-dev \ 42 | " \ 43 | && apt-get install -y --no-install-recommends --no-install-suggests \ 44 | $buildDeps 45 | 46 | # Download and prepare Postfix sources 47 | RUN curl -fL -o /tmp/postfix.tar.gz \ 48 | http://ftp.porcupine.org/mirrors/postfix-release/official/postfix-3.8.3.tar.gz \ 49 | && tar -xzf /tmp/postfix.tar.gz -C /tmp/ 50 | 51 | # Build Postfix from sources 52 | RUN cd /tmp/postfix-* \ 53 | && sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf \ 54 | && make makefiles \ 55 | CCARGS="-DHAS_SHL_LOAD -DUSE_TLS \ 56 | -DHAS_PCRE $(pcre-config --cflags) \ 57 | -DHAS_PGSQL -I/usr/include/postgresql \ 58 | -DHAS_MYSQL $(mysql_config --include) \ 59 | -DHAS_SQLITE -I/usr/include \ 60 | -DHAS_LDAP -I/usr/include \ 61 | -DUSE_CYRUS_SASL -I/usr/include/sasl \ 62 | -DUSE_SASL_AUTH -DDEF_SASL_SERVER=\\\"dovecot\\\" \ 63 | -DUSE_LDAP_SASL" \ 64 | AUXLIBS="-lssl -lcrypto -lsasl2" \ 65 | AUXLIBS_PCRE="$(pcre-config --libs)" \ 66 | AUXLIBS_PGSQL="-lpq" \ 67 | AUXLIBS_MYSQL="$(mysql_config --libs)" \ 68 | AUXLIBS_SQLITE="-lsqlite3 -lpthread" \ 69 | AUXLIBS_LDAP="-lldap -llber" \ 70 | shared=yes \ 71 | dynamicmaps=yes \ 72 | pie=yes \ 73 | daemon_directory=/usr/lib/postfix \ 74 | shlibs_directory=/usr/lib/postfix \ 75 | # No documentation included to keep image size smaller 76 | manpage_directory=/tmp/man \ 77 | readme_directory=/tmp/readme \ 78 | html_directory=/tmp/html \ 79 | && make 80 | 81 | # Create Postfix user and groups 82 | RUN addgroup --system --gid 91 postfix \ 83 | && adduser --system --uid 90 --disabled-password \ 84 | --no-create-home --home /var/spool/postfix \ 85 | --ingroup postfix --gecos postfix \ 86 | postfix \ 87 | && adduser postfix mail \ 88 | && addgroup --system --gid 93 postdrop \ 89 | && adduser --system --uid 92 --disabled-password --shell /sbin/nologin \ 90 | --no-create-home --home /var/mail/domains \ 91 | --ingroup postdrop --gecos vmail \ 92 | vmail \ 93 | \ 94 | # Install Postfix 95 | && cd /tmp/postfix-* \ 96 | && make upgrade \ 97 | # Always execute these binaries under postdrop group 98 | && chmod g+s /usr/sbin/postdrop \ 99 | /usr/sbin/postqueue \ 100 | # Ensure spool dir has correct rights 101 | && install -d -o postfix -g postfix /var/spool/postfix \ 102 | # Fix removed directories in default configuration 103 | && sed -i -e 's,^manpage_directory =.*,manpage_directory = /dev/null,' \ 104 | -e 's,^readme_directory =.*,readme_directory = /dev/null,' \ 105 | -e 's,^html_directory =.*,html_directory = /dev/null,' \ 106 | /etc/postfix/main.cf 107 | 108 | # Prepare directories for drop-in configuration files 109 | RUN cd /tmp/postfix-* \ 110 | && install -d /etc/postfix/main.cf.d \ 111 | && install -d /etc/postfix/master.cf.d \ 112 | # Pregenerate Diffie-Hellman parameters (heavy operation) 113 | && openssl dhparam -out /etc/postfix/dh2048.pem 2048 \ 114 | # Tweak TLS/SSL settings to achieve A grade 115 | && echo "\n\ 116 | \n# TLS PARAMETERS\ 117 | \n#\ 118 | \ntls_ssl_options = NO_COMPRESSION\ 119 | \ntls_high_cipherlist = ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256\ 120 | \n\ 121 | \n# SMTP TLS PARAMETERS (outgoing connections)\ 122 | \n#\ 123 | \nsmtp_tls_security_level = may\ 124 | \nsmtp_tls_CApath = /etc/ssl/certs\ 125 | \n\ 126 | \n# SMTPD TLS PARAMETERS (incoming connections)\ 127 | \n#\ 128 | \nsmtpd_tls_security_level = may\ 129 | \nsmtpd_tls_ciphers = high\ 130 | \nsmtpd_tls_mandatory_ciphers = high\ 131 | \nsmtpd_tls_exclude_ciphers = aNULL, LOW, EXP, MEDIUM, ADH, AECDH, MD5, DSS, ECDSA, CAMELLIA128, 3DES, CAMELLIA256, RSA+AES, eNULL\ 132 | \nsmtpd_tls_dh1024_param_file = /etc/postfix/dh2048.pem\ 133 | \nsmtpd_tls_CApath = /etc/ssl/certs\ 134 | \nsmtpd_tls_cert_file = /etc/ssl/postfix/server.crt\ 135 | \nsmtpd_tls_key_file = /etc/ssl/postfix/server.key\ 136 | " >> /etc/postfix/main.cf 137 | 138 | EXPOSE 25 139 | 140 | CMD ["postfix", "start-fg"] 141 | -------------------------------------------------------------------------------- /redis/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM redis:8.0.1 2 | 3 | LABEL org.label-schema.schema-version="1.0.0" 4 | LABEL org.label-schema.vendor="EasyEngine" 5 | LABEL org.label-schema.name="redis" 6 | 7 | RUN mkdir -p /var/log/redis; \ 8 | chown -R redis: /var/log/redis 9 | COPY redis.conf /usr/local/etc/redis/redis.conf 10 | COPY purge_all_cache.lua /data/purge_all_cache.lua 11 | -------------------------------------------------------------------------------- /redis/purge_all_cache.lua: -------------------------------------------------------------------------------- 1 | local k = 0 2 | for i, name in ipairs(redis.call('KEYS', ARGV[1])) 3 | do 4 | redis.call('DEL', name) 5 | k = k+1 6 | end 7 | return k -------------------------------------------------------------------------------- /redis/redis.conf: -------------------------------------------------------------------------------- 1 | logfile "/var/log/redis/redis.log" 2 | maxmemory-policy allkeys-lru 3 | save "" --------------------------------------------------------------------------------