aboutsummaryrefslogtreecommitdiff
path: root/src/static-files
diff options
context:
space:
mode:
Diffstat (limited to 'src/static-files')
-rw-r--r--src/static-files/Dockerfile3
-rw-r--r--src/static-files/VERSION1
-rw-r--r--src/static-files/conf28
3 files changed, 32 insertions, 0 deletions
diff --git a/src/static-files/Dockerfile b/src/static-files/Dockerfile
new file mode 100644
index 0000000..5653b3b
--- /dev/null
+++ b/src/static-files/Dockerfile
@@ -0,0 +1,3 @@
+FROM bitnami/nginx:1.16
+
+COPY conf /opt/bitnami/nginx/conf/server_blocks/static-files.conf
diff --git a/src/static-files/VERSION b/src/static-files/VERSION
new file mode 100644
index 0000000..45c7a58
--- /dev/null
+++ b/src/static-files/VERSION
@@ -0,0 +1 @@
+v0.0.1
diff --git a/src/static-files/conf b/src/static-files/conf
new file mode 100644
index 0000000..7cb0807
--- /dev/null
+++ b/src/static-files/conf
@@ -0,0 +1,28 @@
+server {
+ listen 8080;
+ client_max_body_size 1M;
+ keepalive_timeout 15;
+ types_hash_max_size 2024;
+ root /app;
+ location = / {
+ # Instead of handling the index, just
+ # rewrite / to /index.html
+ rewrite ^ /index.html;
+ }
+ location / {
+ # Serve a .gz version if it exists
+ gzip_static on;
+ # Try to serve the clean url version first
+ try_files $uri.html $uri/index.html $uri =404;
+ }
+
+ location = /favicon.ico {
+ # This never changes, so don't let it expire
+ expires max;
+ }
+
+ location ^~ /theme {
+ # This content should very rarely, if ever, change
+ expires 1y;
+ }
+}