nginx container for render
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
FROM nginx:1.27-bookworm
|
||||
|
||||
# render ssh needs ~/.ssh for the running user and an unlocked root
|
||||
RUN mkdir -p /root/.ssh && chmod 0700 /root/.ssh && usermod --unlock root
|
||||
|
||||
COPY nginx.render.conf /etc/nginx/conf.d/default.conf
|
||||
@@ -0,0 +1,47 @@
|
||||
server {
|
||||
listen 10000;
|
||||
server_name _;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
charset utf-8;
|
||||
|
||||
# answers before the mirror is uploaded, so the first deploy goes green
|
||||
location = /healthz {
|
||||
access_log off;
|
||||
return 200 "ok\n";
|
||||
}
|
||||
|
||||
location = /shop {
|
||||
return 301 /shop/;
|
||||
}
|
||||
location = /shop/ {
|
||||
return 301 /_sites/shop.uvsgames.com/;
|
||||
}
|
||||
location = /play {
|
||||
return 301 /play/;
|
||||
}
|
||||
location = /play/ {
|
||||
return 301 /_sites/play.uvsgames.com/;
|
||||
}
|
||||
|
||||
location /_sites/ {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
# logo and page edits should not sit behind browser cache
|
||||
location ~* \.svg$ {
|
||||
add_header Cache-Control "no-cache";
|
||||
try_files $uri =404;
|
||||
}
|
||||
location ~* \.(?:html|css)$ {
|
||||
add_header Cache-Control "no-cache";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
error_page 404 /404.html;
|
||||
}
|
||||
Reference in New Issue
Block a user