Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
docker-test
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kunkka王辉
docker-test
Commits
ce0cc2ae
Commit
ce0cc2ae
authored
Sep 14, 2023
by
Kunkka王辉
😲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增文档
parent
6ed1ba4c
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
270 additions
and
38 deletions
+270
-38
README.md
README.md
+78
-28
docker-compose.yaml
docker-compose.yaml
+4
-0
Dockerfile-nginx
src/Dockerfile-nginx
+4
-0
deploy-hosts.sh
src/deploy-hosts.sh
+184
-10
No files found.
README.md
View file @
ce0cc2ae
This diff is collapsed.
Click to expand it.
docker-compose.yaml
View file @
ce0cc2ae
...
...
@@ -34,7 +34,11 @@ services:
-
GALAXY_ENTRY_API_HTTP_PORT=9107
-
GALAXY_WORKFLOW_API_HTTP_PORT=9108
-
GALAXY_COMMON_SERVER_API_HTTP_PORT=9109
-
GALAXY_MEMBER_API_HTTP_PORT=9110
-
NOTICE_CENTER_HTTP_PORT=9111
-
VUE_NOTICE_CENTER_HTTP_PORT=9112
-
VUE_USERINFO_PORT=9169
-
VUE_SMARTWALE_PORT=9170
-
JAVA_CLIENT_URI=java-client-${ENV:-dev}
-
JAVA_NOTICE_URI=java-notice-${ENV:-dev}
-
JAVA_FLOWENGINE_URI=java-flowengine-${ENV:-dev}
...
...
src/Dockerfile-nginx
View file @
ce0cc2ae
...
...
@@ -16,7 +16,11 @@ ARG GALAXY_MICROS_GATEWAY_API_HTTP_PORT
ARG GALAXY_ENTRY_API_HTTP_PORT
ARG GALAXY_WORKFLOW_API_HTTP_PORT
ARG GALAXY_COMMON_SERVER_API_HTTP_PORT
ARG GALAXY_MEMBER_API_HTTP_PORT
ARG NOTICE_CENTER_HTTP_PORT
ARG VUE_NOTICE_CENTER_HTTP_PORT
ARG VUE_USERINFO_PORT
ARG VUE_SMARTWALE_PORT
ARG JAVA_CLIENT_URI
ARG JAVA_NOTICE_URI
ARG JAVA_FLOWENGINE_URI
...
...
src/deploy-hosts.sh
View file @
ce0cc2ae
...
...
@@ -208,8 +208,8 @@ server {
}
location ^~ /smarterApi/ {
#
待部署
proxy_pass
https://test.smartwhale.galaxy-immi.com/api/
;
#
test.smartwhale.galaxy-immi.com 最终还是转发到galaxy_crm
proxy_pass
$HOST
:
$GALAXY_CRM_API_HTTP_PORT
;
proxy_set_header X-Forwarded-For \
$proxy_add_x_forwarded_for
;
proxy_set_header X-Real-Ip \
$remote_addr
;
proxy_set_header X-Ngnix-Proxy true;
...
...
@@ -224,8 +224,9 @@ server {
}
location ^~ /earlyWarning/ {
#待部署
proxy_pass https://test.earlywarning.galaxy-immi.com/api/;
#优化,一次转发即可
proxy_pass http://
$HOST
:
$VUE_NOTICE_CENTER_HTTP_PORT
/api/;
# proxy_pass http://
$HOST
:
$NOTICE_CENTER_HTTP_PORT
/api; #是否可以直接到后端服务
proxy_set_header X-Forwarded-For \
$proxy_add_x_forwarded_for
;
proxy_set_header X-Real-Ip \
$remote_addr
;
proxy_set_header X-Ngnix-Proxy true;
...
...
@@ -368,6 +369,18 @@ server {
include /etc/nginx/php/
$PHP_HOST
.conf;
}
EOF
# member-micros
cat
<<
EOF
>/etc/nginx/conf.d/member-micros.conf
server {
listen
$GALAXY_MEMBER_API_HTTP_PORT
;
server_name localhost;
root /app/www/member-micros/public;
index index.php index.html;
include /etc/nginx/php/
$PHP_HOST
.conf;
}
EOF
# vue-userinfo
cat
<<
EOF
>/etc/nginx/conf.d/vue-userinfo.conf
server {
...
...
@@ -383,6 +396,156 @@ server {
proxy_set_header X-Ngnix-Proxy true;
}
}
EOF
# smartwhale
cat
<<
EOF
>/etc/nginx/conf.d/smartwale.conf
server
{
listen
$VUE_SMARTWALE_PORT
;
server_name localhost;
add_header Access-Control-Allow-Headers '*';
add_header Access-Control-Allow-Methods '*';
#ERROR-PAGE-START 错误页配置,可以注释、删除或修改
error_page 404 /404.html;
error_page 502 /502.html;
#ERROR-PAGE-END
#REWRITE-END
location / {
#暂未部署
root /app/www/smartwhale/main;
index index.html;
try_files
$uri
$uri
/ /index.html @redirectToMain;
}
location @redirectToMain {
rewrite ^(.+)
$
/index.html break;
}
location /subapp {
alias /app/www/smartwhale/subapp;
try_files
$uri
$uri
/ /index.html;
#try_files
$uri
$uri
/ /dist/index.html; # 0406 原先是 /index.html;
#try_files
$uri
$uri
/ /dist/index.html; # 0406 原先是 /index.html;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods *;
add_header Access-Control-Allow-Headers *;
}
# 后端 登录服务 galaxy-crm/public
location ^~ /api/ {
proxy_pass http://
$HOST
:
$GALAXY_CRM_API_HTTP_PORT
/;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for
;
proxy_set_header Host
$host
;
proxy_set_header X-Real-Ip
$remote_addr
;
proxy_set_header X-Ngnix-Proxy true;
}
#禁止访问的文件或目录
location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
{
return 404;
}
#一键申请SSL证书验证目录相关设置
location ~ \.well-known{
allow all;
}
}
EOF
# earlywarning
cat
<<
EOF
>/etc/nginx/conf.d/earlywarning.conf
server
{
listen
$VUE_NOTICE_CENTER_HTTP_PORT
;
server_name localhost;
index index.php index.html index.htm default.php default.htm default.html;
root /app/www/smartwhale/subapp/early_warning;
#SSL-END
#ERROR-PAGE-START 错误页配置,可以注释、删除或修改
error_page 404 /404.html;
error_page 502 /502.html;
#ERROR-PAGE-END
# 暂时注释
# location /{
# add_header Access-Control-Allow-Origin *;
# add_header Access-Control-Allow-Headers *;
# add_header Access-Control-Allow-Methods *;
# proxy_pass http://localhost:9005/;
# proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for
;
# proxy_set_header X-Real-Ip
$remote_addr
;
# proxy_set_header X-Ngnix-Proxy true;
# }
#
#
#
# location ^~ /api/ws/ {
# proxy_pass http://127.0.0.1:9005;
# proxy_http_version 1.1;
# proxy_set_header Upgrade
$http_upgrade
;
# proxy_set_header Connection "Upgrade";
# proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for
;
# }
location /api {
rewrite ^/api/(.*)
$
/
$1
break;
proxy_pass http://
$HOST
:
$NOTICE_CENTER_HTTP_PORT
;
proxy_redirect off;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for
;
proxy_set_header Host
$host
;
proxy_set_header X-Real-Ip
$remote_addr
;
proxy_set_header X-Ngnix-Proxy true;
}
location /horizon {
rewrite ^/api/(.*)
$
/
$1
break;
proxy_pass http://
$HOST
:
$NOTICE_CENTER_HTTP_PORT
;
proxy_redirect off;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for
;
proxy_set_header Host
$host
;
proxy_set_header X-Real-Ip
$remote_addr
;
proxy_set_header X-Ngnix-Proxy true;
}
location /vendor {
rewrite ^/api/(.*)
$
/
$1
break;
proxy_pass http://
$HOST
:
$NOTICE_CENTER_HTTP_PORT
;
proxy_redirect off;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for
;
proxy_set_header Host
$host
;
proxy_set_header X-Real-Ip
$remote_addr
;
proxy_set_header X-Ngnix-Proxy true;
}
#禁止访问的文件或目录
location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
{
return 404;
}
#一键申请SSL证书验证目录相关设置
location ~ \.well-known{
allow all;
}
}
# 后端 php
server {
listen
$NOTICE_CENTER_HTTP_PORT
;
server_name localhost;
root /app/www/notice-center/public;
index index.php;
include /etc/nginx/php/
$PHP_HOST
.conf;
}
EOF
mkdir
-p
/app/env/
cat
<<
EOF
>/app/env/.env-for-add
...
...
@@ -392,15 +555,26 @@ SERVICE_BaseMicros=$HOST:1234 #缺省
SERVICE_MarketMicros=
$HOST
:1234 #缺省
SERVICE_FlowMicros=
$HOST
:
$GALAXY_FLOW_MICROS_API_HTTP_PORT
SERVICE_UserMicros=
$HOST
:
$GALAXY_USER_MICROS_API_HTTP_PORT
SERVICE_FlowEngineMicros=
$JAVA_FLOWENGINE_URI
SERVICE_FlowEngineMicros=
$JAVA_FLOWENGINE_URI
:80
SERVICE_ServerSiteMicros=
$HOST
:
$GALAXY_SERVER_SITE_API_HTTP_PORT
SERVICE_NoticeMicros=
$JAVA_NOTICE_URI
SERVICE_NoticeMicros=
$JAVA_NOTICE_URI
:80
SERVICE_PromotionMicros=
$HOST
:1234#缺省
SERVICE_MemberMicros=
$HOST
:
1234
#缺省
SERVICE_MemberMicros=
$HOST
:
$GALAXY_MEMBER_API_HTTP_PORT
#缺省
SERVICE_PresaleMicros=
$HOST
:
$GALAXY_PRESALE_MICROS_API_HTTP_PORT
SERVICE_BizPlatform=
$JAVA_BIZ_PLATFORM_URI
SERVICE_CrmClient=
$JAVA_CLIENT_URI
SERVICE_BizPlatform=
$JAVA_BIZ_PLATFORM_URI
:80
SERVICE_CrmClient=
$JAVA_CLIENT_URI
:80
SERVICE_COMMON_SERVER=
$HOST
:
$GALAXY_COMMON_SERVER_API_HTTP_PORT
SERVICE_WORKFLOW_SERVER=
$HOST
:
$GALAXY_WORKFLOW_API_HTTP_PORT
SERVICE_DATA_CENTER=
$HOST
:1234 #缺省
EOF
\ No newline at end of file
EOF
# 针对micros-gateway生成指定的ip
cat
<<
EOL
>/app/env/.env-gateway
USER_MODULE_URL=
$HOST
:
$GALAXY_USER_MICROS_API_HTTP_PORT
BACKEND_MODULE_URL=
$HOST
:
$GALAXY_FLOW_MICROS_API_HTTP_PORT
BUSINESS_MODULE_URL=
$HOST
:
$GALAXY_SERVER_SITE_API_HTTP_PORT
ADMINISTRATOR_MODULE_URL=
$HOST
:
$GALAXY_USER_MICROS_API_HTTP_PORT
CONSULTANT_MODULE_URL=
$HOST
:1234#缺省
MEMBER_MODULE_URL=
$HOST
:
$GALAXY_MEMBER_API_HTTP_PORT
PRESALE_MODULE_URL=
$HOST
:
$GALAXY_PRESALE_MICROS_API_HTTP_PORT
WORKFLOW_MODULE_URL=
$HOST
:
$GALAXY_FLOW_MICROS_API_HTTP_PORT
EOL
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment