From ef922af76208a8bb7e506b429e0082f08676a69d Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 24 Nov 2023 19:03:09 +0100 Subject: [PATCH] add maps --- README.md | 3 ++- docker-compose.yml | 8 ++++++++ maps.tmpl | 13 +++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 maps.tmpl diff --git a/README.md b/README.md index 0f32a1e..7c405b9 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ The setup uses four domains derived from the base domain. - ${HOST}: the main site - api.${HOST}: the backend api and upload code - static.${HOST}: server uploaded demos -- sync.${HPST}: playback sync server +- sync.${HOST}: playback sync server +- maps.${HOST}: static map data All four domains should point towards the server on which this setup is running diff --git a/docker-compose.yml b/docker-compose.yml index 77b863e..65e7f06 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,7 @@ services: - "./api.tmpl:/etc/nginx/conf.d/api.tmpl" - "./static.tmpl:/etc/nginx/conf.d/static.tmpl" - "./sync.tmpl:/etc/nginx/conf.d/sync.tmpl" + - "./maps.tmpl:/etc/nginx/conf.d/maps.tmpl" - "${DEMO_ROOT}:/demos" environment: - HOST=${HOST} @@ -59,6 +60,13 @@ services: mem_limit: 128m networks: - proxy-tier + + maps: + restart: always + image: demostf/maps + container_name: maps + networks: + - proxy-tier db: restart: always diff --git a/maps.tmpl b/maps.tmpl new file mode 100644 index 0000000..159d7b3 --- /dev/null +++ b/maps.tmpl @@ -0,0 +1,13 @@ +server { + listen 80; + server_name maps.${HOST}; + + add_header 'Access-Control-Allow-Origin' '*'; + + location / { + proxy_pass http://maps; + proxy_http_version 1.1; + proxy_set_header Upgrade ${DOLLAR}http_upgrade; + proxy_set_header Connection "upgrade"; + } +}