From 2209b6d603039da647e6162773e3c0f77bb7b016 Mon Sep 17 00:00:00 2001 From: "Langhammer, Jens" Date: Fri, 4 Oct 2019 12:01:38 +0200 Subject: [PATCH] deploy(minor): fix robots.txt not being in the right path fix path matching in docker compose --- docker-compose.yml | 2 +- passbook/core/nginx.conf | 2 +- static.Dockerfile | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 05447011e..9433facae 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -77,7 +77,7 @@ services: networks: - internal labels: - - traefik.frontend.rule=PathPrefix:/static + - traefik.frontend.rule=PathPrefix:/static, /robots.txt - traefik.port=80 - traefik.docker.network=internal traefik: diff --git a/passbook/core/nginx.conf b/passbook/core/nginx.conf index f99c14caa..c0a76e56d 100644 --- a/passbook/core/nginx.conf +++ b/passbook/core/nginx.conf @@ -41,7 +41,7 @@ http { gunzip on; add_header X-passbook-Version 0.4.2-beta; add_header Vary X-passbook-Version; - root /static/; + root /data/; location /_/healthz { return 204; diff --git a/static.Dockerfile b/static.Dockerfile index 9c32d8255..b197222d6 100644 --- a/static.Dockerfile +++ b/static.Dockerfile @@ -12,5 +12,6 @@ RUN ./manage.py collectstatic --no-input FROM nginx:latest -COPY --from=static-build /app/static /static/static/ +COPY --from=static-build /app/static /data/static/ +COPY --from=static-build /app/static/robots.txt /data/robots.txt COPY ./passbook/core/nginx.conf /etc/nginx/nginx.conf