PostgresFlyWayDocker

izumi.distage.docker.bundled.PostgresFlyWayDocker

Example postgres docker with flyway. It's sufficient to apply simple migrations on start. You're encouraged to use this definition as a template and modify it to your needs.

Attributes

Graph
Supertypes
trait ContainerDef
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

final case class Cfg(flyWaySqlPath: Option[String] = ..., user: String = ..., password: String = ..., database: String = ..., schema: String = ...)

Value parameters

flyWaySqlPath

directory with the migrations; None copies the sql resource directory of the classpath into the container

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Cfg

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Cfg.type
object FlyWay extends ContainerDef

Attributes

Supertypes
trait ContainerDef
class Object
trait Matchable
class Any
Self type
FlyWay.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Inherited types

final type Config = ContainerConfig[Tag]

Attributes

Inherited from:
ContainerDef
final type Container = DockerContainer[Tag]

Attributes

Inherited from:
ContainerDef

Inherited and Abstract types

type Tag

Attributes

Inherited from:
ContainerDef

Value members

Concrete methods

def applyCfg(cfg: Cfg): Config => Config
override def config: Config

Attributes

Definition Classes

Inherited methods

final def copy(config: Config): Aux[Tag]

Attributes

Inherited from:
ContainerDef
final def make[F[_]](implicit evidence$1: Tag[F], tag: Tag[Tag]): Functoid[ContainerResource[F, Tag] & Lifecycle[F, Container]]

For binding in ModuleDef:

For binding in ModuleDef:

object KafkaDocker extends ContainerDef
object ZookeeperDocker extends ContainerDef

make[KafkaDocker.Container].fromResource {
 KafkaDocker
   .make[F]
   .dependOnContainer(ZookeeperDocker)
}

To kill all containers spawned by distage, use the following command:

 docker rm -f $(docker ps -q -a -f 'label=distage.type')

Attributes

Inherited from:
ContainerDef

Concrete fields

Inherited fields

final lazy val Config: ContainerConfig.type

Attributes

Inherited from:
ContainerDef