diff --git a/Dockerfile b/Dockerfile index e903874..ff27469 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,6 +29,7 @@ COPY monitoring/grafana/dashboards /etc/grafana/dashboards FROM nginx:1.30.5-alpine AS loadbalancer COPY nginx/nginx.conf /etc/nginx/nginx.conf +COPY nginx/upstream.conf /etc/nginx/conf.d/upstream.conf FROM alpine:3.24.2 diff --git a/compose.yaml b/compose.yaml index 72b6ca6..2373efc 100644 --- a/compose.yaml +++ b/compose.yaml @@ -177,8 +177,6 @@ services: image: ${NGINX_IMAGE:-mtusi-nginx:lab4} ports: - "${API_BIND_ADDRESS}:8080" - volumes: - - ${NGINX_UPSTREAM_FILE:-./nginx/upstream.conf}:/etc/nginx/conf.d/upstream.conf:ro depends_on: api: condition: service_healthy diff --git a/deploy/compose.runtime.yaml b/deploy/compose.runtime.yaml new file mode 100644 index 0000000..b9dcd47 --- /dev/null +++ b/deploy/compose.runtime.yaml @@ -0,0 +1,4 @@ +services: + nginx: + volumes: + - ${NGINX_UPSTREAM_FILE:?NGINX_UPSTREAM_FILE is required}:/etc/nginx/conf.d/upstream.conf:ro diff --git a/scripts/rolling-update.sh b/scripts/rolling-update.sh index cda4309..3a36b1f 100755 --- a/scripts/rolling-update.sh +++ b/scripts/rolling-update.sh @@ -34,7 +34,7 @@ load_manifest() { } compose() { - docker compose -f compose.yaml -f deploy/compose.images.yaml "$@" + docker compose -f compose.yaml -f deploy/compose.images.yaml -f deploy/compose.runtime.yaml "$@" } container_name() {