Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ ENV NODE_OPTIONS=--max_old_space_size=8192

RUN pnpm run build

FROM nginx:1.26.3-alpine
FROM joseluisq/static-web-server:2

EXPOSE 80

COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/build /usr/share/nginx/html/console
COPY docker/sws.toml /sws.toml
COPY --from=build /app/build /public/console

ENV SERVER_CONFIG_FILE=/sws.toml
44 changes: 0 additions & 44 deletions docker/nginx.conf

This file was deleted.

66 changes: 66 additions & 0 deletions docker/sws.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[general]
host = "::"
port = 80

root = "/public"
log-level = "error"

cache-control-headers = false
security-headers = false

compression = true
compression-static = true

directory-listing = false
redirect-trailing-slash = false
index-files = "index.html"
page-fallback = "/console/index.html"

[advanced]

# base
[[advanced.headers]]
source = "/console/**"
headers.Cache-Control = "no-cache, no-store, max-age=0"
headers.Pragma = "no-cache"
headers.Expires = "0"
headers.X-UA-Compatible = "IE=Edge"
headers.X-Frame-Options = "SAMEORIGIN"
headers.X-XSS-Protection = "1; mode=block;"
headers.X-Content-Type-Options = "nosniff"

# js chunks
[[advanced.headers]]
source = "/console/_app/immutable/**"
headers.Cache-Control = "public, max-age=31536000"
headers.Pragma = "public"
headers.Expires = "1y"

# images
[[advanced.headers]]
source = "/console/images/**"
headers.Cache-Control = "public, must-revalidate, max-age=86400"
headers.Expires = "1d"

# css, stylesheets
[[advanced.headers]]
source = "/console/css/**"
headers.Cache-Control = "public, must-revalidate, max-age=86400"
headers.Expires = "1d"

# fonts
[[advanced.headers]]
source = "/console/fonts/**"
headers.Cache-Control = "public, must-revalidate, max-age=86400"
headers.Expires = "1d"

# icons
[[advanced.headers]]
source = "/console/icons/**"
headers.Cache-Control = "public, must-revalidate, max-age=86400"
headers.Expires = "1d"

[[advanced.redirects]]
source = "/"
destination = "/console"
kind = 301
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@
"@sentry/cli",
"esbuild",
"svelte-preprocess"
]
],
"overrides": {
"vite": "npm:rolldown-vite@latest"
}
},
"packageManager": "pnpm@10.20.0"
}
Loading