commit fe0b5cfd37789473503c2eb9ac3690c19b2a9cb3 Author: Pavel Dmitriev Date: Tue Jun 23 17:41:39 2020 +0300 Initial commit diff --git a/000-default.conf b/000-default.conf new file mode 100644 index 0000000..e435af0 --- /dev/null +++ b/000-default.conf @@ -0,0 +1,35 @@ + + # 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 + + + AllowOverride all + + + # 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 combined + + # 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 + + +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3c4cde5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM ubuntu:18.04 + +COPY ["timezone", "localtime", "/etc/"] + +RUN apt update -y \ + && apt-get install gnupg gnupg1 gnupg2 software-properties-common -y \ + && apt-add-repository ppa:ondrej/php \ + && apt-get update -y \ + && apt-get install apache2 php php-soap php-snmp php-mysql php-curl php-ldap php-xml php-mbstring php-oauth php-gd cron -y \ + && apt-get purge gnupg gnupg1 gnupg2 software-properties-common -y \ + && apt-get autoremove -y \ + && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/www/html/* \ + && a2enmod rewrite + +COPY docker-entrypoint.sh / +COPY 000-default.conf /etc/apache2/sites-available +EXPOSE 80 +CMD ["/docker-entrypoint.sh"] + + + diff --git a/Dockerfile.debian b/Dockerfile.debian new file mode 100644 index 0000000..80660c1 --- /dev/null +++ b/Dockerfile.debian @@ -0,0 +1,17 @@ +FROM debian + + +RUN apt update -y \ + && apt-get install apache2 php php-soap php-snmp php-mysql php-curl php-ldap php-xml php-mbstring php-oauth php-gd cron -y \ + && apt-get autoremove -y \ + && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/www/html/* \ + && a2enmod rewrite + +COPY docker-entrypoint.sh / +COPY 000-default.conf /etc/apache2/sites-available +EXPOSE 80 +CMD ["/docker-entrypoint.sh"] + + + diff --git a/apt-add-repos b/apt-add-repos new file mode 100755 index 0000000..2222a3c --- /dev/null +++ b/apt-add-repos @@ -0,0 +1,24 @@ +#!/bin/bash +if [ $# -eq 1 ] +NM=`uname -a && date` +NAME=`echo $NM | md5sum | cut -f1 -d" "` +then + ppa_name=`echo "$1" | cut -d":" -f2 -s` + if [ -z "$ppa_name" ] + then + echo "PPA name not found" + echo "Utility to add PPA repositories in your debian machine" + echo "$0 ppa:user/ppa-name" + else + echo "$ppa_name" + echo "deb http://ppa.launchpad.net/$ppa_name/ubuntu xenial main" >> /etc/apt/sources.list + apt-get update >> /dev/null 2> /tmp/${NAME}_apt_add_key.txt + key=`cat /tmp/${NAME}_apt_add_key.txt | cut -d":" -f6 | cut -d" " -f3` + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $key + rm -rf /tmp/${NAME}_apt_add_key.txt + fi +else + echo "Utility to add PPA repositories in your debian machine" + echo "$0 ppa:user/ppa-name" +fi + diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..e2f028b --- /dev/null +++ b/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +build_version=`cat last_version` +(( build_version++ )) +echo $build_version; + +docker build --tag=mxfox.ru/chimera/fox-web-basic:${build_version} . +docker tag mxfox.ru/chimera/fox-web-basic:${build_version} mxfox.ru/chimera/fox-web-basic:latest +echo ${build_version} > last_version \ No newline at end of file diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh new file mode 100755 index 0000000..9364c3a --- /dev/null +++ b/docker-entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +service cron start +bash -c "source /etc/apache2/envvars && exec /usr/sbin/apache2 -DFOREGROUND" \ No newline at end of file diff --git a/last_version b/last_version new file mode 100644 index 0000000..9902f17 --- /dev/null +++ b/last_version @@ -0,0 +1 @@ +28 diff --git a/localtime b/localtime new file mode 100644 index 0000000..aeb4321 Binary files /dev/null and b/localtime differ diff --git a/ondrej-ubuntu-php-focal.list b/ondrej-ubuntu-php-focal.list new file mode 100644 index 0000000..a5b9191 --- /dev/null +++ b/ondrej-ubuntu-php-focal.list @@ -0,0 +1,2 @@ +deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main +# deb-src http://ppa.launchpad.net/ondrej/php/ubuntu focal main diff --git a/ondrej_ubuntu_php.gpg b/ondrej_ubuntu_php.gpg new file mode 100644 index 0000000..82ef42b Binary files /dev/null and b/ondrej_ubuntu_php.gpg differ diff --git a/timezone b/timezone new file mode 100644 index 0000000..94394e5 --- /dev/null +++ b/timezone @@ -0,0 +1 @@ +Europe/Moscow