Skip to content

Commit

Permalink
Add sitemap_search
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Nov 20, 2024
1 parent 28a0870 commit 442d0c9
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
28 changes: 28 additions & 0 deletions conf/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,20 @@ http {
proxy_buffering off;
}

location /search/sitemap {
proxy_pass http://sitemap_search:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect http://sitemap_search:8080/ $scheme://$http_host/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 20d;
proxy_buffering off;
}

location /search {
proxy_pass http://search:8080;
proxy_set_header X-Real-IP $remote_addr;
Expand Down Expand Up @@ -229,6 +243,20 @@ http {
proxy_buffering off;
}

location /search/sitemap {
proxy_pass http://sitemap_search:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect http://sitemap_search:8080/ $scheme://$http_host/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 20d;
proxy_buffering off;
}

location /search {
proxy_pass http://search:8080;
proxy_set_header X-Real-IP $remote_addr;
Expand Down
21 changes: 21 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,27 @@ services:
- ALLOW_INSECURE=true
expose:
- 8080
sitemap_search:
image: ghcr.io/nationalarchives/ds-sitemap-search:24.11.20.3
env_file:
- .env
environment:
- ENVIRONMENT=staging
- CONFIG=config.Staging
- SECRET_KEY=${SECRET_KEY}
- COOKIE_DOMAIN=.dblclk.dev
- CSP_STYLE_SRC='self',fonts.googleapis.com,p.typekit.net,use.typekit.net
- CSP_FONT_SRC='self',fonts.gstatic.com,use.typekit.net
- DB_HOST=postgres
- DB_NAME=sitemap_urls
- DB_USERNAME=etna
- DB_PASSWORD=${POSTGRES_PASSWORD}
- SITEMAPS=https://www.nationalarchives.gov.uk/sitemap.xml,https://develop.tna.dblclk.dev/sitemap.xml,https://nationalarchives.github.io/design-system/sitemap.xml
- POPULATE_ON_STARTUP=False
depends_on:
- postgres
expose:
- 8080
postgres:
container_name: postgres
image: postgres:13
Expand Down

0 comments on commit 442d0c9

Please sign in to comment.