From e23b19f6f841720f9673bd6b3b910db6bf59fc09 Mon Sep 17 00:00:00 2001 From: Meezaan-ud-Din A Wal-Ikram Date: Sun, 20 Oct 2024 20:12:19 +0400 Subject: [PATCH] Add 8.4 Unit build --- .github/workflows/8.4.unit.yml | 69 ++++++ 8/8.4/Dockerfile.apache | 101 ++++++++ 8/8.4/Dockerfile.apache.dev | 15 ++ 8/8.4/Dockerfile.cli | 77 ++++++ 8/8.4/Dockerfile.nunit | 73 ++++++ 8/8.4/Dockerfile.nunit.dev | 6 + 8/8.4/README.md | 18 ++ 8/8.4/etc/apache2/apache2.conf | 228 ++++++++++++++++++ 8/8.4/etc/apache2/conf-enabled/host.conf | 0 .../apache2/sites-enabled/000-default.conf | 29 +++ 8/8.4/etc/cron/crontab | 1 + 8/8.4/etc/php/.gitkeep | 1 + 8/8.4/etc/php/development.ini | 46 ++++ 8/8.4/etc/php/production.ini | 42 ++++ 8/8.4/etc/ssh/.gitkeep | 0 8/8.4/etc/ssh/install-composer.sh | 17 ++ 8/8.4/var/www/html/index.php | 6 + 17 files changed, 729 insertions(+) create mode 100644 .github/workflows/8.4.unit.yml create mode 100644 8/8.4/Dockerfile.apache create mode 100644 8/8.4/Dockerfile.apache.dev create mode 100644 8/8.4/Dockerfile.cli create mode 100644 8/8.4/Dockerfile.nunit create mode 100644 8/8.4/Dockerfile.nunit.dev create mode 100644 8/8.4/README.md create mode 100644 8/8.4/etc/apache2/apache2.conf create mode 100644 8/8.4/etc/apache2/conf-enabled/host.conf create mode 100644 8/8.4/etc/apache2/sites-enabled/000-default.conf create mode 100644 8/8.4/etc/cron/crontab create mode 100644 8/8.4/etc/php/.gitkeep create mode 100644 8/8.4/etc/php/development.ini create mode 100644 8/8.4/etc/php/production.ini create mode 100644 8/8.4/etc/ssh/.gitkeep create mode 100644 8/8.4/etc/ssh/install-composer.sh create mode 100644 8/8.4/var/www/html/index.php diff --git a/.github/workflows/8.4.unit.yml b/.github/workflows/8.4.unit.yml new file mode 100644 index 0000000..7b98228 --- /dev/null +++ b/.github/workflows/8.4.unit.yml @@ -0,0 +1,69 @@ +name: Build Docker Images for PHP 8.4 with Nginx Unit +on: + workflow_dispatch: + branches: + - master + paths: + - "8/8.4/Dockerfile.nunit" + - "8/8.4/Dockerfile.nunit.dev" + push: + branches: + - "master" + paths: + - "8/8.4/Dockerfile.nunit" + - "8/8.4/Dockerfile.nunit.dev" +jobs: + docker-build-and-push: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + ## Login to all 3 registries: DockerHub, GitHub Actions Container Registry, and Quay.io ## + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Login to the GitHub Actions Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.GHCR_TOKEN }} + - name: Login to the Quay.io Container Registry + uses: docker/login-action@v3 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + - name: Checkout code + uses: actions/checkout@v2 + ## Build and push the Docker image ## + - name: Build and push the Unit Production Image + uses: docker/build-push-action@v5 + with: + context: 8/8.4 + platforms: linux/amd64,linux/arm64 + file: 8/8.4/Dockerfile.nunit + build-args: | + PHP_VERSION=8.4 + push: true + tags: | + islamicnetwork/php:8.4-unit + ghcr.io/islamic-network/php:8.4-unit + quay.io/islamic-network/php:8.4-unit + - name: Build and push the Unit Development Image + uses: docker/build-push-action@v5 + with: + context: 8/8.4 + platforms: linux/amd64,linux/arm64 + file: 8/8.4/Dockerfile.nunit.dev + build-args: | + PHP_VERSION=8.4 + push: true + tags: | + islamicnetwork/php:8.4-unit-dev + ghcr.io/islamic-network/php:8.4-unit-dev + quay.io/islamic-network/php:8.4-unit-dev diff --git a/8/8.4/Dockerfile.apache b/8/8.4/Dockerfile.apache new file mode 100644 index 0000000..418c798 --- /dev/null +++ b/8/8.4/Dockerfile.apache @@ -0,0 +1,101 @@ +ARG PHP_VERSION=$PHP_VERSION +FROM php:${PHP_VERSION}-apache + +# Setup Debian +RUN apt-get -y update && apt-get -y upgrade && ACCEPT_EULA=Y && apt-get install -y \ + unzip \ + libfreetype6-dev \ + libjpeg62-turbo-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libzip-dev \ + libgeoip-dev \ + libxml2-dev \ + libxslt-dev \ + libtidy-dev \ + libssl-dev \ + zlib1g-dev \ + libpng-dev \ + libwebp-dev \ + libgmp-dev \ + libyaml-dev \ + libjpeg-dev \ + libfreetype6-dev \ + libaio1 \ + libldap2-dev \ + libonig-dev \ + apt-file \ + wget \ + vim \ + gnupg \ + gnupg2 \ + zip \ + git \ + gcc \ + g++ \ + librdkafka-dev \ + autoconf \ + libc-dev \ + libc-client-dev \ + pkg-config \ + libkrb5-dev \ + iputils-ping \ + && rm -r /var/lib/apt/lists/* \ + && pecl install redis \ + && pecl install apcu \ + && pecl install memcached \ + && pecl install timezonedb \ + && pecl install yaml \ + && pecl install rdkafka \ + && pecl install apfd \ + && docker-php-ext-configure gd --with-freetype --with-webp --with-jpeg \ + && docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ + && docker-php-ext-install gd calendar gmp ldap sysvmsg pcntl bcmath tidy gettext intl pdo_mysql mysqli simplexml xml xsl xmlwriter zip opcache exif sockets imap \ + && docker-php-ext-enable redis yaml apcu memcached timezonedb rdkafka apfd \ + && printf "log_errors = On \nerror_log = /dev/stderr\n" > /usr/local/etc/php/conf.d/php-logs.ini + +# Install yq +RUN wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq && \ + chmod +x /usr/bin/yq + +# Apache settings +COPY etc/apache2/conf-enabled/host.conf /etc/apache2/conf-enabled/host.conf +COPY etc/apache2/apache2.conf /etc/apache2/apache2.conf +COPY etc/apache2/sites-enabled/000-default.conf /etc/apache2/sites-enabled/000-default.conf + +# PHP settings +COPY etc/php/production.ini /usr/local/etc/php/conf.d/production.ini + +# Composer +RUN mkdir -p /usr/local/ssh +COPY etc/ssh/* /usr/local/ssh/ +RUN sh /usr/local/ssh/install-composer.sh && \ + mv composer.phar /usr/local/bin/composer && \ + a2enmod proxy && \ + a2enmod proxy_http && \ + a2enmod proxy_ajp && \ + a2enmod rewrite && \ + a2enmod deflate && \ + a2enmod headers && \ + a2enmod proxy_balancer && \ + a2enmod proxy_connect && \ + a2enmod ssl && \ + a2enmod cache && \ + a2enmod expires && \ +# Run apache on port 8080 instead of 80 due. On linux, ports under 1024 require admin privileges and we run apache as www-data. + sed -i 's/Listen 80/Listen 8080/g' /etc/apache2/ports.conf && \ + chmod g+w /var/log/apache2 && \ + chmod 777 /var/lock/apache2 && \ + chmod 777 /var/run/apache2 && \ + echo "" > /var/www/html/phpinfo.php + +COPY var/www/html/index.php /var/www/html/index.php + +EXPOSE 8080 + +### PROD ENVIRONMENT SPECIFIC ### +################################ + +ENV PROVISION_CONTEXT "production" + +################################ diff --git a/8/8.4/Dockerfile.apache.dev b/8/8.4/Dockerfile.apache.dev new file mode 100644 index 0000000..c8888aa --- /dev/null +++ b/8/8.4/Dockerfile.apache.dev @@ -0,0 +1,15 @@ +ARG PHP_VERSION=$PHP_VERSION +FROM ghcr.io/islamic-network/php:${PHP_VERSION}-apache + +### DEV ENVIRONMENT SPECIFIC ### +################################ +ENV PROVISION_CONTEXT "development" +RUN pecl install xdebug && docker-php-ext-enable xdebug && touch /var/log/xdebug.log && chmod 777 /var/log/xdebug.log + +# Add Development PHP.ini +COPY etc/php/development.ini /usr/local/etc/php/conf.d/development.ini + +# Remove Production PHP.ini +RUN rm -rf /usr/local/etc/php/conf.d/production.ini + +################################ diff --git a/8/8.4/Dockerfile.cli b/8/8.4/Dockerfile.cli new file mode 100644 index 0000000..7323907 --- /dev/null +++ b/8/8.4/Dockerfile.cli @@ -0,0 +1,77 @@ +ARG PHP_VERSION=$PHP_VERSION +FROM php:${PHP_VERSION}-cli + +# Setup Debian +RUN apt-get -y update && apt-get -y upgrade && ACCEPT_EULA=Y && apt-get install -y \ + unzip \ + libfreetype6-dev \ + libjpeg62-turbo-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libzip-dev \ + libgeoip-dev \ + libxml2-dev \ + libxslt-dev \ + libtidy-dev \ + libssl-dev \ + zlib1g-dev \ + libpng-dev \ + libwebp-dev \ + libgmp-dev \ + libjpeg-dev \ + libyaml-dev \ + libfreetype6-dev \ + libaio1 \ + libldap2-dev \ + libonig-dev \ + apt-file \ + wget \ + vim \ + gnupg \ + gnupg2 \ + zip \ + git \ + curl \ + jq \ + gcc \ + g++ \ + librdkafka-dev \ + autoconf \ + libc-dev \ + pkg-config \ + iputils-ping \ + && pecl install redis \ + && pecl install apcu \ + && pecl install memcached \ + && pecl install timezonedb \ + #&& pecl install grpc \ + && pecl install rdkafka \ + && pecl install yaml \ + && docker-php-ext-configure gd --with-freetype --with-webp --with-jpeg \ + && docker-php-ext-install gd calendar gmp ldap sysvmsg pcntl iconv bcmath xml mbstring pdo tidy gettext intl pdo_mysql mysqli simplexml xml xsl xmlwriter zip opcache exif sockets \ + && docker-php-ext-enable redis apcu memcached timezonedb rdkafka yaml \ + && printf "log_errors = On \nerror_log = /dev/stderr\n" > /usr/local/etc/php/conf.d/php-logs.ini + +# PHP settings +COPY etc/php/production.ini /usr/local/etc/php/conf.d/production.ini + +# Composer +RUN mkdir -p /usr/local/ssh +COPY etc/ssh/* /usr/local/ssh/ +RUN sh /usr/local/ssh/install-composer.sh && \ + mv composer.phar /usr/local/bin/composer + +## Install kubectl and yq +RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \ + chmod u+x ./kubectl && \ + mv ./kubectl /usr/bin/kubectl && \ + wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq && \ + chmod +x /usr/bin/yq + + +### PROD ENVIRONMENT SPECIFIC ### +################################ + +ENV PROVISION_CONTEXT "cli" + +################################ diff --git a/8/8.4/Dockerfile.nunit b/8/8.4/Dockerfile.nunit new file mode 100644 index 0000000..12cddf0 --- /dev/null +++ b/8/8.4/Dockerfile.nunit @@ -0,0 +1,73 @@ +FROM unit:php8.3 + +# Setup Debian +RUN apt-get -y update && apt-get -y upgrade && ACCEPT_EULA=Y && apt-get install -y \ + unzip \ + libfreetype6-dev \ + libjpeg62-turbo-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libzip-dev \ + libgeoip-dev \ + libxml2-dev \ + libxslt-dev \ + libtidy-dev \ + libssl-dev \ + zlib1g-dev \ + libpng-dev \ + libwebp-dev \ + libgmp-dev \ + libyaml-dev \ + libjpeg-dev \ + libfreetype6-dev \ + libaio1 \ + libldap2-dev \ + libonig-dev \ + apt-file \ + wget \ + vim \ + gnupg \ + gnupg2 \ + zip \ + git \ + gcc \ + g++ \ + librdkafka-dev \ + autoconf \ + libc-dev \ + libc-client-dev \ + pkg-config \ + libkrb5-dev \ + iputils-ping \ + procps \ + && rm -r /var/lib/apt/lists/* \ + && pecl install redis \ + && pecl install apcu \ + && pecl install memcached \ + && pecl install timezonedb \ + && pecl install yaml \ + && pecl install rdkafka \ + && pecl install apfd \ + && docker-php-ext-configure gd --with-freetype --with-webp --with-jpeg \ + && docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ + && docker-php-ext-install gd calendar gmp ldap sysvmsg pcntl bcmath tidy gettext intl pdo_mysql mysqli simplexml xml xsl xmlwriter zip opcache exif sockets imap \ + #&& docker-php-ext-enable redis yaml apcu memcached timezonedb grpc rdkafka apfd + && docker-php-ext-enable redis apcu memcached timezonedb rdkafka apfd + +# Install yq +RUN wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq && \ + chmod +x /usr/bin/yq + +# Composer +RUN mkdir -p /usr/local/ssh +COPY etc/ssh/* /usr/local/ssh/ +RUN sh /usr/local/ssh/install-composer.sh && mv composer.phar /usr/local/bin/composer + +# forward log to docker log collector +RUN ln -sf /dev/stdout /var/log/unit.log + +ENV PROVISION_CONTEXT "nunit_production" +RUN echo "" > /var/www/html/phpinfo.php + +# Add Development PHP.ini +COPY etc/php/production.ini /usr/local/etc/php/conf.d/production.ini diff --git a/8/8.4/Dockerfile.nunit.dev b/8/8.4/Dockerfile.nunit.dev new file mode 100644 index 0000000..818da6e --- /dev/null +++ b/8/8.4/Dockerfile.nunit.dev @@ -0,0 +1,6 @@ +FROM ghcr.io/islamic-network/php:8.2-unit + +ENV PROVISION_CONTEXT "nunit_development" + +# Add Development PHP.ini +COPY etc/php/development.ini /usr/local/etc/php/conf.d/production.ini diff --git a/8/8.4/README.md b/8/8.4/README.md new file mode 100644 index 0000000..d053e08 --- /dev/null +++ b/8/8.4/README.md @@ -0,0 +1,18 @@ +``` +docker build . -t islamicnetwork/php:8.4-cli --build-arg PHP_VERSION=8.4 -f Dockerfile.cli +docker build . -t islamicnetwork/php:8.4-apache --build-arg PHP_VERSION=8.4 -f Dockerfile.apache +docker build . -t islamicnetwork/php:8.4-apache-dev --build-arg PHP_VERSION=8.4 -f Dockerfile.apache.dev + +docker tag islamicnetwork/php:8.4-cli quay.io/islamic-network/php:8.4-cli +docker tag islamicnetwork/php:8.4-apache quay.io/islamic-network/php:8.4-apache +docker tag islamicnetwork/php:8.4-apache-dev quay.io/islamic-network/php:8.4-apache-dev + +docker push islamicnetwork/php:8.4-cli +docker push quay.io/islamic-network/php:8.4-cli +docker push islamicnetwork/php:8.4-apache +docker push quay.io/islamic-network/php:8.4-apache +docker push islamicnetwork/php:8.4-apache-dev +docker push quay.io/islamic-network/php:8.4-apache-dev +``` + + diff --git a/8/8.4/etc/apache2/apache2.conf b/8/8.4/etc/apache2/apache2.conf new file mode 100644 index 0000000..9327dea --- /dev/null +++ b/8/8.4/etc/apache2/apache2.conf @@ -0,0 +1,228 @@ +# This is the main Apache server configuration file. It contains the +# configuration directives that give the server its instructions. +# See http://httpd.apache.org/docs/2.4/ for detailed information about +# the directives and /usr/share/doc/apache2/README.Debian about Debian specific +# hints. +# +# +# Summary of how the Apache 2 configuration works in Debian: +# The Apache 2 web server configuration in Debian is quite different to +# upstream's suggested way to configure the web server. This is because Debian's +# default Apache2 installation attempts to make adding and removing modules, +# virtual hosts, and extra configuration directives as flexible as possible, in +# order to make automating the changes and administering the server as easy as +# possible. + +# It is split into several files forming the configuration hierarchy outlined +# below, all located in the /etc/apache2/ directory: +# +# /etc/apache2/ +# |-- apache2.conf +# | `-- ports.conf +# |-- mods-enabled +# | |-- *.load +# | `-- *.conf +# |-- conf-enabled +# | `-- *.conf +# `-- sites-enabled +# `-- *.conf +# +# +# * apache2.conf is the main configuration file (this file). It puts the pieces +# together by including all remaining configuration files when starting up the +# web server. +# +# * ports.conf is always included from the main configuration file. It is +# supposed to determine listening ports for incoming connections which can be +# customized anytime. +# +# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/ +# directories contain particular configuration snippets which manage modules, +# global configuration fragments, or virtual host configurations, +# respectively. +# +# They are activated by symlinking available configuration files from their +# respective *-available/ counterparts. These should be managed by using our +# helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See +# their respective man pages for detailed information. +# +# * The binary is called apache2. Due to the use of environment variables, in +# the default configuration, apache2 needs to be started/stopped with +# /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not +# work with the default configuration. + + +# Global configuration +# + +# +# ServerRoot: The top of the directory tree under which the server's +# configuration, error, and log files are kept. +# +# NOTE! If you intend to place this on an NFS (or otherwise network) +# mounted filesystem then please read the Mutex documentation (available +# at ); +# you will save yourself a lot of trouble. +# +# Do NOT add a slash at the end of the directory path. +# +#ServerRoot "/etc/apache2" + +# +# The accept serialization lock file MUST BE STORED ON A LOCAL DISK. +# +#Mutex file:${APACHE_LOCK_DIR} default + +# +# The directory where shm and other runtime files will be stored. +# + +DefaultRuntimeDir ${APACHE_RUN_DIR} + +# +# PidFile: The file in which the server should record its process +# identification number when it starts. +# This needs to be set in /etc/apache2/envvars +# +PidFile ${APACHE_PID_FILE} + +# +# Timeout: The number of seconds before receives and sends time out. +# +Timeout 300 + +# +# KeepAlive: Whether or not to allow persistent connections (more than +# one request per connection). Set to "Off" to deactivate. +# +KeepAlive On + +# +# MaxKeepAliveRequests: The maximum number of requests to allow +# during a persistent connection. Set to 0 to allow an unlimited amount. +# We recommend you leave this number high, for maximum performance. +# +MaxKeepAliveRequests 100 + +# +# KeepAliveTimeout: Number of seconds to wait for the next request from the +# same client on the same connection. +# +KeepAliveTimeout 7 + + +# These need to be set in /etc/apache2/envvars +User ${APACHE_RUN_USER} +Group ${APACHE_RUN_GROUP} + +# +# HostnameLookups: Log the names of clients or just their IP addresses +# e.g., www.apache.org (on) or 204.62.129.132 (off). +# The default is off because it'd be overall better for the net if people +# had to knowingly turn this feature on, since enabling it means that +# each client request will result in AT LEAST one lookup request to the +# nameserver. +# +HostnameLookups Off + +# ErrorLog: The location of the error log file. +# If you do not specify an ErrorLog directive within a +# container, error messages relating to that virtual host will be +# logged here. If you *do* define an error logfile for a +# container, that host's errors will be logged there and not here. +# +ErrorLog ${APACHE_LOG_DIR}/error.log + +# +# LogLevel: Control the severity of messages logged to the error_log. +# Available values: trace8, ..., trace1, debug, info, notice, warn, +# error, crit, alert, emerg. +# It is also possible to configure the log level for particular modules, e.g. +# "LogLevel info ssl:warn" +# +LogLevel warn + +# Include module configuration: +IncludeOptional mods-enabled/*.load +IncludeOptional mods-enabled/*.conf + +# Include list of ports to listen on +Include ports.conf + + +# Sets the default security model of the Apache2 HTTPD server. It does +# not allow access to the root filesystem outside of /usr/share and /var/www. +# The former is used by web applications packaged in Debian, +# the latter may be used for local directories served by the web server. If +# your system is serving content from a sub-directory in /srv you must allow +# access here, or in any related virtual host. + + Options FollowSymLinks + AllowOverride None + Require all denied + + + + AllowOverride None + Require all granted + + + + Options Indexes FollowSymLinks + AllowOverride None + Require all granted + + +# +# Options Indexes FollowSymLinks +# AllowOverride None +# Require all granted +# + + + + +# AccessFileName: The name of the file to look for in each directory +# for additional configuration directives. See also the AllowOverride +# directive. +# +AccessFileName .htaccess + +# +# The following lines prevent .htaccess and .htpasswd files from being +# viewed by Web clients. +# + + Require all denied + + + +# +# The following directives define some format nicknames for use with +# a CustomLog directive. +# +# These deviate from the Common Log Format definitions in that they use %O +# (the actual bytes sent including headers) instead of %b (the size of the +# requested file), because the latter makes it impossible to detect partial +# requests. +# +# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended. +# Use mod_remoteip instead. +# +LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined +LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined +LogFormat "%h %l %u %t \"%r\" %>s %O" common +LogFormat "%{Referer}i -> %U" referer +LogFormat "%{User-agent}i" agent +LogFormat "%{%a %m/%d/%Y @ %I:%M:%S.}t%{msec_frac}t %{%p %Z}t %h (%{X-Forwarded-For}i) > %v:%p \"%r\" %I %D %>s %b %k %L \"%{Referer}i\" \"%{User-Agent}i\" %u %{User}C %{SessionTracker}C" enhanced + +# Include of directories ignores editors' and dpkg's backup files, +# see README.Debian for details. + +# Include generic snippets of statements +IncludeOptional conf-enabled/*.conf + +# Include the virtual host configurations: +IncludeOptional sites-enabled/*.conf + +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet diff --git a/8/8.4/etc/apache2/conf-enabled/host.conf b/8/8.4/etc/apache2/conf-enabled/host.conf new file mode 100644 index 0000000..e69de29 diff --git a/8/8.4/etc/apache2/sites-enabled/000-default.conf b/8/8.4/etc/apache2/sites-enabled/000-default.conf new file mode 100644 index 0000000..cdb2feb --- /dev/null +++ b/8/8.4/etc/apache2/sites-enabled/000-default.conf @@ -0,0 +1,29 @@ + + # The ServerName directive sets the request scheme, hostname and port that + # the server uses to identify itself. This is used when creating + # redirection URLs. In the context of virtual hosts, the ServerName + # specifies what hostname must appear in the request's Host: header to + # match this virtual host. For the default virtual host (this file) this + # value is not decisive as it is used as a last resort host regardless. + # However, you must set it for any further virtual host explicitly. + #ServerName www.example.com + + ServerAdmin webmaster@localhost + DocumentRoot /var/www/html + + # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, + # error, crit, alert, emerg. + # It is also possible to configure the loglevel for particular + # modules, e.g. + #LogLevel info ssl:warn + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log enhanced + + # For most configuration files from conf-available/, which are + # enabled or disabled at a global level, it is possible to + # include a line for only one particular virtual host. For example the + # following line enables the CGI configuration for this host only + # after it has been globally disabled with "a2disconf". + #Include conf-available/serve-cgi-bin.conf + diff --git a/8/8.4/etc/cron/crontab b/8/8.4/etc/cron/crontab new file mode 100644 index 0000000..3036fe8 --- /dev/null +++ b/8/8.4/etc/cron/crontab @@ -0,0 +1 @@ +# m h dom mon dow user command diff --git a/8/8.4/etc/php/.gitkeep b/8/8.4/etc/php/.gitkeep new file mode 100644 index 0000000..e166442 --- /dev/null +++ b/8/8.4/etc/php/.gitkeep @@ -0,0 +1 @@ +.gitkeep diff --git a/8/8.4/etc/php/development.ini b/8/8.4/etc/php/development.ini new file mode 100644 index 0000000..428407f --- /dev/null +++ b/8/8.4/etc/php/development.ini @@ -0,0 +1,46 @@ +; ------------------------------------- +; DEVELOPMENT configuration +; ------------------------------------- + +; this file will overwrite default php.ini settings + +display_errors = 1 + +short_open_tag = On +variables_order = 'GPCS' +request_order = 'GP' + +allow_url_fopen = On +allow_url_include = Off + +memory_limit = 512M +max_execution_time = 900 +max_input_time = 300 +post_max_size = 50M +upload_max_filesize = 50M +max_input_vars = 5000 + +expose_php = Off + +date.timezone = UTC + +mysql.default_host = mysql +mysqli.default_host = mysql + +; Zend OPCache +opcache.enable = 0 +opcache.memory_consumption = 256 +opcache.interned_strings_buffer = 16 +opcache.max_accelerated_files = 10000 +opcache.fast_shutdown = 1 +opcache.enable_cli = 0 +opcache.revalidate_freq = 0 + +; XDebug +xdebug.mode = debug +xdebug.client_host = host.docker.internal +xdebug.cli_color = 1 +xdebug.max_nesting_level = 1000 +;xdebug.log = 'php://stdout' +;xdebug.output_dir = '/tmp/debug/' +;xhprof.output_dir = '/tmp/debug/' diff --git a/8/8.4/etc/php/production.ini b/8/8.4/etc/php/production.ini new file mode 100644 index 0000000..eee9eae --- /dev/null +++ b/8/8.4/etc/php/production.ini @@ -0,0 +1,42 @@ +; ------------------------------------- +; PRODUCTION configuration +; ------------------------------------- + +; this file will overwrite default php.ini settings + +display_errors = 0 + +short_open_tag = On +variables_order = 'GPCS' +request_order = 'GP' + +allow_url_fopen = On +allow_url_include = Off + +memory_limit = 512M +max_execution_time = 900 +max_input_time = 300 +post_max_size = 50M +upload_max_filesize = 50M +max_input_vars = 5000 + +expose_php = Off + +date.timezone = UTC + +mysql.default_host = mysql +mysqli.default_host = mysql + +; Zend OPCache +opcache.enable = 1 +opcache.memory_consumption = 128 +opcache.interned_strings_buffer = 16 +opcache.max_accelerated_files = 10000 +opcache.fast_shutdown = 1 +opcache.enable_cli = 1 +opcache.revalidate_freq = 3600 +opcache.validate_timestamps = 1 + +; XDebug +xdebug.remote_enable = 0 +xdebug.remote_connect_back = off diff --git a/8/8.4/etc/ssh/.gitkeep b/8/8.4/etc/ssh/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/8/8.4/etc/ssh/install-composer.sh b/8/8.4/etc/ssh/install-composer.sh new file mode 100644 index 0000000..a61aff8 --- /dev/null +++ b/8/8.4/etc/ssh/install-composer.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" +php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" +ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" + +if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ] +then + >&2 echo 'ERROR: Invalid installer checksum' + rm composer-setup.php + exit 1 +fi + +php composer-setup.php --quiet +RESULT=$? +rm composer-setup.php +exit $RESULT diff --git a/8/8.4/var/www/html/index.php b/8/8.4/var/www/html/index.php new file mode 100644 index 0000000..a7c642b --- /dev/null +++ b/8/8.4/var/www/html/index.php @@ -0,0 +1,6 @@ + getenv('PROVISION_CONTEXT') +]; + +echo json_encode($data); \ No newline at end of file