Genie.Deploy.Docker.dockerfile
— Functiondockerfile(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
Genie.Deploy.Docker.build
— Functionbuild(path::String = "."; appname = "genie")
Builds the Docker image based on the Dockerfile
Genie.Deploy.Docker.run
— Functionrun(; 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 interactively