Compare commits
2 Commits
9ee005bffb
...
90016ae06c
| Author | SHA1 | Date | |
|---|---|---|---|
| 90016ae06c | |||
| ea86e785de |
2
.env
2
.env
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# PHP source directory
|
# PHP source directory
|
||||||
#
|
#
|
||||||
SOURCE_DIR="/mnt/e/code/PHP"
|
SOURCE_DIR="E:\\code\\PHP"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Runtime data directory
|
# Runtime data directory
|
||||||
|
|||||||
9
hosts
9
hosts
@ -1,5 +1,6 @@
|
|||||||
172.20.0.254 mkt.api.gaore.com mkt.gaore.com
|
172.20.0.254 mkt.api.gaore.com mkt.gaore.com
|
||||||
172.20.0.254 callback.api.gaore.com
|
112.74.47.156 mail.gaore.com
|
||||||
172.20.0.254 stat.gaore.com
|
172.20.0.254 callback.api.gaore.com h5.uu89.com
|
||||||
172.20.0.254 msdk.gaore.com msdk.api.gaore.com game.gaore.com
|
172.20.0.254 stat.gaore.com admin-stat.gaore.com passport.gaore.com
|
||||||
192.168.1.202 sso.gaore.com admintest.gaore.com oss.gaore.com
|
172.20.0.254 msdk.gaore.com msdk.api.gaore.com pay.api.gaore.com chat.gaore.com game.gaore.com script.gaore.com apisdk.gaore.com
|
||||||
|
192.168.1.202 sso.gaore.com admintest.gaore.com oss.gaore.com test.mkt.gaore.com
|
||||||
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name stat.gaore.com admin.stat.89yoo.com;
|
server_name stat.gaore.com admin.stat.89yoo.com admin-stat.gaore.com;
|
||||||
root /www/gaore/stat.gaore.com/public;
|
root /www/gaore/stat.gaore.com/public;
|
||||||
index index.php index.html index.htm;
|
index index.php index.html index.htm;
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ server {
|
|||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name msdk.gaore.com;
|
server_name msdk.gaore.com msdk.api.gaore.com;
|
||||||
index index.php;
|
index index.php;
|
||||||
root /www/gaore/msdk.gaore.com;
|
root /www/gaore/msdk.gaore.com;
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ server {
|
|||||||
|
|
||||||
|
|
||||||
location ~ \.php(.*)$ {
|
location ~ \.php(.*)$ {
|
||||||
fastcgi_pass host.docker.internal:9056;
|
fastcgi_pass host.docker.internal:9053;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
fastcgi_param GAORE_ENVIRONMENT development;
|
fastcgi_param GAORE_ENVIRONMENT development;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
# h5.uu89.com
|
# h5.uu89.com
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name h5.uu89.com;
|
server_name h5.uu89.com n5.89yoo.com;
|
||||||
index index.php;
|
index index.php;
|
||||||
root /www/gaore/h5.uu89.com/public;
|
root /www/gaore/h5.uu89.com/public;
|
||||||
|
|
||||||
@ -18,15 +18,28 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location ~ \.php(.*)$ {
|
location ~ \.php(.*)$ {
|
||||||
|
# 只允许 index.php 直接执行
|
||||||
|
if ($uri != "/index.php") {
|
||||||
|
rewrite ^/(.*)$ /index.php?_url=/$1 last;
|
||||||
|
}
|
||||||
|
|
||||||
|
# 防止伪造 PHP 文件请求
|
||||||
|
if (!-f $document_root$fastcgi_script_name) {
|
||||||
|
return 404;
|
||||||
|
}
|
||||||
|
|
||||||
fastcgi_pass host.docker.internal:9070;
|
fastcgi_pass host.docker.internal:9070;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
|
# fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
|
||||||
fastcgi_param QUAN_DEBUG On;
|
fastcgi_param QUAN_DEBUG On;
|
||||||
fastcgi_param GAORE_ENVIRONMENT development;
|
fastcgi_param GAORE_ENVIRONMENT development;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
|
|
||||||
|
# 添加调试头(临时)
|
||||||
|
add_header X-Phalcon-Debug "PHP processed" always;
|
||||||
}
|
}
|
||||||
|
|
||||||
# deny access to .htaccess files, if Apache's document root
|
# deny access to .htaccess files, if Apache's document root
|
||||||
|
|||||||
@ -4,7 +4,7 @@ server {
|
|||||||
listen 80;
|
listen 80;
|
||||||
server_name mail.gaore.com;
|
server_name mail.gaore.com;
|
||||||
index index.php;
|
index index.php;
|
||||||
root /www/gaore/mail.gaore.com/public;
|
root /www/gaore/mail.gaore.com;
|
||||||
|
|
||||||
access_log /var/log/nginx/mail.gaore.com.access.log main;
|
access_log /var/log/nginx/mail.gaore.com.access.log main;
|
||||||
error_log /var/log/nginx/mail.gaore.com.error.log warn;
|
error_log /var/log/nginx/mail.gaore.com.error.log warn;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
# pay.gaore.com
|
# pay.gaore.com
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name pay.gaore.com;
|
server_name pay.gaore.com pay.api.gaore.com;
|
||||||
index index.php;
|
index index.php;
|
||||||
root /www/gaore/pay.gaore.com/public;
|
root /www/gaore/pay.gaore.com/public;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
# sdk.gaore.com
|
# sdk.gaore.com
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name sdk.gaore.com;
|
server_name sdk.gaore.com xcx.uu89.com;
|
||||||
index index.php;
|
index index.php;
|
||||||
root /www/gaore/sdk.gaore.com/public;
|
root /www/gaore/sdk.gaore.com/public;
|
||||||
|
|
||||||
|
|||||||
@ -5,6 +5,52 @@ ARG TZ
|
|||||||
ARG PHP_EXTENSIONS
|
ARG PHP_EXTENSIONS
|
||||||
ARG CONTAINER_PACKAGE_URL
|
ARG CONTAINER_PACKAGE_URL
|
||||||
|
|
||||||
|
RUN echo "${TZ}"
|
||||||
|
|
||||||
|
|
||||||
|
# 设置时区
|
||||||
|
ENV TZ=${TZ}
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# 替换源列表,更新软件包索引
|
||||||
|
RUN echo "deb http://archive.debian.org/debian/ stretch main contrib non-free" > /etc/apt/sources.list && \
|
||||||
|
echo "deb-src http://archive.debian.org/debian/ stretch main contrib non-free" >> /etc/apt/sources.list && \
|
||||||
|
echo "deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free" >> /etc/apt/sources.list && \
|
||||||
|
echo "deb-src http://archive.debian.org/debian-security/ stretch/updates main contrib non-free" >> /etc/apt/sources.list && \
|
||||||
|
echo "deb http://archive.debian.org/debian/ stretch-backports main contrib non-free" >> /etc/apt/sources.list && \
|
||||||
|
apt-get update
|
||||||
|
|
||||||
|
RUN apt-get install -y openssl --allow-unauthenticated --no-install-recommends libyaml-dev
|
||||||
|
|
||||||
|
# 安装 SSL 库(多个版本确保兼容)
|
||||||
|
RUN apt-get install -y \
|
||||||
|
openssl \
|
||||||
|
libssl1.0-dev \
|
||||||
|
libssl1.0.0 \
|
||||||
|
--allow-unauthenticated \
|
||||||
|
--no-install-recommends
|
||||||
|
|
||||||
|
# 创建 SSL 库的符号链接
|
||||||
|
RUN ln -sf /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib/libssl.so && \
|
||||||
|
ln -sf /usr/lib/x86_64-linux-gnu/libcrypto.so /usr/lib/libcrypto.so
|
||||||
|
|
||||||
|
# 安装必要的软件包并更新 CA 证书
|
||||||
|
RUN apt-get install -y \
|
||||||
|
openssl \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
gnupg \
|
||||||
|
--allow-unauthenticated \
|
||||||
|
--no-install-recommends \
|
||||||
|
libyaml-dev && \
|
||||||
|
update-ca-certificates --fresh && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# 设置时区
|
||||||
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
|
||||||
|
echo $TZ > /etc/timezone
|
||||||
|
|
||||||
COPY ./docker-php-ext-enable /usr/local/bin/
|
COPY ./docker-php-ext-enable /usr/local/bin/
|
||||||
RUN chmod +x /usr/local/bin/docker-php-ext-enable
|
RUN chmod +x /usr/local/bin/docker-php-ext-enable
|
||||||
|
|
||||||
@ -14,6 +60,16 @@ RUN chmod +x install.sh \
|
|||||||
&& sh install.sh \
|
&& sh install.sh \
|
||||||
&& rm -fr /tmp/extensions
|
&& rm -fr /tmp/extensions
|
||||||
|
|
||||||
|
# 配置 Composer 使用系统 CA 证书
|
||||||
|
RUN mkdir -p /var/www/.config/composer && \
|
||||||
|
mkdir -p /var/www/.cache/composer && \
|
||||||
|
chmod -R 777 /var/www/.config /var/www/.cache
|
||||||
|
|
||||||
|
# 设置 Composer 环境变量
|
||||||
|
ENV COMPOSER_ALLOW_SUPERUSER=1
|
||||||
|
ENV COMPOSER_HOME=/var/www/.config/composer
|
||||||
|
ENV COMPOSER_CACHE_DIR=/var/www/.cache/composer
|
||||||
|
|
||||||
# php image's www-data user uid & gid are 82, change them to 1000 (primary user)
|
# php image's www-data user uid & gid are 82, change them to 1000 (primary user)
|
||||||
RUN usermod -u 1000 www-data && groupmod -g 1000 www-data
|
RUN usermod -u 1000 www-data && groupmod -g 1000 www-data
|
||||||
# Use www-data to run the first process
|
# Use www-data to run the first process
|
||||||
|
|||||||
@ -20,6 +20,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
export EXTENSIONS=",${PHP_EXTENSIONS},"
|
export EXTENSIONS=",${PHP_EXTENSIONS},"
|
||||||
|
echo "EXTENSIONS ,${PHP_EXTENSIONS},"
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -305,7 +306,7 @@ fi
|
|||||||
|
|
||||||
if [ -z "${EXTENSIONS##*,yaml,*}" ]; then
|
if [ -z "${EXTENSIONS##*,yaml,*}" ]; then
|
||||||
echo "---------- Install yaml ----------"
|
echo "---------- Install yaml ----------"
|
||||||
apt-get -y install libyaml-dev
|
#apt-get -y install libyaml-dev
|
||||||
installExtensionFromTgz yaml-1.2.0
|
installExtensionFromTgz yaml-1.2.0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -1902,7 +1902,7 @@ ldap.max_links = -1
|
|||||||
; OS-managed cert stores in its absence. If specified, this value may still
|
; OS-managed cert stores in its absence. If specified, this value may still
|
||||||
; be overridden on a per-stream basis via the "cafile" SSL stream context
|
; be overridden on a per-stream basis via the "cafile" SSL stream context
|
||||||
; option.
|
; option.
|
||||||
;openssl.cafile=
|
openssl.cafile=/tmp/composer/cacert.pem
|
||||||
|
|
||||||
; If openssl.cafile is not specified or if the CA file is not found, the
|
; If openssl.cafile is not specified or if the CA file is not found, the
|
||||||
; directory pointed to by openssl.capath is searched for a suitable
|
; directory pointed to by openssl.capath is searched for a suitable
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user