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
926aa01c
Commit
926aa01c
authored
Sep 14, 2023
by
Kunkka王辉
😲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改nginx 启动逻辑
parent
e60621fe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
20 deletions
+30
-20
docker-compose.yaml
docker-compose.yaml
+8
-2
Dockerfile-nginx
src/Dockerfile-nginx
+4
-2
nginx-start.sh
src/nginx-start.sh
+18
-16
No files found.
docker-compose.yaml
View file @
926aa01c
...
...
@@ -17,7 +17,7 @@ services:
build
:
context
:
src
dockerfile
:
Dockerfile-nginx
args
:
environment
:
-
PHP_HOST=galaxy-php7.4-${ENV:-dev}
-
HOST=nginx-${ENV:-dev}
-
DWP_HTTP_PORT=8081
...
...
@@ -45,6 +45,13 @@ services:
-
JAVE_INTELLIGENTWRITING_URI=java-intelligentwriting-${ENV:-dev}
-
JAVA_BIZ_PLATFORM_URI=java-biz-platform-${ENV:-dev}
image
:
galaxy-nginx
depends_on
:
-
php7
-
java-biz-platform
-
java-client
-
java-flowengine
-
java-intelligentwriting
-
java-notice
container_name
:
nginx-${ENV:-dev}
volumes
:
# 前后端代码统一放一个目录管理
-
${CODE_DIR}:/app/www
...
...
@@ -53,7 +60,6 @@ services:
ports
:
-
"
${PORT:-8118}:8081"
-
"
${PORT_CRM:-8181}:8181"
command
:
[
"
nginx"
,
"
-g"
,
"
daemon
off;"
]
restart
:
on-failure
java-notice
:
build
:
...
...
src/Dockerfile-nginx
View file @
926aa01c
...
...
@@ -27,9 +27,11 @@ ARG JAVA_FLOWENGINE_URI
ARG JAVE_INTELLIGENTWRITING_URI
ARG JAVA_BIZ_PLATFORM_URI
ENTRYPOINT ["/docker-entrypoint.sh"]
COPY
deploy-hosts.sh /app/deploy-hosts
.sh
RUN chmod +x /app/
deploy-hosts.sh && bash /app/deploy-hosts
.sh
COPY
nginx-start.sh /app/nginx-start
.sh
RUN chmod +x /app/
nginx-start
.sh
EXPOSE 80
STOPSIGNAL SIGQUIT
WORKDIR /app
CMD ["/app/nginx-start.sh"]
src/
deploy-hosts
.sh
→
src/
nginx-start
.sh
View file @
926aa01c
...
...
@@ -417,7 +417,7 @@ server
#暂未部署
root /app/www/smartwhale/main;
index index.html;
try_files
$uri
$uri
/ /index.html @redirectToMain;
try_files
\
$uri
\
$uri
/ /index.html @redirectToMain;
}
location @redirectToMain {
...
...
@@ -427,7 +427,7 @@ server
location /subapp {
alias /app/www/smartwhale/subapp;
try_files
$uri
$uri
/ /index.html;
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;
...
...
@@ -439,9 +439,9 @@ server
# 后端 登录服务 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-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;
}
#禁止访问的文件或目录
...
...
@@ -479,7 +479,7 @@ server
# 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-Forwarded-For
\
$proxy_add_x_forwarded_for
;
# proxy_set_header X-Real-Ip
$remote_addr
;
# proxy_set_header X-Ngnix-Proxy true;
# }
...
...
@@ -491,16 +491,16 @@ server
# 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
;
# 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-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;
}
...
...
@@ -508,9 +508,9 @@ 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-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;
}
...
...
@@ -518,9 +518,9 @@ 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-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;
}
...
...
@@ -578,3 +578,5 @@ 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
exec
nginx
-g
"daemon off;"
\ No newline at end of file
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