From 777a2e5fedb32442e66b97d550f29220052e129e Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Wed, 29 Jan 2020 14:43:15 +0100 Subject: [PATCH] Prevent index caching, automatic docker ports --- docker-compose.yml | 4 ++-- front/nginx.conf | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ff53b238d..fabd968a1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,14 +6,14 @@ services: context: . dockerfile: front/Dockerfile ports: - - ${FRONT_PORT:?}:80 + - 80 deploy: replicas: 3 back: image: registry.verdnatura.es/salix-back:${BRANCH_NAME:?} build: . ports: - - ${BACK_PORT:?}:3000 + - 3000 environment: - NODE_ENV configs: diff --git a/front/nginx.conf b/front/nginx.conf index 22bce2283..4b08f3564 100644 --- a/front/nginx.conf +++ b/front/nginx.conf @@ -11,4 +11,8 @@ server { location / { autoindex on; } + location /index.html { + expires -1; + add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; + } }