Update usage (breaking)
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Jack Hadrill 2022-08-24 23:11:22 +00:00
parent 70ecf3bf9b
commit 1925b552c1
3 changed files with 6 additions and 8 deletions

View File

@ -1,10 +1,9 @@
FROM nginx:alpine FROM nginx:alpine
ENV LISTEN_PORT="80" ENV LISTEN_PORT="80"
ENV CONTAINER_PREFIX="container" ENV CONTAINER_PREFIX="vscode"
ENV CONTAINER_PORT="80" ENV CONTAINER_PORT="80"
ENV SPAWNER_HOST="spawner" ENV SPAWNER_URL="http://container-spawner"
ENV SPANWER_PORT="80"
RUN rm -rf /etc/nginx/conf.d/default.conf RUN rm -rf /etc/nginx/conf.d/default.conf
COPY director.conf /etc/nginx/templates/director.conf.template COPY director.conf /etc/nginx/templates/director.conf.template

View File

@ -15,9 +15,8 @@ services:
restart: always restart: always
environment: environment:
LISTEN_PORT: 80 LISTEN_PORT: 80
CONTAINER_PREFIX: "container"
CONTAINER_PORT: 80 CONTAINER_PORT: 80
SPAWNER_HOST: "spawner" CONTAINER_PREFIX: "container"
SPANWER_PORT: 80 SPAWNER_URL: "http://container-spawner"
... ...
``` ```

View File

@ -5,11 +5,11 @@ server {
resolver 127.0.0.11 valid=1s; resolver 127.0.0.11 valid=1s;
location / { location / {
proxy_pass http://${CONTAINER_PREFIX}$http_x_forwarded_preferred_username:${CONTAINER_PORT}$uri; proxy_pass http://${CONTAINER_PREFIX}-$http_x_forwarded_preferred_username:${CONTAINER_PORT}$uri;
error_page 502 = @spawner; error_page 502 = @spawner;
} }
location @spawner { location @spawner {
proxy_pass http://${SPAWNER_HOST}:${SPANWER_PORT}$uri; proxy_pass ${SPAWNER_URL}$uri;
} }
} }