1
0
Fork 0
mirror of https://github.com/demostf/setup synced 2026-06-03 16:44:06 +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
- 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

View file

@ -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

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