@@ -31,28 +31,37 @@ pub struct Opts {
3131 #[ clap( long, default_value = "localhost" , env = "ATOMIC_DOMAIN" ) ]
3232 pub domain : String ,
3333
34- /// The contact mail address for Let's Encrypt HTTPS setup
35- #[ clap( long, env = "ATOMIC_EMAIL" ) ]
36- pub email : Option < String > ,
37-
3834 // 9.883 is decimal for the `⚛` character.
3935 /// The port where the HTTP app is available. Set to 80 if you want this to be available on the network.
4036 #[ clap( short, long, default_value = "9883" , env = "ATOMIC_PORT" ) ]
4137 pub port : u32 ,
4238
43- /// The port where the HTTPS app is available. Sert to 443 if you want this to be available on the network.
44- #[ clap( long, default_value = "9884" , env = "ATOMIC_PORT_HTTPS" ) ]
39+ /// The port where the HTTPS app is available. Set to 443 if you want this to be available on the network.
40+ #[ clap(
41+ long,
42+ default_value = "9884" ,
43+ env = "ATOMIC_PORT_HTTPS" ,
44+ requires = "https"
45+ ) ]
4546 pub port_https : u32 ,
4647
4748 /// The IP address of the server. Set to :: if you want this to be available to other devices on your network.
4849 #[ clap( long, default_value = "::" , env = "ATOMIC_IP" ) ]
4950 pub ip : IpAddr ,
5051
5152 /// Use HTTPS instead of HTTP.
52- /// Will get certificates from LetsEncrypt.
53+ /// Will get certificates from LetsEncrypt fully automated .
5354 #[ clap( long, env = "ATOMIC_HTTPS" ) ]
5455 pub https : bool ,
5556
57+ /// Initializes DNS-01 challenge for LetsEncrypt. Use this if you want to use subdomains.
58+ #[ clap( long, env = "ATOMIC_HTTPS_DNS" , requires = "https" ) ]
59+ pub https_dns : bool ,
60+
61+ /// The contact mail address for Let's Encrypt HTTPS setup
62+ #[ clap( long, env = "ATOMIC_EMAIL" ) ]
63+ pub email : Option < String > ,
64+
5665 /// Endpoint where the front-end assets are hosted
5766 #[ clap( long, default_value = "/app_assets" , env = "ATOMIC_ASSET_URL" ) ]
5867 pub asset_url : String ,
@@ -86,6 +95,7 @@ pub struct Opts {
8695 pub log_level : LogLevel ,
8796
8897 /// How you want to trace what's going on with the server. Useful for monitoring performance and errors in production.
98+ /// Combine with `log_level` to get more or less data (`trace` is the most verbose)
8999 #[ clap( arg_enum, long, env = "ATOMIC_TRACING" , default_value = "stdout" ) ]
90100 pub trace : Tracing ,
91101}
0 commit comments