dockerfile builds

This commit is contained in:
Oleksii Bulenok
2026-08-11 00:34:57 +02:00
parent 29a7d3fd40
commit 1debeba13e
5 changed files with 184 additions and 49 deletions
+2 -2
View File
@@ -280,8 +280,8 @@ func serve(cctx *cli.Context) error {
path := c.Request().URL.Path
maxAge := 1 * (60 * 60) // default is 1 hour
// all assets in /static/js, /static/css, /static/media are content-hashed and can be cached for a long time
if strings.HasPrefix(path, "/static/js/") || strings.HasPrefix(path, "/static/css/") || strings.HasPrefix(path, "/static/media/") {
// all assets in /static/_expo, /static/assets, /static/media are content-hashed and can be cached for a long time
if strings.HasPrefix(path, "/static/_expo/") || strings.HasPrefix(path, "/static/assets/") || strings.HasPrefix(path, "/static/media/") {
maxAge = 365 * (60 * 60 * 24) // 1 year
}
+4 -1
View File
@@ -2,7 +2,10 @@ package bskyweb
import "embed"
//go:embed static/*
// `all:` disables the default exclusion of files/dirs beginning with `_` or `.`,
// which is needed because Metro emits chunks like `__common-...js` and
// `__expo-metro-runtime-...js`.
//go:embed all:static
var StaticFS embed.FS
//go:embed embedr-static/*
+3 -3
View File
@@ -13,7 +13,7 @@
<!-- Hello Humans! API docs at https://atproto.com -->
<link rel="preload" as="font" type="font/woff2" href="{{ staticCDNHost }}/static/media/InterVariable.2bf3d951bf9d6109437ea0874bbf12fb.woff2" crossorigin>
<link rel="preload" as="font" type="font/woff2" href="{{ staticCDNHost }}/static/assets/assets/fonts/inter/InterVariable.2bf3d951bf9d6109437ea0874bbf12fb.woff2" crossorigin>
<style>
/**
@@ -25,14 +25,14 @@
*/
@font-face {
font-family: 'InterVariable';
src: url("{{ staticCDNHost }}/static/media/InterVariable.2bf3d951bf9d6109437ea0874bbf12fb.woff2") format('woff2');
src: url("{{ staticCDNHost }}/static/assets/assets/fonts/inter/InterVariable.2bf3d951bf9d6109437ea0874bbf12fb.woff2") format('woff2');
font-weight: 300 1000;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'InterVariableItalic';
src: url("{{ staticCDNHost }}/static/media/InterVariable-Italic.8d1dc86da25893737b6bb8a9c64b790e.woff2") format('woff2');
src: url("{{ staticCDNHost }}/static/assets/assets/fonts/inter/InterVariable-Italic.8d1dc86da25893737b6bb8a9c64b790e.woff2") format('woff2');
font-weight: 300 1000;
font-style: italic;
font-display: swap;