Skip to content

Comment on Show HN: Miniboss, versatile local container management with Pythonparent

Comments

Without looking at miniboss code - is there a reason why services are defined as classes as opposed to instances? E.g.

    # maybe even have the group as an instance
    group = miniboss.Group(name="foobar")

    group.database = miniboss.Service(
        name="appdb",
        image="postgres:10.6",
        env={
            "POSTGRES_PASSWORD": "dbpwd",
            "POSTGRES_USER": "dbuser",
            "POSTGRES_DB": "appdb"
        },
        ports={5432: 5433}
    )

Edit: added the group instance

As I understand it the services are instances, the classes are the service definitions. So if you wanted 5 identical web servers you only need to make one service definition class, and then miniboss would use instances of it to make the containers. I could be wrong though.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.