Researching on the topic to have 1dev Pages feature, I found 2 solutions so far:
Simplified approach described here: #346 - Simple 1dev Pages solution
More complex but also more complementary solution using Caddy Server: https://caddyserver.com
The main difference between using Caddy and Nginx is that Caddy offers REST API itself, so it's configuration can be automated and controlled by 1dev via REST API. With some additional UI in 1dev project settings a user could create a new website, add a custom domain and 1dev could then connect to Caddy server, update it's configuration to have a new website up and running.
Similarly to Nginx Proxy Manager, Caddy server takes care of SSL certificates, so user's hassle would be very little.
Caddy server could be running anywhere on the internet but it could be also bundled into the same Docker container as 1dev providing a complementary environment with full functionality within a single package.
I am opening this issue to start a discussion on feasibility of such approach and to discuss possible ways to implement it.
Robin Shen commented 3 years ago
Thanks for letting me know the project. It is very interesting. I'd suggest to add this functionality via a custom plugin, and I will add an extension point so that plugin can add its own settings into project setting.
I think it might not very appropriate to package caddy server into OneDev directly as otherwise bare-bone installation will not work as it is not running in a container environment.
Researching on the topic to have 1dev Pages feature, I found 2 solutions so far:
The main difference between using Caddy and Nginx is that Caddy offers REST API itself, so it's configuration can be automated and controlled by 1dev via REST API. With some additional UI in 1dev project settings a user could create a new website, add a custom domain and 1dev could then connect to Caddy server, update it's configuration to have a new website up and running. Similarly to Nginx Proxy Manager, Caddy server takes care of SSL certificates, so user's hassle would be very little.
Caddy server could be running anywhere on the internet but it could be also bundled into the same Docker container as 1dev providing a complementary environment with full functionality within a single package.
I am opening this issue to start a discussion on feasibility of such approach and to discuss possible ways to implement it.