All New

user:thomas gists created by user

title:mygist gists with given title

description:sync gists with given description

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

all:systemctl search all fields

Register

Login

All New Register Login

brennan

Joined 2 months ago

Recently created
Least recently created
Recently updated
Least recently updated
All gists 12

brennan / bookwrym-cf.md

0 likes
0 forks
1 files
Last active 2 months ago

BookWyrm + Cloudflare Tunnel (updated)

If your Cloudflare tunnel points directly at Gunicorn (web:8000), nginx is bypassed entirely. Gunicorn returns HTML for every /static/ request, and the browser blocks it due to MIME type mismatch and that's why there's no CSS.

The fix is to point the tunnel at nginx instead, and disable certbot since Cloudflare handles TLS.

How the traffic flows

Without the fix (tunnel bypasses nginx):

brennan / bookwrym-fix.md

0 likes
0 forks
1 files
Last active 2 months ago

BookWyrm + Caddy: Static Files Fix

Caddy is proxying directly to Gunicorn, which doesn't serve static files. It returns HTML for every /static/ request, and the browser blocks it due to MIME type mismatch.

The fix is to add a small nginx container between Caddy and Gunicorn. nginx serves /static/ and /images/ straight from the Docker volumes, and passes everything else to Gunicorn.

1. Add the nginx config

Create nginx-books/nginx.conf next to your docker-compose.yml:

Newer Older

Powered by Opengist ⋅ Load: 20ms⋅

English
العربية Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 简体中文 繁體中文