This commit is contained in:
chenc 2024-05-16 11:07:12 +08:00
parent fb3df60193
commit 85989fcfbc
9 changed files with 50 additions and 35 deletions

View File

@ -1,15 +1,23 @@
IMAGE_BASE=registry.cn-hangzhou.aliyuncs.com/aix_chenc
OPENRESTY_VERSION=1.25.3.1
################ Net Congfig ######################
NET_SUBNET=10.12.25
################# WEB目录 ######################
WWWROOT_PATH="./www"
################# PHP Config ######################
PHP73_VERSION=7.3.33
PHP74_VERSION=7.4.33
PHP81_VERSION=8.1.24
PHP83_VERSION=8.3.0
################ Elasticsearch ######################
ELK_VERSION=7.17.10
ELASTICSEARCH_HOST_HTTP_PORT=9200
ELK_ELASTIC_PASSWD=qq1458513
################# WEB目录 ######################
WWWROOT_PATH="./www"
################# NodeJS ##################
NODEJS_VERSION="18.17.0"

View File

@ -77,7 +77,7 @@ services:
- redis
openresty:
image: ${IMAGE_BASE}/openresty:1.21.4.1
image: ${IMAGE_BASE}/openresty:${OPENRESTY_VERSION:1.25.3.1}
container_name: openresty
restart: always
ports:
@ -126,7 +126,7 @@ services:
ipv4_address: ${NET_SUBNET:-10.12.25}.3
php73:
image: ${IMAGE_BASE}/php:7.3.33
image: ${IMAGE_BASE}/php:${PHP73_VERSION:7.3.33}
container_name: php73
restart: always
volumes:
@ -156,7 +156,7 @@ services:
- redis
php74:
image: ${IMAGE_BASE}/php:7.4.33
image: ${IMAGE_BASE}/php:${PHP74_VERSION:7.4.33}
container_name: php74
restart: always
volumes:
@ -185,7 +185,7 @@ services:
- redis
php81:
image: ${IMAGE_BASE}/php:8.1.24
image: ${IMAGE_BASE}/php:${PHP81_VERSION:8.1.24}
container_name: php81
restart: always
volumes:
@ -215,7 +215,7 @@ services:
condition: service_healthy
php83:
image: ${IMAGE_BASE}/php:8.3.0
image: ${IMAGE_BASE}/php:${PHP83_VERSION:8.3.0}
container_name: php83
restart: always
volumes:

1
openresty/config/conf/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
nginx.conf

View File

@ -79,30 +79,10 @@ lua_shared_dict my_limit_req_store1 100m;
stub_status on;
access_log off;
}
location ~ ^/(status_73|ping_73)$ {
access_log off;
fastcgi_pass php73:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
}
location ~ ^/(status_74|ping_74)$ {
access_log off;
fastcgi_pass php74:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
}
location ~ ^/(status_81|ping_81)$ {
access_log off;
fastcgi_pass php81:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
}
location ~ ^/(status_83|ping_83)$ {
access_log off;
fastcgi_pass php83:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
}
include ping/php73.conf;
include ping/php74.conf;
include ping/php81.conf;
include ping/php83.conf;
location /aix-agent {
proxy_pass http://host.docker.internal:10115/;
}

View File

@ -0,0 +1,6 @@
location ~ ^/(status_73|ping_73)$ {
access_log off;
fastcgi_pass php73:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
}

View File

@ -0,0 +1,6 @@
location ~ ^/(status_74|ping_74)$ {
access_log off;
fastcgi_pass php74:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
}

View File

@ -0,0 +1,6 @@
location ~ ^/(status_81|ping_81)$ {
access_log off;
fastcgi_pass php81:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
}

View File

@ -0,0 +1,6 @@
location ~ ^/(status_83|ping_83)$ {
access_log off;
fastcgi_pass php83:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
}

View File

@ -1,4 +1,6 @@
#!/bin/bash
docker_version="26.0.0"
docker_compose_ver="2.26.0"
docker_path="/data/aix-docker"
cd /data
print_error() {
@ -30,12 +32,12 @@ if ! command -v jq >/dev/null 2>&1 ; then
fi
fi
if ! command -v docker >/dev/null 2>&1 ; then
wget --no-check-certificate https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/static/stable/x86_64/docker-20.10.9.tgz
wget --no-check-certificate https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/static/stable/x86_64/docker-${docker_version}.tgz
if [ $? -ne 0 ]; then
print_error "Download docker failed"
exit 1
fi
tar -zxvf docker-20.10.9.tgz
tar -zxvf docker-${docker_version}.tgz
mv docker/* /usr/bin/
groupadd docker
cat > /usr/lib/systemd/system/docker.service << EOF
@ -66,7 +68,7 @@ systemctl enable docker
fi
if ! command -v docker-compose >/dev/null 2>&1 ; then
curl -L https://gh-mirrors.qra.ink/https://github.com/docker/compose/releases/download/v2.18.1/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
curl -L https://gh-proxy.com/https://github.com/docker/compose/releases/download/v${docker_compose_ver}/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
fi