obsidian-note-finder/Caddyfile
2023-09-29 10:14:55 +01:00

31 lines
803 B
Caddyfile

# global options
{
admin off # theres no need for the admin api in railway's environment
persist_config off # storage isn't persistent anyway
auto_https off # railway handles https for us, this would cause issues if left enabled
log { # runtime logs
format console # set runtime log format to console mode
}
}
:3000 {
log { # access logs
format console # set access log format to console mode
}
# health check for railway
respond /health 200
# serve from the 'dist' folder (Vite builds into the 'dist' folder)
root * /app/dist
# enable gzipping responses
encode gzip
# serve files from 'dist'
file_server
# if path doesn't exist, redirect it to 'index.html' for client side routing
try_files {path} /index.html
}