Simplify docker-compose for Dokploy - API only

This commit is contained in:
2026-01-28 16:29:26 +00:00
parent 3946836e2e
commit a15ecdff59
6 changed files with 87 additions and 37 deletions

35
Caddyfile Normal file
View File

@@ -0,0 +1,35 @@
{
email admin@donovankelly.xyz
}
# Frontend - serves the built static files
app.todo.donovankelly.xyz {
root * /srv/web
encode gzip
file_server
# SPA fallback for non-file paths
@spa {
not file
not path /.well-known/*
}
rewrite @spa /index.html
header {
X-Content-Type-Options nosniff
X-Frame-Options DENY
Referrer-Policy strict-origin-when-cross-origin
}
}
# API - reverse proxy to the backend
api.todo.donovankelly.xyz {
reverse_proxy host.docker.internal:3001
header {
Access-Control-Allow-Origin https://app.todo.donovankelly.xyz
Access-Control-Allow-Methods "GET, POST, PATCH, DELETE, OPTIONS"
Access-Control-Allow-Headers "Content-Type, Authorization"
Access-Control-Allow-Credentials true
}
}