mirror of
https://github.com/CyberL1/dlinux-dashboard.git
synced 2025-01-22 01:19:18 -05:00
chore: make proxy.conf to a template
This commit is contained in:
parent
a84091983c
commit
62c6b8357d
@ -1,2 +1,4 @@
|
|||||||
PORT=3000
|
PORT=3000
|
||||||
HOST="0.0.0.0"
|
HOST="0.0.0.0"
|
||||||
|
|
||||||
|
PROXY_DOMAIN="localhost"
|
||||||
|
@ -13,5 +13,6 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
volumes:
|
volumes:
|
||||||
- ./proxy.conf:/etc/nginx/conf.d/proxy.conf
|
- ./proxy.conf:/etc/nginx/conf.d/proxy.conf.template
|
||||||
network_mode: host
|
network_mode: host
|
||||||
|
command: /bin/sh -c "sed 's/{PROXY_DOMAIN}/$PROXY_DOMAIN/' /etc/nginx/conf.d/proxy.conf.template > /etc/nginx/conf.d/proxy.conf && nginx -g 'daemon off;'"
|
||||||
|
@ -2,7 +2,7 @@ server {
|
|||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
|
|
||||||
server_name localhost;
|
server_name {PROXY_DOMAIN};
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:3000;
|
proxy_pass http://127.0.0.1:3000;
|
||||||
@ -13,7 +13,7 @@ server {
|
|||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
|
|
||||||
server_name "~^(port-(?<port>.*)\.)?(?<container>.*)\.localhost";
|
server_name "~^(port-(?<port>.*)\.)?(?<container>.*)\.{PROXY_DOMAIN}";
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
if ($port = "") {
|
if ($port = "") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user