thibaud frere commited on
Commit
e1c7423
·
1 Parent(s): 542395c
Files changed (3) hide show
  1. Dockerfile +0 -3
  2. app/astro.config.mjs +2 -2
  3. nginx.conf +1 -23
Dockerfile CHANGED
@@ -23,9 +23,6 @@ RUN npm run export:pdf -- --theme=light --wait=full
23
  # Use an official Nginx runtime as the base image for serving the application
24
  FROM nginx:alpine
25
 
26
- # Install Brotli dynamic module for Nginx
27
- RUN apk add --no-cache nginx-mod-http-brotli
28
-
29
  # Copy the built application from the build stage
30
  COPY --from=build /app/dist /usr/share/nginx/html
31
 
 
23
  # Use an official Nginx runtime as the base image for serving the application
24
  FROM nginx:alpine
25
 
 
 
 
26
  # Copy the built application from the build stage
27
  COPY --from=build /app/dist /usr/share/nginx/html
28
 
app/astro.config.mjs CHANGED
@@ -15,8 +15,8 @@ export default defineConfig({
15
  integrations: [
16
  mermaid({ theme: 'forest', autoTheme: true }),
17
  mdx(),
18
- // Precompress output with Brotli (preferred) and Gzip as fallback
19
- compressor({ brotli: true, gzip: true })
20
  ],
21
  devToolbar: {
22
  enabled: false
 
15
  integrations: [
16
  mermaid({ theme: 'forest', autoTheme: true }),
17
  mdx(),
18
+ // Precompress output with Gzip only (Brotli disabled due to server module mismatch)
19
+ compressor({ brotli: false, gzip: true })
20
  ],
21
  devToolbar: {
22
  enabled: false
nginx.conf CHANGED
@@ -1,6 +1,3 @@
1
- load_module modules/ngx_http_brotli_filter_module.so;
2
- load_module modules/ngx_http_brotli_static_module.so;
3
-
4
  worker_processes auto;
5
  pid /tmp/nginx.pid;
6
 
@@ -20,26 +17,7 @@ http {
20
  sendfile on;
21
  keepalive_timeout 65;
22
 
23
- # Brotli (preferred)
24
- brotli on;
25
- brotli_comp_level 5;
26
- brotli_static always;
27
- brotli_min_length 256;
28
- brotli_types
29
- text/plain
30
- text/css
31
- text/javascript
32
- application/javascript
33
- application/json
34
- application/xml
35
- application/rss+xml
36
- image/svg+xml
37
- font/ttf
38
- font/otf
39
- font/woff
40
- font/woff2;
41
-
42
- # Gzip fallback
43
  gzip on;
44
  gzip_vary on;
45
  gzip_proxied any;
 
 
 
 
1
  worker_processes auto;
2
  pid /tmp/nginx.pid;
3
 
 
17
  sendfile on;
18
  keepalive_timeout 65;
19
 
20
+ # Gzip compression
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  gzip on;
22
  gzip_vary on;
23
  gzip_proxied any;