{"id":19586354,"url":"https://github.com/tbobm/my_deployer","last_synced_at":"2026-05-05T17:31:28.974Z","repository":{"id":56540027,"uuid":"307119719","full_name":"tbobm/my_deployer","owner":"tbobm","description":"Implementation of the My Deployer school project, a lightweight container deploying solution.","archived":false,"fork":false,"pushed_at":"2022-04-10T20:29:02.000Z","size":52,"stargazers_count":3,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-07T06:18:54.712Z","etag":null,"topics":["cli","container-healthchecks","containers","devops","docker","docker-image","python","python-click"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tbobm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-25T14:41:47.000Z","updated_at":"2022-04-10T20:27:37.000Z","dependencies_parsed_at":"2022-08-15T20:31:51.163Z","dependency_job_id":null,"html_url":"https://github.com/tbobm/my_deployer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tbobm/my_deployer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbobm%2Fmy_deployer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbobm%2Fmy_deployer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbobm%2Fmy_deployer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbobm%2Fmy_deployer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tbobm","download_url":"https://codeload.github.com/tbobm/my_deployer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbobm%2Fmy_deployer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32660155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","container-healthchecks","containers","devops","docker","docker-image","python","python-click"],"created_at":"2024-11-11T07:59:30.723Z","updated_at":"2026-05-05T17:31:28.956Z","avatar_url":"https://github.com/tbobm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# My Deployer\n\n[![Base CI](https://github.com/tbobm/my_deployer/actions/workflows/main.yml/badge.svg)](https://github.com/tbobm/my_deployer/actions/workflows/main.yml)\n\n_A lightweight container deployment solution, written in Python._\n\n## Goal\n\nIn order to support learning the basics of Containerization principles and starting to code in Python, the \"My Deployer\" aims to implement the following features:\n- Ensure Docker is installed and at the expected version on a remote host\n- Provide a simple way of building Docker images on a remote host\n- Deploy these images on the remote host by taking in account image version\n- Enable upgrading remote containers and reverting failing deployments\n- Verify running container healthchecks and restart them if necessary\n\n## Installation\n\n- Clone this repository\n- `pip install .`\n\n## Example\n\n```bash\nmy_deployer config localhost --port 2222 --username vagrant\nmy_deployer build ssh://vagrant@localhost:2222 examples/hello-world --tag 1.0\nmy_deployer deploy ssh://vagrant@localhost:2222 examples/hello-world --tag 1.0\n```\n\n## Usage\n\n```\nmy_deployer --help\nUsage: my_deployer [OPTIONS] COMMAND [ARGS]...\n\n  Handy lightweight container deployment CLI program.\n\nOptions:\n  --help  Show this message and exit.\n\nCommands:\n  build        Build the Service on the remote host.\n  config       Configure Docker on the remote host.\n  deploy       Deploy the Service on the remote host.\n  healthcheck  Ensure the running containers are healthy.\n```\n\n\n### Config:\n\nThe `config` command will:\n- SSH using the given arguments\n- Install or update Docker on the remote host\n\n```\nmy_deployer config --help\nUsage: my_deployer config [OPTIONS] HOSTNAME\n\n  Configure Docker on the remote host.\n\nOptions:\n  --port INTEGER   SSH port to use.  [default: 22]\n  --username TEXT  Remote user username if required.\n  --password TEXT  Remote user password if required.\n  --help           Show this message and exit.\n```\n\n### Build:\n\nThe `build` command will:\n- Connect to the Docker socket through the `url` (i.e.: `ssh`-based URL)\n- Build a Docker image on the remote host\n- Tag this image using if the corresponding flag is set\n\n```\nmy_deployer build --help\nUsage: my_deployer build [OPTIONS] URL [SERVICES]...\n\n  Build the Service on the remote host.\n\nOptions:\n  --tag TEXT  Remote image tag for service(s) to build.\n  --help      Show this message and exit.\n```\n\n### Deploy:\n\nThe `deploy` command will:\n- Look for existing services\n- Stop these services\n- Try to run a container using the service image with the given tag if specified\n- Restore or remove the previous containers if any\n\n```\nmy_deployer deploy --help\nUsage: my_deployer deploy [OPTIONS] URL [SERVICES]...\n\n  Deploy the Service on the remote host.\n\nOptions:\n  --tag TEXT  Remote image tag for service(s) to deploy.  [default: latest]\n  --help      Show this message and exit.\n```\n\n### Healthcheck:\n\nThe `healthcheck` command will:\n- List every container's healthcheck if any\n- Restart every unhealthy container if asked\n\n```\nmy_deployer healthcheck --help\nUsage: my_deployer healthcheck [OPTIONS] URL [SERVICES]...\n\n  Ensure the running containers are healthy.\n\nOptions:\n  --restart  Restart unhealthy containers.  [default: False]\n  --help     Show this message and exit.\n```\n\n\n## Tasks\n\n### Communication\n\nWith the host:\n- [x] Access a remote host using SSH\n- [x] Connect to the remote Docker client\n\nWith the user:\n- [x] Provide a friendly logging interface\n- [ ] \\(_optional): Enable a verbose mode (0 or 1) to display remote log_\n\n### Config\n\n\u003e Ensure Docker is installed and at the expected version on a remote host.\n\n- [x] Enquire about the currently installed Docker version, if any\n- [x] Install or upgrade Docker to expected version if necessary\n- [ ] \\(_optional): Display informations about the Docker configuration_\n\n### Build\n\n\u003e Provide a simple way of building Docker images on a remote host\n\n- [x] Build the Docker image with the corresponding values\n- [x] \\(_optional): Generate some metadatas and display them_\n\n### Deploy\n\n\u003e Deploy these images on the remote host by taking in account image version\n- Enable upgrading remote containers and reverting failing deployments\n\n- [x] Enquire if the specified image is already deployed and which version -if any- it is using\n- [x] Deploy the newly built image (or a specified one) if necessary\n- [x] If an already built container exists, stop it and restore it if the one getting deployed fails\n- [x] Delete previous container if the new one is succesful and healthy\n\n### Healthcheck\n\n\u003e Verify running container healthchecks and restart them if necessary\n\n- [x] List every container's healthcheck status\n- [x] If specified, restart the unhealthy containers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbobm%2Fmy_deployer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftbobm%2Fmy_deployer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbobm%2Fmy_deployer/lists"}