Replace Nuxt wiki with Outline deployment config
Strip the Nuxt 4 static site and replace with Docker Compose config for self-hosted Outline wiki (Outline + PostgreSQL 16 + Redis 7). Adds nginx reverse proxy with WebSocket support and CSS injection, migration script for existing markdown articles, backup script, and starter theme CSS.
This commit is contained in:
parent
e521ca02ca
commit
289e673cbc
91 changed files with 414 additions and 17714 deletions
62
nginx.conf
62
nginx.conf
|
|
@ -22,45 +22,59 @@ http {
|
|||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
types_hash_max_size 2048;
|
||||
client_max_body_size 20M;
|
||||
client_max_body_size 50M;
|
||||
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 1024;
|
||||
gzip_types text/plain text/css text/xml text/javascript
|
||||
application/x-javascript application/xml+rss
|
||||
application/javascript application/json;
|
||||
application/javascript application/json
|
||||
application/xml+rss image/svg+xml;
|
||||
|
||||
upstream outline {
|
||||
server 127.0.0.1:3100;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
server_name _;
|
||||
server_name wiki.ghostguild.org;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
# Serve custom theme files
|
||||
location /custom/ {
|
||||
alias /opt/ghost-guild-wiki-theme/;
|
||||
expires 1h;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
# Health check endpoint
|
||||
location /api/health {
|
||||
# Health check
|
||||
location = /api/health {
|
||||
proxy_pass http://outline;
|
||||
access_log off;
|
||||
add_header Content-Type application/json;
|
||||
return 200 '{"status":"ok"}';
|
||||
}
|
||||
|
||||
# Static files
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
# HTML files - no cache
|
||||
location ~* \.html$ {
|
||||
expires -1;
|
||||
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate";
|
||||
}
|
||||
|
||||
# SPA fallback - route all unmatched requests to index.html
|
||||
# Reverse proxy to Outline with CSS injection
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
proxy_pass http://outline;
|
||||
|
||||
# Standard proxy headers
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
# Disable encoding so sub_filter can process the response
|
||||
proxy_set_header Accept-Encoding "";
|
||||
|
||||
# WebSocket support (required for real-time collaboration)
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
# Inject custom CSS before </head>
|
||||
sub_filter '</head>' '<link rel="stylesheet" href="/custom/ghost-guild.css" /></head>';
|
||||
sub_filter_once on;
|
||||
sub_filter_types text/html;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue