diff --git a/kdb-bot/docker b/kdb-bot/docker index 48c26839..6b25cc87 160000 --- a/kdb-bot/docker +++ b/kdb-bot/docker @@ -1 +1 @@ -Subproject commit 48c2683965611c9a96ebbb908f8dcb4d0d7d71f2 +Subproject commit 6b25cc87fced30b5846505d95f20285a3e4d7adf diff --git a/kdb-web/dockerfile b/kdb-web/dockerfile index 085b216a..106595b5 100644 --- a/kdb-web/dockerfile +++ b/kdb-web/dockerfile @@ -1,4 +1,7 @@ FROM nginx:alpine -COPY nginx.conf /etc/nginx/nginx.conf +COPY nginx.conf.template /etc/nginx/conf.d/nginx.conf.template RUN rm -rf /usr/share/nginx/html/* COPY ./dist/kdb-web/ /usr/share/nginx/html +RUN apk update +RUN apk add bash +CMD /bin/bash -c "envsubst '\$BOT_CONTAINER_NAME' < /etc/nginx/conf.d/nginx.conf.template > /etc/nginx/nginx.conf; nginx -g 'daemon off;'" diff --git a/kdb-web/nginx.conf b/kdb-web/nginx.conf.template similarity index 93% rename from kdb-web/nginx.conf rename to kdb-web/nginx.conf.template index 7a9d7f16..00543f54 100644 --- a/kdb-web/nginx.conf +++ b/kdb-web/nginx.conf.template @@ -24,7 +24,7 @@ http { } location /api { - proxy_pass http://kdb_bot_staging_1; + proxy_pass http://${BOT_CONTAINER_NAME}; } } } diff --git a/kdb-web/package.json b/kdb-web/package.json index 022428a6..9a7aadca 100644 --- a/kdb-web/package.json +++ b/kdb-web/package.json @@ -50,4 +50,4 @@ "tslib": "^2.4.1", "typescript": "~4.7.2" } -} \ No newline at end of file +}