diff --git a/config/nginx-sites.conf b/config/nginx-sites.conf index cba805bb61a413f769a977bbb52cc0d746bc9d71..63eea633a574eaffb47b3a083c327ef8e02711f2 100644 --- a/config/nginx-sites.conf +++ b/config/nginx-sites.conf @@ -10,14 +10,6 @@ location ^~ /trunk { include nginx-php.conf; } -location ^~ /uol-5.1 { - alias /var/www/html/studip/uol/5.1/public; - index index.php index.html index.html; - - set $site_document_root /var/www/html/studip/uol/5.1/public; - include nginx-php.conf; -} - location ^~ /5.0 { alias /var/www/html/studip/5.0/public; index index.php index.html index.html; @@ -61,3 +53,19 @@ location ^~ /uol-5.4 { set $site_document_root /var/www/html/studip/uol/5.4/public; include nginx-php.conf; } + +location ^~ /uol-5.1 { + alias /var/www/html/studip/uol/5.1/public; + index index.php index.html index.html; + + set $site_document_root /var/www/html/studip/uol/5.1/public; + include nginx-php.conf; +} + +location ^~ /peoe-4.6 { + alias /var/www/html/studip/uol/peoe-4.6/public; + index index.php index.html index.html; + + set $site_document_root /var/www/html/studip/uol/peoe-4.6/public; + include nginx-php.conf; +} diff --git a/config/nginx.conf b/config/nginx.conf index 0dfa6ff71c789a35de779717096d7f2ff4545953..d91e17ab14b8ea520ad069f111f759192df20583 100644 --- a/config/nginx.conf +++ b/config/nginx.conf @@ -13,6 +13,12 @@ upstream php82_backend { upstream php83_backend { server php83:9000; } +upstream php72_backend { + server php72:9000; +} +upstream php73_backend { + server php73:9000; +} server { listen 80 default_server; @@ -63,3 +69,23 @@ server { include sites.conf; } + +server { + listen 88 default_server; + server_name _; + root /var/www/html; + + set $fastcgi_backend php72_backend; + + include sites.conf; +} + +server { + listen 89 default_server; + server_name _; + root /var/www/html; + + set $fastcgi_backend php73_backend; + + include sites.conf; +} diff --git a/docker-compose.yml b/docker-compose.yml index 99f042fd4c64b9b8085e59a276f6b6a4ae7bb0db..fbc1a195505ac4504ac865a3ed71f66964ee8b99 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,6 +9,8 @@ services: - "8081:82" - "8082:83" - "8083:84" + - "8072:88" + - "8073:89" networks: - code-network volumes: @@ -48,6 +50,14 @@ services: <<: *base-php build: dockerfile: php/8.3-Dockerfile + php72: + <<: *base-php + build: + dockerfile: php/7.2-Dockerfile + php73: + <<: *base-php + build: + dockerfile: php/7.3-Dockerfile networks: code-network: diff --git a/generate.sh b/generate.sh new file mode 100755 index 0000000000000000000000000000000000000000..20da5cbdd7f582dd64a561622a4875cb83e35bb9 --- /dev/null +++ b/generate.sh @@ -0,0 +1 @@ +docker compose up --build diff --git a/php/7.2-Dockerfile b/php/7.2-Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..b43108441c3918f62c1ee9facf0f97b0ea803270 --- /dev/null +++ b/php/7.2-Dockerfile @@ -0,0 +1,45 @@ +FROM php:7.2-fpm + +# Install system requirements +RUN apt update && apt install -y --no-install-recommends \ + default-mysql-client \ + default-libmysqlclient-dev \ + libcurl4-openssl-dev zlib1g-dev \ + libjpeg-dev \ + libpng-dev \ + libpq-dev \ + libwebp-dev \ + libonig-dev \ + libzip-dev \ + libicu-dev \ + libfreetype6-dev \ + vim \ + && rm -rf /var/lib/apt/lists/* + +# Install php extensions +RUN docker-php-ext-configure gd --with-jpeg-dir --with-freetype-dir --with-webp-dir +RUN docker-php-ext-install -j$(nproc) gettext curl gd mbstring zip pdo pdo_mysql pdo_pgsql mysqli intl json + +# Install php-soap +RUN apt update \ + && apt install -y libxml2-dev \ + && rm -rf /var/lib/apt/lists/* +RUN docker-php-ext-install soap + +# Install de_DE locale +RUN apt update \ + && apt install -y --no-install-recommends locales \ + && locale-gen de_DE \ + && update-locale \ + && rm -rf /var/lib/apt/lists/* + +# Install Memcached +RUN apt update \ + && apt install -y git libmemcached11 libmemcachedutil2 build-essential libmemcached-dev libz-dev \ + && rm -rf /var/lib/apt/lists/* \ + && pecl install memcached \ + && docker-php-ext-enable memcached + +# Install redis +RUN pecl install redis \ + && docker-php-ext-enable redis diff --git a/php/7.3-Dockerfile b/php/7.3-Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..16d257ecd169fb55598f4e1fb69ac240987821b6 --- /dev/null +++ b/php/7.3-Dockerfile @@ -0,0 +1,45 @@ +FROM php:7.3-fpm + +# Install system requirements +RUN apt update && apt install -y --no-install-recommends \ + default-mysql-client \ + default-libmysqlclient-dev \ + libcurl4-openssl-dev zlib1g-dev \ + libjpeg-dev \ + libpng-dev \ + libpq-dev \ + libwebp-dev \ + libonig-dev \ + libzip-dev \ + libicu-dev \ + libfreetype6-dev \ + vim \ + && rm -rf /var/lib/apt/lists/* + +# Install php extensions +RUN docker-php-ext-configure gd --with-jpeg-dir --with-freetype-dir --with-webp-dir +RUN docker-php-ext-install -j$(nproc) gettext curl gd mbstring zip pdo pdo_mysql pdo_pgsql mysqli intl json + +# Install php-soap +RUN apt update \ + && apt install -y libxml2-dev \ + && rm -rf /var/lib/apt/lists/* +RUN docker-php-ext-install soap + +# Install de_DE locale +RUN apt update \ + && apt install -y --no-install-recommends locales \ + && locale-gen de_DE \ + && update-locale \ + && rm -rf /var/lib/apt/lists/* + +# Install Memcached +RUN apt update \ + && apt install -y git libmemcached11 libmemcachedutil2 build-essential libmemcached-dev libz-dev \ + && rm -rf /var/lib/apt/lists/* \ + && pecl install memcached \ + && docker-php-ext-enable memcached + +# Install redis +RUN pecl install redis \ + && docker-php-ext-enable redis