Add Docker Compose stack with PostgreSQL and Caddy
Production traffic enters through Caddy, which terminates TLS for the public domain and the CMS subdomain and sets HSTS and the other security headers. PostgreSQL, Strapi and Nuxt publish no ports of their own. docker-compose.dev.yml publishes the ports on localhost and drops Caddy for local testing. It is a separate file rather than an override.yml so it can only be applied when passed explicitly, never by accident in production.
This commit is contained in:
1 parent
a808f1010f
commit
960b007ba7
4 files changed
+155
No files matched your search
@@ -0,0 +1,29 @@
|
||||
{
|
||||
email {$ACME_EMAIL}
|
||||
}
|
||||
|
||||
(security_headers) {
|
||||
header {
|
||||
Strict-Transport-Security "max-age=31536000; includeSubDomains"
|
||||
X-Content-Type-Options "nosniff"
|
||||
X-Frame-Options "SAMEORIGIN"
|
||||
Referrer-Policy "strict-origin-when-cross-origin"
|
||||
-Server
|
||||
}
|
||||
}
|
||||
|
||||
{$PUBLIC_DOMAIN} {
|
||||
import security_headers
|
||||
encode zstd gzip
|
||||
reverse_proxy frontend:3000
|
||||
}
|
||||
|
||||
{$CMS_DOMAIN} {
|
||||
import security_headers
|
||||
encode zstd gzip
|
||||
# Uploaded media can be large; Strapi's own limit still applies.
|
||||
request_body {
|
||||
max_size 100MB
|
||||
}
|
||||
reverse_proxy cms:1337
|
||||
}
|
||||
Reference in new issue
Block a user