GenieDeployDocker.build - Function
GenieDeployDocker.dockerfile - Function
dockerfile(path::String = "."; user::String = "genie", env::String = "dev",
filename::String = "Dockerfile", port::Int = 8000, dockerport::Int = 80, force::Bool = false)
Generates a Dockerfile
optimised for containerizing Genie apps.
Arguments
path::String
: where to generate the filefilename::String
: the name of the file (defaultDockerfile
)user::String
: the name of the system user under which the Genie app is runenv::String
: the environment in which the Genie app will runhost::String
: the local IP of the Genie app inside the containerport::Int
: the port of the Genie app inside the containerdockerport::Int
: the port to use on the host (used by theEXPOSE
directive)force::Bool
: if the file already exists, whenforce
istrue
, it will be overwritten
GenieDeployDocker.list-Tuple{} - Method
list(; all::Bool = false)
Lists the running Docker containers. Pass all = true
to list all the Docker containers, including the non-running ones.
GenieDeployDocker.run-Tuple{} - Method
run(; containername::String = "genieapp", hostport::Int = 80, containerport::Int = 8000, appdir::String = "/home/genie/app",
mountapp::Bool = false, image::String = "genie", command::String = "bin/server", rm::Bool = true, it::Bool = true)
Runs the Docker container named containername
, binding hostport
and containerport
.
Arguments
containername::String
: the name of the container of the Genie apphostport::Int
: port to be used on the host for accessing the appcontainerport::Int
: the port on which the app is running inside the containerappdir::String
: the folder where the app is stored within the containermountapp::String
: if true the app from the host will be mounted so that changes on the host will be reflected when accessing the app in the container (to be used for dev)image::String
: the name of the Docker imagecommand::String
: what command to run when starting the apprm::Bool
: removes the container upon exitit::Bool
: runs interactivelywebsockets_hostport::Int
: port used for binding the websockets connection, defaults tohostport
,websockets_containerport::Int
: port used for binding the container for websockets access, defaults tocontainerport
,detached::Bool
: whether or not to run the process detached from the Julia session (outlives the Julia process), defaultfalse
,sudo::Bool
: whether or not to run the process assudo
, defaults totrue
on Linux.
GenieDeployDocker.stop - Function
stop(; containername::String = "genieapp", timeout::Int = 10, sudo::Bool = Sys.islinux())
Stops the Docker container named containername
.