struct DPPM::Prefix::App

Included Modules

Defined in:

prefix/app.cr

Instance Method Summary

Instance methods inherited from module DPPM::Prefix::ProgramData

all_bin_paths all_bin_paths, app_bin_path app_bin_path, app_path app_path, available! available!, data_path data_path, exists? exists?, install_deps(deps : Set(Pkg), shared : Bool = true, &) install_deps, libs libs, site_path site_path

Instance methods inherited from module DPPM::Prefix::Base

conf_path conf_path, config! : ::Config::Types config!, config? : ::Config::Types | Nil? config?, config_file! : Path config_file!, config_file? : Path | Nil? config_file?, database? : Database::MySQL | Nil? database?, deps_with_expr deps_with_expr, each_config_key(&block : String -> ) each_config_key, get_config(key : String)
get_config(key : String, &)
get_config
, get_config?(key : String) get_config?, libs_path libs_path, name : String name, path : Path path, pkg_file pkg_file, port_checker(host : String) : PortChecker port_checker, prefix : Prefix prefix, resolve_deps(dependencies : Hash(String, Array(SemanticVersion)) = Hash(String, Array(SemanticVersion)).new) : Hash(String, Array(SemanticVersion)) resolve_deps

Instance Method Detail

def add(vars : Hash(String, String) = Hash(String, String).new, shared : Bool = true, add_service : Bool = true, socket : Bool = false, database : String? = nil, url : String? = nil, web_server : String? = nil, confirmation : Bool = true, &block) #

Adds a new application to the system.

ameba:disable Metrics/CyclomaticComplexity


[View source]
def contained? : Bool? #

The application is self-contained.


[View source]
def database_create(database_app : App) : Database::MySQL #

Creates a new database for this application.


[View source]
def del_config(key : String) #

Deletes a config key. Raises a KeyError if the key is not found.


[View source]
def delete(confirmation : Bool = true, preserve_database : Bool = false, keep_user_group : Bool = false, &) : App? #

Deletes an existing application from the system.

ameba:disable Metrics/CyclomaticComplexity


[View source]
def each_config_key(&block : String -> ) #

Yields each configuration key of the application and its libraries (if any).


[View source]
def each_log_stream(&block : String -> ) #

Yields each log stream.


[View source]
def exec #

[View source]
def file_info #

[View source]
def get_config(key : String, &) #

Gets the config key. Yields the block if not found.


[View source]
def get_logs(stream_name : String, follow : Bool = true, lines : Int32? = nil, &block : String -> ) #

Get application logs.


[View source]
def log_file_error #

[View source]
def log_file_output #

[View source]
def logs_path #

[View source]
def new_website(app : App) : WebSite::Caddy #

Adds a new site. Assumes the app is a Web Server.


[View source]
def owner #

[View source]
def password #

Password content, typically used for the database user.


[View source]
def password_file #

Password path, typically used for the database user.


[View source]
def path_env_var : String #

Returns a PATH with the directories locations to find the application and libaries binaries.


[View source]
def pkg : Pkg #

Base Pkg package of this application.


[View source]
def pkg? : Pkg | Nil? #

Base Pkg package of this application.


[View source]
def real_app_path : Path #

Real package path of the application.


[View source]
def service #

Returns the system service of the application. Raise if not present.


[View source]
def service? : Service::OpenRC | Service::Systemd | Nil? #

Returns the system service, if available.


[View source]
def service_create(service_dependency : String? = nil) : Service::OpenRC | Service::Systemd #

Creates a new system service


[View source]
def service_default_file #

Default service file location.


[View source]
def service_file #

Service file location.


[View source]
def service_path #

Service directory.


[View source]
def set_config(key : String, value) #

Sets a config key. Raises a KeyError if the key is not found.


[View source]
def set_permissions #

Set directory access permissions


[View source]
def shared? : Bool #

Use a shared application package.


[View source]
def upgrade(tag : String? = nil, version : String? = nil, vars : Hash(String, String) = Hash(String, String).new, shared : Bool = true, confirmation : Bool = true, &block) #

[View source]
def uri? : URI? #

[View source]
def webserver? : Prefix::App? #

[View source]
def webserver_sites_path #

[View source]
def website=(website : WebSite::Caddy) #

[View source]
def website? : WebSite::Caddy | Nil? #

[View source]
def write_configs : Nil #

Write all configurations


[View source]