1
0
Fork 0
mirror of https://github.com/demostf/setup synced 2026-06-04 00:54:07 +02:00
This commit is contained in:
Robin Appelman 2023-11-24 19:03:09 +01:00
commit ef922af762
3 changed files with 23 additions and 1 deletions

View file

@ -25,6 +25,7 @@ The setup uses four domains derived from the base domain.
- ${HOST}: the main site - ${HOST}: the main site
- api.${HOST}: the backend api and upload code - api.${HOST}: the backend api and upload code
- static.${HOST}: server uploaded demos - 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 All four domains should point towards the server on which this setup is running

View file

@ -10,6 +10,7 @@ services:
- "./api.tmpl:/etc/nginx/conf.d/api.tmpl" - "./api.tmpl:/etc/nginx/conf.d/api.tmpl"
- "./static.tmpl:/etc/nginx/conf.d/static.tmpl" - "./static.tmpl:/etc/nginx/conf.d/static.tmpl"
- "./sync.tmpl:/etc/nginx/conf.d/sync.tmpl" - "./sync.tmpl:/etc/nginx/conf.d/sync.tmpl"
- "./maps.tmpl:/etc/nginx/conf.d/maps.tmpl"
- "${DEMO_ROOT}:/demos" - "${DEMO_ROOT}:/demos"
environment: environment:
- HOST=${HOST} - HOST=${HOST}
@ -60,6 +61,13 @@ services:
networks: networks:
- proxy-tier - proxy-tier
maps:
restart: always
image: demostf/maps
container_name: maps
networks:
- proxy-tier
db: db:
restart: always restart: always
image: demostf/db image: demostf/db

13
maps.tmpl Normal file
View file

@ -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";
}
}