Skip to main content

docker0s

Docker0s uses docker-compose to manage multiple containerised apps on a single host.

PyPI Documentation Status Tests Test coverage

Bring together standard docker-compose files across multiple projects in a single simple manifest file, written in either YAML or Python with pre- and post-operation hooks, to deploy to a single host.

It’s designed for small self-hosted low-maintenance deployments which don’t need the complexity of Kubernetes - think k8s with zero features and a much simpler config syntax, with simple app manifests instead of helm charts.

There is a collection of ready-to-use app manifests at docker0s-manifests, with examples for how to deploy them to your host.

Quickstart

Install:

pip install docker0s

Put together a manifest in YAML as d0s-manifest.yml:

apps:
  traefik:
    extends: git+https://github.com/radiac/docker0s-manifests.git#traefik
    env_file: traefik.env
  smtp:
    compose: smtp.yml
  website:
    type: RepoApp
    extends: "git+ssh://git@github.com:radiac/example.com.git@main"
    env:
      DOMAIN: example.radiac.net
host:
  name: example.radiac.net

or in Python as d0s-manifest.py, using subclassing to perform actions before and after operations and add custom functionality:

from docker0s import RepoApp

class Website(RepoApp):
    # Clone a repo to the host and look for docker-compose.yml in there
    extends = "git+ssh://git@github.com:radiac/example.com.git@main"
    env = {
        "DOMAIN": "example.radiac.net"
    }

    # Subclass operation methods to add your own logic
    def deploy(self):
        # Perform action before deployment, eg clean up any previous deployment
        super().deploy()
        # Perform action after deployment, eg push additional resources

class Vagrant(Host):
    name = "vagrant"

See writing manifests for a full reference

Then run a command, eg:

d0s deploy
d0s up
d0s restart website.django
d0s exec website.django /bin/bash
d0s cmd website app_command arguments

See commands for a full command reference

Metadata

Release files for docker0s 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docker0s 2.0.0
File Size Uploaded
docker0s-2.0.0.tar.gz 22.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for docker0s 2.0.0
File Interpreter ABI Platform
docker0s-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 48.3 kB

Release files / docker0s-2.0.0.tar.gz

Download URL docker0s-2.0.0.tar.gz
Size 22.6 kB
Tags Source
SHA-256 checksum
How to use checksums
fa1477684008e7d779c87e3744276d991fa96354a58174e683871f0cb9c1073c
BLAKE2b-256 checksum
How to use checksums
3353ea6cd712cbcbe75356c0fd5c82bda67f4e0b6038c0c8a3be1754b9a7d7a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.1

Release files / docker0s-2.0.0-py3-none-any.whl

Download URL docker0s-2.0.0-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f2e10c5ce53a02e0c6a3c29103385b61de7addf7f13ef87513d7ba1443443a01
BLAKE2b-256 checksum
How to use checksums
a4377a674a12e807f6ac1a6766e14a8cea4671696534a5fa5964c92db3d2ced0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.1

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page