Skip to content

Commit

Permalink
Merge pull request #51 from hightall/issue50
Browse files Browse the repository at this point in the history
[Fix #50] Add api engine service port into dashboard
  • Loading branch information
jiahaoc1993 authored Oct 25, 2019
2 parents 741c06c + 9853033 commit 8cceebf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions bootup/docker-compose-files/docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,6 @@ services:
- api-engine
environment:
- API_PROXY=http://api-engine:8080/engine
- SERVICE_PORT=$API_ENGINE_SERVICE_PORT
ports:
- "${DASHBOARD_SERVICE_PORT}:80"
1 change: 1 addition & 0 deletions bootup/docker-compose-files/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,6 @@ services:
- nginx
environment:
- API_PROXY=http://nginx:80/engine
- SERVICE_PORT=$API_ENGINE_SERVICE_PORT
ports:
- "${DASHBOARD_SERVICE_PORT}:80"
2 changes: 1 addition & 1 deletion build_image/docker/common/dashboard/config-nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

NGINX_RAW_CONFIG=/etc/nginx/conf.d/default.conf.tmpl
NGINX_CONFIG=/etc/nginx/conf.d/default.conf
envsubst '$$API_PROXY' < ${NGINX_RAW_CONFIG} > ${NGINX_CONFIG}
envsubst '$$API_PROXY,$$SERVICE_PORT' < ${NGINX_RAW_CONFIG} > ${NGINX_CONFIG}
2 changes: 1 addition & 1 deletion build_image/docker/common/dashboard/default.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ server {
location /api {
proxy_pass $API_PROXY;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_set_header Host $host:$SERVICE_PORT;
proxy_set_header X-Real-IP $remote_addr;
}
}
Expand Down

0 comments on commit 8cceebf

Please sign in to comment.