core/__snapshots__/TestGenerateBuildPlanForExamples_staticfile-config_1.snap.json
core/__snapshots__/TestGenerateBuildPlanForExamples_staticfile-config_1.snap.jsonBrowse 1970 files
818 tokens
2,535 bytes
Token encoding: o200k_base
Snapshot 21a254f
← Back to SKILL.md
1{2 "deploy": {3 "base": {4 "image": "ghcr.io/railwayapp/railpack-runtime:mise-2026.9.9"5 },6 "inputs": [7 {8 "include": [9 "/railpack/caddy"10 ],11 "step": "packages:caddy"12 },13 {14 "include": [15 "."16 ],17 "step": "build"18 }19 ],20 "startCommand": "caddy run --config Caddyfile --adapter caddyfile 2\u003e\u00261",21 "variables": {22 "RAILPACK_VERSION": "dev"23 }24 },25 "steps": [26 {27 "commands": [28 {29 "cmd": "mise install-into caddy@2.11.4 /railpack/caddy"30 },31 {32 "path": "/railpack/caddy"33 },34 {35 "path": "/railpack/caddy/bin"36 }37 ],38 "inputs": [39 {40 "image": "ghcr.io/railwayapp/railpack-builder:mise-2026.9.9"41 }42 ],43 "name": "packages:caddy",44 "variables": {45 "MISE_PARANOID": "1"46 }47 },48 {49 "assets": {50 "Caddyfile": "{\n\tadmin off\n\tpersist_config off\n\tauto_https off\n\n\tlog {\n\t\tformat json\n\t}\n\n\tservers {\n\t\ttrusted_proxies static private_ranges\n\t}\n}\n\n:{$PORT:80} {\n\tlog {\n\t\tformat json\n\t}\n\n\trespond /health 200\n\n\t# Security headers\n\theader {\n\t\t# Enable cross-site filter (XSS) and tell browsers to block detected attacks\n\t\tX-XSS-Protection \"1; mode=block\"\n\t\t# Prevent some browsers from MIME-sniffing a response away from the declared Content-Type\n\t\tX-Content-Type-Options \"nosniff\"\n\t\t# Keep referrer data off of HTTP connections\n\t\tReferrer-Policy \"strict-origin-when-cross-origin\"\n\t\t# Enable strict Content Security Policy\n\t\tContent-Security-Policy \"default-src 'self'; img-src 'self' data: https: *; style-src 'self' 'unsafe-inline' https: *; script-src 'self' 'unsafe-inline' https: *; font-src 'self' data: https: *; connect-src 'self' https: *; media-src 'self' https: *; object-src 'none'; frame-src 'self' https: *;\"\n\t\t# Remove Server header\n\t\t-Server\n\t}\n\n\troot * hello\n\n\t# Handle static files\n\tfile_server {\n\t\thide .git\n\t\thide .env*\n\t}\n\n\t# Compression with more formats\n\tencode {\n\t\tgzip\n\t\tzstd\n\t}\n\n\t# Try files with HTML extension\n\ttry_files {path} {path}.html {path}/index.html\n\n\thandle_errors {\n\t\trewrite * /{err.status_code}.html\n\t\tfile_server\n\t}\n}\n"51 },52 "commands": [53 {54 "name": "Caddyfile",55 "path": "Caddyfile"56 },57 {58 "cmd": "caddy fmt --overwrite Caddyfile"59 }60 ],61 "inputs": [62 {63 "step": "packages:caddy"64 },65 {66 "include": [67 "."68 ],69 "local": true70 }71 ],72 "name": "build",73 "secrets": [74 "*"75 ]76 }77 ]78}