Skip to content

Commit

Permalink
Updated logging options for caddy
Browse files Browse the repository at this point in the history
  • Loading branch information
aliofye committed Jan 17, 2025
1 parent d7c413d commit dbe150e
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .docker/caddy/Caddyfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
{
# Global options block
admin off # Disable the admin interface
auto_https off # Disable automatic HTTPS in favor of Railway's managed SSL
log {
auto_https off # Disable automatic HTTPS in favor of your hosting managed SSL
log file {
output file /var/log/caddy/caddy.log {
roll_local_time
roll_size 10MiB
roll_keep 10
}
}
log console {
output stdout
format console
}
}

Expand All @@ -17,13 +25,12 @@
root * packages/web/build/client
# Handle SPA routing by rewriting all paths to index.html
try_files {path} /index.html
# Enable gzip and zstd compression
encode gzip zstd
# Static file serving
file_server
}

# Enable gzip and zstd compression
encode gzip zstd

# Cache static assets with long cache durations
header Cache-Control "public, max-age=31536000, immutable"

Expand Down

0 comments on commit dbe150e

Please sign in to comment.