Files
inbuxa-admin/docker/nginx.conf
T
jcoffey-dev 991912ef4f
ci / build (pull_request) Skipped
ci / publish (pull_request) Skipped
ci / notices (pull_request) Successful in 18s
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 58s
Write .well-known/source into the build
The console's public repository and the commit it was built from, in
the form https://coffeylabs.org/specs/well-known-source/ defines. The
commit comes from INBUXA_REVISION, which the image build passes in; a
build without one writes nothing, and nginx answers that address with a
404 rather than the app. tsconfig.node.json drops source-archive.ts,
gone since #7.
2026-10-28 21:57:30 -07:00

35 lines
1.1 KiB
Nginx Configuration File

server {
listen 8080;
server_name _;
root /usr/share/nginx/html;
index index.html;
# A single-page app: every path that is not a file on disk is the app's own
# route, and the app is what decides what it means. Without this, a reload
# anywhere but the root is a 404 from nginx.
location / {
try_files $uri $uri/ /index.html;
}
# Hashed filenames, so the content at a given name never changes. index.html
# is deliberately not in here: it is the file that names the current hashes,
# and a cached one pins a deployment to the build it replaced.
location /assets/ {
expires 1y;
add_header Cache-Control "public, immutable";
}
# Where this build's source is (https://coffeylabs.org/specs/well-known-source/).
# Exact, so a build without one is a 404, not the app.
location = /.well-known/source {
default_type application/json;
add_header Cache-Control "no-cache";
add_header Access-Control-Allow-Origin "*";
try_files $uri =404;
}
location = /index.html {
add_header Cache-Control "no-cache";
}
}