pub struct NginxTemplate { /* private fields */ }
Expand description
Nginx container template with sensible defaults
Implementations§
Source§impl NginxTemplate
impl NginxTemplate
Sourcepub fn https_port(self, port: u16) -> Self
pub fn https_port(self, port: u16) -> Self
Set HTTPS port
Sourcepub fn config_file(self, config_path: impl Into<String>) -> Self
pub fn config_file(self, config_path: impl Into<String>) -> Self
Mount custom nginx configuration
Sourcepub fn sites_config(self, sites_path: impl Into<String>) -> Self
pub fn sites_config(self, sites_path: impl Into<String>) -> Self
Mount sites configuration directory
Sourcepub fn memory_limit(self, limit: impl Into<String>) -> Self
pub fn memory_limit(self, limit: impl Into<String>) -> Self
Set memory limit for Nginx
Sourcepub fn worker_processes(self, count: impl Into<String>) -> Self
pub fn worker_processes(self, count: impl Into<String>) -> Self
Set worker processes count
Sourcepub fn worker_connections(self, count: impl Into<String>) -> Self
pub fn worker_connections(self, count: impl Into<String>) -> Self
Set worker connections count
Sourcepub fn auto_remove(self) -> Self
pub fn auto_remove(self) -> Self
Enable auto-remove when stopped
Sourcepub fn as_reverse_proxy(self) -> Self
pub fn as_reverse_proxy(self) -> Self
Configure as reverse proxy
Trait Implementations§
Source§impl Template for NginxTemplate
impl Template for NginxTemplate
Source§fn config(&self) -> &TemplateConfig
fn config(&self) -> &TemplateConfig
Get the template configuration
Source§fn config_mut(&mut self) -> &mut TemplateConfig
fn config_mut(&mut self) -> &mut TemplateConfig
Get a mutable reference to the configuration
Source§fn build_command(&self) -> RunCommand
fn build_command(&self) -> RunCommand
Build the RunCommand for this template
Source§fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start the container with this template
Source§fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop the container
Source§fn remove<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn remove<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Remove the container
Source§fn is_running<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_running<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Check if the container is running
Auto Trait Implementations§
impl Freeze for NginxTemplate
impl RefUnwindSafe for NginxTemplate
impl Send for NginxTemplate
impl Sync for NginxTemplate
impl Unpin for NginxTemplate
impl UnwindSafe for NginxTemplate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more