Skip to content

Commit 3695c79

Browse files
committed
todo Solve the problem of using environment-specific variables
1 parent 880947f commit 3695c79

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

docker/nginx/etc/conf.d/default.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
# upstream nodeSwarm{
2+
# server $node_host:3030;
3+
# }
4+
15
server {
26
listen 80;
37
server_name localhost;
48

59
location / {
610
## TODO Gets the host name and port from the environment variable
711
## Build a nginx image with the lua module
12+
set_by_lua $node_host 'return os.getenv("NODE_HOST")';
813
proxy_pass http://node:3030;
914
##set Host header
1015
proxy_set_header Host $host;

0 commit comments

Comments
 (0)