Browse Source

* use php 81 as default

master
dimti 1 year ago
parent
commit
cea2dbb653
  1. 2
      bash/enter-to-workspace.sh
  2. 4
      bash/xdebug-quit.sh
  3. 4
      bash/xdebug-start.sh
  4. 24
      config/nginx/conf.d/vhosts.conf.example

2
bash/enter-to-workspace.sh

@ -7,7 +7,7 @@ DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
PHP_VERSION=$1 # Without dot PHP_VERSION=$1 # Without dot
if [[ -z "${PHP_VERSION}" ]]; then PHP_VERSION=74; fi
if [[ -z "${PHP_VERSION}" ]]; then PHP_VERSION=81; fi
CONTAINER=$(docker ps | grep workspace${PHP_VERSION} | awk '{print $1}') CONTAINER=$(docker ps | grep workspace${PHP_VERSION} | awk '{print $1}')

4
bash/xdebug-quit.sh

@ -4,11 +4,11 @@ DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
PHP_VERSION=$1 # Without dot PHP_VERSION=$1 # Without dot
WITH_PROFILER=$2 WITH_PROFILER=$2
if [[ -z "${PHP_VERSION}" ]]; then PHP_VERSION=74; fi
if [[ -z "${PHP_VERSION}" ]]; then PHP_VERSION=81; fi
POSSIBLE_XDEBUG_VERSION=xdebug2 POSSIBLE_XDEBUG_VERSION=xdebug2
if [[ $PHP_VERSION -eq 81 ]]; then
if [[ $PHP_VERSION -ge 81 ]]; then
POSSIBLE_XDEBUG_VERSION=xdebug3 POSSIBLE_XDEBUG_VERSION=xdebug3
fi fi

4
bash/xdebug-start.sh

@ -4,11 +4,11 @@ DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
PHP_VERSION=$1 # Without dot PHP_VERSION=$1 # Without dot
WITH_PROFILER=$2 WITH_PROFILER=$2
if [[ -z "${PHP_VERSION}" ]]; then PHP_VERSION=74; fi
if [[ -z "${PHP_VERSION}" ]]; then PHP_VERSION=81; fi
POSSIBLE_XDEBUG_VERSION=xdebug2 POSSIBLE_XDEBUG_VERSION=xdebug2
if [[ $PHP_VERSION -eq 81 ]]; then
if [[ $PHP_VERSION -ge 81 ]]; then
POSSIBLE_XDEBUG_VERSION=xdebug3 POSSIBLE_XDEBUG_VERSION=xdebug3
fi fi

24
config/nginx/conf.d/vhosts.conf.example

@ -6,6 +6,10 @@ upstream php74 {
server php74:9000; server php74:9000;
} }
upstream php81 {
server php81:9000;
}
map $http_host $root { map $http_host $root {
octobercms.local.wpstudio.ru /usr/share/nginx/html/someproject; octobercms.local.wpstudio.ru /usr/share/nginx/html/someproject;
wordpress.local.wpstudio.ru /usr/share/nginx/html/someprojectwp; wordpress.local.wpstudio.ru /usr/share/nginx/html/someprojectwp;
@ -32,6 +36,26 @@ server {
include includes.d/staticfiles.conf; include includes.d/staticfiles.conf;
client_max_body_size 300M; client_max_body_size 300M;
location ~ ^/index.php { location ~ ^/index.php {
fastcgi_pass php81;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SERVER_NAME $host;
}
}
server {
listen 80;
server_name
some-php74-site.local.wpstudio.ru
;
root $root;
#include global/auth.conf;
#@see https://vcs.wpstudio.ru/wpstudio/nginx-examples
include includes.d/octobercms.conf;
include includes.d/staticfiles.conf;
client_max_body_size 300M;
location ~ ^/index.php {
fastcgi_pass php74; fastcgi_pass php74;
include fastcgi_params; include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

Loading…
Cancel
Save