mirror of
https://github.com/rybbit-io/rybbit.git
synced 2025-05-11 04:15:36 +02:00
Update Caddyfile and docker-compose.yml for local development configuration
- Added global options in Caddyfile to disable automatic HTTPS and use local certificates. - Updated docker-compose.yml to fallback to localhost for DOMAIN_NAME if not set, and removed unnecessary port mappings for HTTP/3.
This commit is contained in:
parent
3e6f028ef6
commit
aaeba003f5
2 changed files with 9 additions and 6 deletions
|
@ -1,5 +1,11 @@
|
||||||
# Caddyfile for docs
|
# Caddyfile for docs
|
||||||
{$DOMAIN_NAME} {
|
{
|
||||||
|
# Global options
|
||||||
|
auto_https off # Disable automatic HTTPS
|
||||||
|
local_certs # Use local certificates for development
|
||||||
|
}
|
||||||
|
|
||||||
|
{$DOMAIN_NAME:localhost} {
|
||||||
# Enable compression
|
# Enable compression
|
||||||
encode zstd gzip
|
encode zstd gzip
|
||||||
|
|
||||||
|
@ -10,7 +16,6 @@
|
||||||
|
|
||||||
# Security headers
|
# Security headers
|
||||||
header {
|
header {
|
||||||
Strict-Transport-Security max-age=31536000;
|
|
||||||
X-Content-Type-Options nosniff
|
X-Content-Type-Options nosniff
|
||||||
X-Frame-Options DENY
|
X-Frame-Options DENY
|
||||||
Referrer-Policy strict-origin-when-cross-origin
|
Referrer-Policy strict-origin-when-cross-origin
|
||||||
|
|
|
@ -5,15 +5,13 @@ services:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "8080:80" # Using different port to avoid conflict with main app
|
- "8080:80" # Using different port to avoid conflict with main app
|
||||||
- "8443:443"
|
|
||||||
- "8443:443/udp" # Needed for HTTP/3
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./Caddyfile:/etc/caddy/Caddyfile # Mount Caddy config file
|
- ./Caddyfile:/etc/caddy/Caddyfile # Mount Caddy config file
|
||||||
- docs_caddy_data:/data # Mount persistent data volume for certs etc.
|
- docs_caddy_data:/data # Mount persistent data volume for certs etc.
|
||||||
- docs_caddy_config:/config # Mount persistent config volume
|
- docs_caddy_config:/config # Mount persistent config volume
|
||||||
environment:
|
environment:
|
||||||
# Pass domain name for use in Caddyfile (will need to be set when running)
|
# Fallback to localhost if domain not set
|
||||||
- DOMAIN_NAME=rybbit.io
|
- DOMAIN_NAME=${DOMAIN_NAME:-localhost}
|
||||||
depends_on:
|
depends_on:
|
||||||
- docs
|
- docs
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue