I think I was in the same situation as you, as I have Nginx running multiple websites including proxying to a ghost blog. In my case, I also wanted to take care of my SSL certificates myself and not letting caddy do it. What ended up working for me was to run the migration process ( How To Install Ghost With Docker (preview) - Ghost Developer Docs ) with the following modifications:
`compose.yml` > `caddy` section:
ports:
- "127.0.0.1:8081:8081"
`caddy\Caddyfile`
:8081 {
[...]
# Default proxy everything else to Ghost
handle {
reverse_proxy ghost:2369 {
# Preserve the original Host and forwarded headers from Nginx
header_up Host {http.request.host}
header_up X-Real-IP {http.request.header.X-Real-IP}
header_up X-Forwarded-For {http.request.header.X-Forwarded-For}
header_up X-Forwarded-Proto {http.request.header.X-Forwarded-Proto}
header_up Forwarded {http.request.header.Forwarded}
}
}
[...]
}
While having in my nginx conf file, a server directive for my blog with the appropriate proxy_pass:
If you mean using nginx instead of caddy, you certainly can, by implementing the Caddyfile in your nginx conf. You would just have to take care of merging any changes in the upstream compose file with your custom, caddy-less one.
If you mean avoid docker whatsoever, the note in here says that the new Analytics feature is incompatible with Ghost-CLI, so you won’t be able to use it. But your OP was about migrating from Ghost-CLI to docker.