generated from jackhadrill/container-spawner
Add container port number as an environment variable
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
9d6a888bb7
commit
70ecf3bf9b
|
@ -2,6 +2,7 @@ FROM nginx:alpine
|
|||
|
||||
ENV LISTEN_PORT="80"
|
||||
ENV CONTAINER_PREFIX="container"
|
||||
ENV CONTAINER_PORT="80"
|
||||
ENV SPAWNER_HOST="spawner"
|
||||
ENV SPANWER_PORT="80"
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ services:
|
|||
environment:
|
||||
LISTEN_PORT: 80
|
||||
CONTAINER_PREFIX: "container"
|
||||
CONTAINER_PORT: 80
|
||||
SPAWNER_HOST: "spawner"
|
||||
SPANWER_PORT: 80
|
||||
...
|
||||
|
|
|
@ -5,7 +5,7 @@ server {
|
|||
resolver 127.0.0.11 valid=1s;
|
||||
|
||||
location / {
|
||||
proxy_pass http://${CONTAINER_PREFIX}$http_x_forwarded_preferred_username$uri;
|
||||
proxy_pass http://${CONTAINER_PREFIX}$http_x_forwarded_preferred_username:${CONTAINER_PORT}$uri;
|
||||
error_page 502 = @spawner;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue