Documentation ¶
Index ¶
- Constants
- func CheckDocker() bool
- func CheckDockerContainerExists(containerName string) bool
- func CheckDockerImageExists(dockerImage string) bool
- func CopyFileToContainer(image liferay.Image, path string) error
- func GetAlias() string
- func GetDockerImageFromRunningContainer(image liferay.Image) (string, error)
- func GetDockerVersion() (string, types.Version, error)
- func GetTomcatPort(image liferay.Image) string
- func LogContainer(image liferay.Image)
- func PsFilterByLabel(label string) ([]types.Container, error)
- func PullDockerImage(dockerImage string)
- func RemoveDockerContainer(image liferay.Image) error
- func RemoveDockerImage(dockerImageName string) error
- func RunDatabaseDockerImage(image DatabaseImage) error
- func RunLiferayDockerImage(image liferay.Image, database DatabaseImage, httpPort int, gogoShellPort int, ...) error
- func StartDockerContainer(image liferay.Image) error
- func StopDockerContainer(image liferay.Image) error
- type ContainerInstance
- type DatabaseImage
- type EnvVariables
- type JDBCConnection
- type MySQL
- func (m MySQL) GetContainerName() string
- func (m MySQL) GetDataFolder() string
- func (m MySQL) GetEnvVariables() EnvVariables
- func (m MySQL) GetFullyQualifiedName() string
- func (m MySQL) GetJDBCConnection() JDBCConnection
- func (m MySQL) GetLpnType() string
- func (m MySQL) GetPort() int
- func (m MySQL) GetRepository() string
- func (m MySQL) GetTag() string
- func (m MySQL) GetType() string
- type PostgreSQL
- func (p PostgreSQL) GetContainerName() string
- func (p PostgreSQL) GetDataFolder() string
- func (p PostgreSQL) GetEnvVariables() EnvVariables
- func (p PostgreSQL) GetFullyQualifiedName() string
- func (p PostgreSQL) GetJDBCConnection() JDBCConnection
- func (p PostgreSQL) GetLpnType() string
- func (p PostgreSQL) GetPort() int
- func (p PostgreSQL) GetRepository() string
- func (p PostgreSQL) GetTag() string
- func (p PostgreSQL) GetType() string
Constants ¶
const DBName = "lportal"
DBName name of the default database
const DBPassword = "my-secret-pw"
DBPassword default credentials for the database
const DBUser = "liferay"
DBUser default user for the database
Variables ¶
This section is empty.
Functions ¶
func CheckDockerContainerExists ¶
CheckDockerContainerExists checks if the container is running
func CheckDockerImageExists ¶
CheckDockerImageExists checks if the image is already present
func CopyFileToContainer ¶
CopyFileToContainer copies a file to the running container
func GetDockerImageFromRunningContainer ¶
GetDockerImageFromRunningContainer gets the image name of the container
func GetDockerVersion ¶
GetDockerVersion returns the output of Docker version
func GetTomcatPort ¶
GetTomcatPort gets Tomcat port from running instance
func LogContainer ¶
LogContainer show logs of a container in tail mode
func PsFilterByLabel ¶
PsFilterByLabel Retrieves all containers with a label
func RemoveDockerContainer ¶
RemoveDockerContainer removes a running container, and its stack
func RemoveDockerImage ¶
RemoveDockerImage removes a docker image
func RunDatabaseDockerImage ¶
func RunDatabaseDockerImage(image DatabaseImage) error
RunDatabaseDockerImage runs the image, setting the HTTP port and a volume for the data folder
func RunLiferayDockerImage ¶
func RunLiferayDockerImage( image liferay.Image, database DatabaseImage, httpPort int, gogoShellPort int, enableDebug bool, debugPort int, memory string) error
RunLiferayDockerImage runs the image, setting the HTTP and GoGoShell ports for bundle, debug mode, and jvmMemory if needed
func StartDockerContainer ¶
StartDockerContainer starts the stopped container
func StopDockerContainer ¶
StopDockerContainer stops the running container
Types ¶
type ContainerInstance ¶
type ContainerInstance struct { ID string `json:"id" binding:"required"` Name string `json:"name" binding:"required"` Status string `json:"status" binding:"required"` }
ContainerInstance simple model for a container
type DatabaseImage ¶
type DatabaseImage interface { GetContainerName() string GetDataFolder() string GetEnvVariables() EnvVariables GetJDBCConnection() JDBCConnection GetFullyQualifiedName() string GetLpnType() string GetPort() int GetRepository() string GetTag() string GetType() string }
DatabaseImage interface defining the contract for database docker images
func GetDatabase ¶
func GetDatabase(image liferay.Image, datastore string) DatabaseImage
GetDatabase returns the proper database model
type EnvVariables ¶
EnvVariables defines how to configure the internal variables for the database
type JDBCConnection ¶
JDBCConnection defines the JDBC connection to the database
type MySQL ¶
MySQL represents a MySQL image
func (MySQL) GetContainerName ¶
GetContainerName returns the name of the container generated by this type of image
func (MySQL) GetDataFolder ¶
GetDataFolder returns the data folder for the database
func (MySQL) GetEnvVariables ¶
func (m MySQL) GetEnvVariables() EnvVariables
GetEnvVariables returns the specific environment variables to configure the docker image
func (MySQL) GetFullyQualifiedName ¶
GetFullyQualifiedName returns the fully qualified name of the image
func (MySQL) GetJDBCConnection ¶
func (m MySQL) GetJDBCConnection() JDBCConnection
GetJDBCConnection returns the JDBC connection
func (MySQL) GetLpnType ¶
GetLpnType returns the type of the lpn image
func (MySQL) GetRepository ¶
GetRepository returns the repository for MySQL
type PostgreSQL ¶
PostgreSQL represents a PostgreSQL image
func (PostgreSQL) GetContainerName ¶
func (p PostgreSQL) GetContainerName() string
GetContainerName returns the name of the container generated by this type of image
func (PostgreSQL) GetDataFolder ¶
func (p PostgreSQL) GetDataFolder() string
GetDataFolder returns the data folder for the database
func (PostgreSQL) GetEnvVariables ¶
func (p PostgreSQL) GetEnvVariables() EnvVariables
GetEnvVariables returns the specific environment variables to configure the docker image
func (PostgreSQL) GetFullyQualifiedName ¶
func (p PostgreSQL) GetFullyQualifiedName() string
GetFullyQualifiedName returns the fully qualified name of the image
func (PostgreSQL) GetJDBCConnection ¶
func (p PostgreSQL) GetJDBCConnection() JDBCConnection
GetJDBCConnection returns the JDBC connection
func (PostgreSQL) GetLpnType ¶
func (p PostgreSQL) GetLpnType() string
GetLpnType returns the type of the lpn image
func (PostgreSQL) GetPort ¶
func (p PostgreSQL) GetPort() int
GetPort returns the bind port of the service
func (PostgreSQL) GetRepository ¶
func (p PostgreSQL) GetRepository() string
GetRepository returns the repository for PostgreSQL
func (PostgreSQL) GetType ¶
func (p PostgreSQL) GetType() string
GetType returns the type of the image