Commit 468acba6 authored by Kunkka王辉's avatar Kunkka王辉 😲

新增php8

parent 417f69ac
......@@ -9,13 +9,14 @@ curl http://192.168.11.163/demo/install.sh | bash -s dev
## services
1. php7
2. nginx
3. java-notice
4. java-biz-platform
5. java-flowengine
6. java-intelligentwriting
7. java-client
8. nacos-client 非项目使用
2. php8
3. nginx
4. java-notice
5. java-biz-platform
6. java-flowengine
7. java-intelligentwriting
8. java-client
9. nacos-client 非项目使用
### 服务目录汇总
......@@ -23,7 +24,7 @@ curl http://192.168.11.163/demo/install.sh | bash -s dev
|:------------------------|:-----------------------------|:---------------------------------------------------------------------------------|:--------------------------------|:-------|:------|:-------------------------------------|:--------------------|
| BaseMicros | 无 | - | - | 疑似弃用 | - | - | |
| MarketMicros | 无 | - | - | 疑似弃用 | - | - | |
| FlowMicros | Crm重构-流程管理相关的微服务 | http://gitlab.galaxy-immi.com/colnet/bp/FlowMicros.git | flow-micros | 正常 | php | $GALAXY_FLOW_MICROS_API_HTTP_PORT | |
| FlowMicros | Crm重构-流程管理相关的微服务 | http://gitlab.galaxy-immi.com/colnet/bp/FlowMicros.git | flow-micros | 正常 | php | $GALAXY_FLOW_MICROS_API_HTTP_PORT | |
| UserMicros | Crm重构-用户管理相关的微服务 | http://gitlab.galaxy-immi.com/colnet/bp/UserMicros.git | user-micros | 正常 | php | $GALAXY_USER_MICROS_API_HTTP_PORT | |
| FlowEngineMicros | 工作流引擎 | http://gitlab.galaxy-immi.com/colnet/engine.git | flowengine | 正常 | java | 80 (单独容器服务,内部端口) | |
| ServerSiteMicros | 服务端相关的微服务 | http://gitlab.galaxy-immi.com/colnet/mp/ServerSiteMirocs.git | server-site | 正常 | php | $GALAXY_SERVER_SITE_API_HTTP_PORT | |
......@@ -51,7 +52,7 @@ curl http://192.168.11.163/demo/install.sh | bash -s dev
| user-information-system | 用户基础信息平台(981/997) | http://gitlab.galaxy-immi.com/colnet/fp/User-Information-System.git | user-information-system | 正常 | vue | $OLD_CRM_USER_HTTP_PORT | |
| Notice-Center | Notice-Center | http://gitlab.galaxy-immi.com/colnet/noticeCenter.git | notice-center | 正常 | php | $NOTICE_CENTER_HTTP_PORT | |
| Notice-FRONT | Notice-Center前端-智能预警/代办 | http://gitlab.galaxy-immi.com/Front-end-group/Manage-Frame/Early-Warning.git | smartwhale/subapp/early_warning | 正常 | vue | $VUE_NOTICE_CENTER_HTTP_PORT | |
| domain-module | 领域服务 | http://gitlab.galaxy-immi.com/colnet/domain-module.git | domain-module | 待定 | php | - | php8 |
| domain-module | 领域服务 | http://gitlab.galaxy-immi.com/colnet/domain-module.git | domain-module | 正常 | php | $DOMAIN_MODULE_HTTP_PORT | php8 |
## 环境依赖
- docker 必须
......
......@@ -10,12 +10,23 @@ services:
networks:
- galaxy-net
restart: on-failure
php8:
image: harbor.galaxy-immi.com/galaxy-open-develop/php:8.0
container_name: galaxy-php8.0-${ENV:-dev}
volumes:
- ${CODE_DIR}:/app/www
expose:
- 9000
networks:
- galaxy-net
restart: on-failure
nginx:
build:
context: src
dockerfile: Dockerfile-nginx
environment:
- PHP_HOST=galaxy-php7.4-${ENV:-dev}
- PHP74_HOST=galaxy-php7.4-${ENV:-dev}
- PHP80_HOST=galaxy-php8.0-${ENV:-dev}
- HOST=nginx-${ENV:-dev}
- DWP_HTTP_PORT=8081
- OLD_CRM_HTTP_PORT=8181
......@@ -33,6 +44,7 @@ services:
- GALAXY_COMMON_SERVER_API_HTTP_PORT=9109
- GALAXY_MEMBER_API_HTTP_PORT=9110
- NOTICE_CENTER_HTTP_PORT=9111
- DOMAIN_MODULE_HTTP_PORT=9113
- VUE_NOTICE_CENTER_HTTP_PORT=9112
- VUE_USERINFO_PORT=9169
- VUE_SMARTWALE_PORT=9170
......
FROM phpdockerio/php80-swoole
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# apt 国内镜像
COPY sources.list /etc/apt/sources.list
RUN apt-get update && \
apt-get -y install php8.0-gd php8.0-bcmath php8.0-soap php8.0-sqlite3 php8.0-redis php8.0-fpm
RUN apt-get remove --purge -y && apt-get autoremove -y && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* ~/.composer # buildkit
RUN sed -i 's/^listen\s=.*sock/listen = 0.0.0.0:9000/g' /etc/php/8.0/fpm/pool.d/www.conf && \
cat /etc/php/8.0/fpm/pool.d/www.conf | grep -v ';' | grep -v -e '^$'
COPY pcov.so /lib/php/20200930/
RUN echo "extension=pcov.so" > /etc/php/8.0/mods-available/pcov.ini && ln -s /etc/php/8.0/mods-available/pcov.ini /etc/php/8.0/cli/conf.d/20-pocv.ini
# 设置工作目录
WORKDIR /app
RUN mkdir /app/www
# 指定容器启动时执行的命令
CMD ["/usr/sbin/php-fpm8.0","--nodaemonize", "-O"]
# 暴露9000端口
EXPOSE 9000
\ No newline at end of file
......@@ -3,9 +3,9 @@
if [ ! -d /etc/nginx/php ]; then
mkdir /etc/nginx/php
fi
cat <<EOF >/etc/nginx/php/$PHP_HOST.conf
cat <<EOF >/etc/nginx/php/$PHP74_HOST.conf
location ~ \.php$ {
fastcgi_pass $PHP_HOST:9000;
fastcgi_pass $PHP74_HOST:9000;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
......@@ -20,6 +20,23 @@ location = /50x.html {
root /usr/share/nginx/html;
}
EOF
cat <<EOF >/etc/nginx/php/$PHP80_HOST.conf
location ~ \.php$ {
fastcgi_pass $PHP80_HOST:9000;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
}
location / {
proxy_ignore_client_abort on;
fastcgi_ignore_client_abort on;
try_files \$uri \$uri/ /index.php?\$query_string;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
EOF
# common-server
cat <<EOF >/etc/nginx/conf.d/common-server.conf
server {
......@@ -27,7 +44,7 @@ server {
server_name localhost;
root /app/www/common-server/public;
index index.php index.html;
include /etc/nginx/php/$PHP_HOST.conf;
include /etc/nginx/php/$PHP74_HOST.conf;
}
EOF
# crm-admin
......@@ -259,7 +276,7 @@ server {
server_name localhost;
root /app/www/entry/public;
index index.php index.html;
include /etc/nginx/php/$PHP_HOST.conf;
include /etc/nginx/php/$PHP74_HOST.conf;
}
EOF
# flow-mircos
......@@ -269,7 +286,7 @@ server {
server_name localhost;
root /app/www/flow-micros/public;
index index.php index.html;
include /etc/nginx/php/$PHP_HOST.conf;
include /etc/nginx/php/$PHP74_HOST.conf;
}
EOF
......@@ -280,7 +297,7 @@ server {
server_name localhost;
root /app/www/galaxy-crm/public;
index index.php index.html;
include /etc/nginx/php/$PHP_HOST.conf;
include /etc/nginx/php/$PHP74_HOST.conf;
}
EOF
......@@ -291,7 +308,7 @@ server {
server_name localhost;
root /app/www/galaxy-workflow/public;
index index.php index.html;
include /etc/nginx/php/$PHP_HOST.conf;
include /etc/nginx/php/$PHP74_HOST.conf;
}
EOF
......@@ -302,7 +319,7 @@ server {
server_name localhost;
root /app/www/micros-gateway/public;
index index.php index.html;
include /etc/nginx/php/$PHP_HOST.conf;
include /etc/nginx/php/$PHP74_HOST.conf;
}
EOF
......@@ -351,7 +368,7 @@ server {
server_name localhost;
root /app/www/presale-micros/public;
index index.php index.html;
include /etc/nginx/php/$PHP_HOST.conf;
include /etc/nginx/php/$PHP74_HOST.conf;
}
EOF
......@@ -362,7 +379,7 @@ server {
server_name localhost;
root /app/www/server-site/public;
index index.php index.html;
include /etc/nginx/php/$PHP_HOST.conf;
include /etc/nginx/php/$PHP74_HOST.conf;
}
EOF
# user-micros
......@@ -373,7 +390,7 @@ server {
root /app/www/user-micros/public;
index index.php index.html;
include /etc/nginx/php/$PHP_HOST.conf;
include /etc/nginx/php/$PHP74_HOST.conf;
}
EOF
# member-micros
......@@ -384,7 +401,17 @@ server {
root /app/www/member-micros/public;
index index.php index.html;
include /etc/nginx/php/$PHP_HOST.conf;
include /etc/nginx/php/$PHP74_HOST.conf;
}
EOF
#domain-module
cat <<EOF >/etc/nginx/conf.d/domain-module.conf
server {
listen $DOMAIN_MODULE_HTTP_PORT;
server_name localhost;
root /app/www/domain-module/public;
index index.php index.html;
include /etc/nginx/php/$PHP80_HOST.conf;
}
EOF
......@@ -550,7 +577,7 @@ server {
server_name localhost;
root /app/www/notice-center/public;
index index.php;
include /etc/nginx/php/$PHP_HOST.conf;
include /etc/nginx/php/$PHP74_HOST.conf;
}
EOF
......
File added
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment