{"id":13494968,"url":"https://github.com/renskiy/fabricio","last_synced_at":"2025-09-03T13:07:23.468Z","repository":{"id":57428065,"uuid":"55208383","full_name":"renskiy/fabricio","owner":"renskiy","description":"Docker deploy automation tool","archived":false,"fork":false,"pushed_at":"2020-07-31T13:16:42.000Z","size":741,"stargazers_count":264,"open_issues_count":8,"forks_count":25,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-08-30T16:42:08.310Z","etag":null,"topics":["deploy","django","docker","docker-compose","docker-swarm","fabfile","k8s","kubernetes","swarm"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/renskiy.png","metadata":{"files":{"readme":"README.rst","changelog":"changelog.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-01T06:17:29.000Z","updated_at":"2025-08-08T09:41:45.000Z","dependencies_parsed_at":"2022-09-19T05:10:20.668Z","dependency_job_id":null,"html_url":"https://github.com/renskiy/fabricio","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/renskiy/fabricio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renskiy%2Ffabricio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renskiy%2Ffabricio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renskiy%2Ffabricio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renskiy%2Ffabricio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renskiy","download_url":"https://codeload.github.com/renskiy/fabricio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renskiy%2Ffabricio/sbom","scorecard":{"id":771142,"data":{"date":"2025-08-11","repo":{"name":"github.com/renskiy/fabricio","commit":"030b1d6e8050628fcfce78615a056e27e8e56324"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: examples/apps/django/Dockerfile:1: pin your Docker image by updating python:alpine to python:alpine@sha256:a70b35b575e33d951e3f9d3fe94163ef0fd338c22552bc587a1b098a87ed6184","Warn: containerImage not pinned by hash: examples/build_image/Dockerfile:1: pin your Docker image by updating nginx:stable-alpine to nginx:stable-alpine@sha256:8757e9607e9d2c294bd64d242b4702bffe19f488c82b57de4650db493d19b639","Warn: pipCommand not pinned by hash: examples/apps/django/Dockerfile:3","Info:   0 out of   2 containerImage dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T02:19:11.853Z","repository_id":57428065,"created_at":"2025-08-23T02:19:11.854Z","updated_at":"2025-08-23T02:19:11.854Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273446915,"owners_count":25107258,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["deploy","django","docker","docker-compose","docker-swarm","fabfile","k8s","kubernetes","swarm"],"created_at":"2024-07-31T19:01:29.966Z","updated_at":"2025-09-03T13:07:23.428Z","avatar_url":"https://github.com/renskiy.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"========\nFabricio\n========\n\nFabricio is a `Docker`_ deploy automation tool used along with the `Fabric`_.\n\n.. _Fabric: http://www.fabfile.org\n.. _Docker: https://www.docker.com\n\n.. image:: https://travis-ci.org/renskiy/fabricio.svg?branch=master\n    :target: https://travis-ci.org/renskiy/fabricio\n.. image:: https://coveralls.io/repos/github/renskiy/fabricio/badge.svg?branch=master\n    :target: https://coveralls.io/github/renskiy/fabricio?branch=master\n\nFeatures\n========\n\n- build Docker images\n- create containers and services from images with provided tags\n- unlimited infrastructures\n- Fabric's parallel execution mode compatibility\n- rollback containers or services to previous version\n- public and private Docker registries support\n- deploy over SSH tunnel (e.g. access to image registry, proxy, etc.)\n- migrations apply and rollback\n- data backup and restore\n- Docker services (Swarm mode)\n- Docker stacks (Docker Compose 3.0+)\n- Kubernetes configurations\n\nSee changelog_ for detailed info.\n\n.. _changelog: https://github.com/renskiy/fabricio/blob/master/changelog.rst\n\nBasic example\n=============\n\nThe most basic :code:`fabfile.py` you can use with the Fabricio may look something like this:\n\n.. code:: python\n\n    from fabricio import docker, tasks\n    \n    app = tasks.DockerTasks(\n        service=docker.Container(\n            name='app',\n            image='nginx:stable-alpine',\n            options={\n                'publish': '80:80',\n            },\n        ),\n        hosts=['user@example.com'],\n    )\n    \nType :code:`fab --list` in your terminal to see available Fabric commands:\n\n::\n\n    Available commands:\n\n        app.deploy  deploy service (prepare -\u003e push -\u003e backup -\u003e pull -\u003e migrate -\u003e update)\n\nFinally, to deploy such configuration you simply have to execute following bash command:\n\n.. code:: bash\n\n    fab app.deploy\n\nSee also Fabricio `examples and recipes`_.\n\n.. _examples and recipes: https://github.com/renskiy/fabricio/tree/master/examples/\n\nRequirements\n============\n\nLocal\n-----\n\n- Python 2.7, 3.4*, 3.5*, 3.6*, 3.7*, 3.8*\n- (optional) Docker 1.9+ for building Docker images\n\n\\* `Fabric3`_ is used for compatibility with Python 3.x\n\n.. _Fabric3: https://github.com/mathiasertl/fabric/\n\nRemote\n------\n\n- sshd\n- Docker 1.9+\n- Docker 1.12+ for using Docker services\n\nInstall\n=======\n\n.. code:: bash\n\n    pip install fabricio\n    \nNote for macOS users\n--------------------\n\nJust use latest version of Python instead of one installed by default. The easiest way to install fresh version of Python is using `Homebrew`_:\n\n.. code:: bash\n\n    brew install python\n\n.. _Homebrew: https://brew.sh\n\nContribute\n==========\n\nAll proposals and improvements are welcomed through a `pull request`_ or issue_. Just make sure all tests are running fine.\n\n.. _pull request: https://github.com/renskiy/fabricio/pulls\n.. _issue: https://github.com/renskiy/fabricio/issues\n\nInstall test dependencies\n-------------------------\n\n.. code:: bash\n\n    pip install \".[test]\"\n\nRunning tests\n-------------\n\n.. code:: bash\n\n    python -m unittest2 discover tests --verbose\n\nRoles and infrastructures\n=========================\n\nYou can define as many roles and infrastructures as you need. The following example shows 'production' and 'test' configurations for two-roles deploy configuration:\n\n.. code:: python\n\n    from fabric import colors, api as fab\n    from fabricio import docker, tasks, infrastructure\n\n    @infrastructure\n    def testing():\n        fab.env.roledefs.update(\n            api=['user@testing.example.com'],\n            web=['user@testing.example.com'],\n        )\n\n    @infrastructure(color=colors.red)\n    def production():\n        fab.env.roledefs.update(\n            api=['user@api1.example.com', 'user@api2.example.com'],\n            web=['user@web.example.com'],\n        )\n\n    web = tasks.DockerTasks(\n        service=docker.Container(\n            name='web',\n            image='registry.example.com/web:latest',\n            options={\n                'publish': ['80:80', '443:443'],\n                'volume': '/media:/media',\n            },\n        ),\n        roles=['web'],\n    )\n\n    api = tasks.DockerTasks(\n        service=docker.Container(\n            name='api',\n            image='registry.example.com/api:latest',\n            options={\n                'publish': '80:80',\n            },\n        ),\n        roles=['api'],\n    )\n\nHere is the list of available commands:\n\n::\n\n    Available commands:\n\n        production  select production infrastructure, 'production.confirm' skips confirmation dialog\n        testing     select testing infrastructure, 'testing.confirm' skips confirmation dialog\n        api.deploy  deploy service (prepare -\u003e push -\u003e backup -\u003e pull -\u003e migrate -\u003e update)\n        web.deploy  deploy service (prepare -\u003e push -\u003e backup -\u003e pull -\u003e migrate -\u003e update)\n\n'production' and 'testing' are available infrastructures here. To deploy to a particular infrastructure just provide it before any other Fabric command(s). For example:\n\n.. code:: bash\n\n    fab testing api.deploy web.deploy\n\nSee `Infrastructures and roles`_ example for more details.\n\n.. _Infrastructures and roles: https://github.com/renskiy/fabricio/blob/master/examples/roles\n\nTags\n====\n\nAlmost every Fabricio command takes optional argument 'tag' which means Docker image tag to use when deploying container or service. For instance, if you want to deploy specific version of your application you can do it as following:\n\n.. code:: bash\n\n    fab app.deploy:release-42\n\nBy default, value for tag is taken from Container/Service Image.\n\nAlso it is possible to completely (and partially) replace registry/account/name/tag/digest of image to deploy:\n\n.. code:: bash\n\n    fab app.deploy:registry.example.com/registry-account/app-image:release-42\n    fab app.deploy:nginx@sha256:36b0181554913b471ae33546a9c19cc80e97f44ce5e7234995e307f14da57268\n\nRollback\n========\n\nTo return container or service to a previous state execute this command:\n\n.. code:: bash\n\n    fab app.rollback\n\nIdempotency\n===========\n\nFabricio always tries to skip unnecessary container/service update. However, update can be forced by adding ``force=yes`` parameter:\n\n.. code:: bash\n\n    fab app.deploy:force=yes\n    \nPrivate Docker registry\n=======================\n\nIt is often when production infrastructure has limited access to the Internet or your security policy does not allow using of public Docker image registries. In such case Fabricio offers ability to use private Docker registry which can be used also as an intermediate registry for the selected infrastructure. To use this option you have to have local Docker registry running within your LAN and also Docker client on your PC. If you have Docker installed you can run up Docker registry locally by executing following command:\n\n.. code:: bash\n\n    docker run --name registry --publish 5000:5000 --detach registry:2\n\nWhen your local Docker registry is up and run you can provide custom ``registry`` which will be used as an intermediate Docker registry accessed via reverse SSH tunnel:\n\n.. code:: python\n\n    from fabricio import docker, tasks\n\n    app = tasks.DockerTasks(\n        service=docker.Container(\n            name='app',\n            image='nginx:stable-alpine',\n            options={\n                'publish': '80:80',\n            },\n        ),\n        registry='localhost:5000',\n        ssh_tunnel='5000:5000',\n        hosts=['user@example.com'],\n    )\n\nSee `Hello World`_ example for more details.\n\n.. _Hello World: https://github.com/renskiy/fabricio/tree/master/examples/hello_world/#ssh-tunneling\n    \nBuilding Docker images\n======================\n\nUsing Fabricio you can also build Docker images from local sources and deploy them to your servers. This example shows how this can be set up:\n\n.. code:: python\n\n    from fabricio import docker, tasks\n\n    app = tasks.ImageBuildDockerTasks(\n        service=docker.Container(\n            name='app',\n            image='registry.example.com/registry-account/app-image:latest-release',\n        ),\n        hosts=['user@example.com'],\n        build_path='.',\n    )\n\nBy executing command ``app.deploy`` Fabricio will try to build image using ``Dockerfile`` from the folder provided by ``build_path`` parameter. After that image will be pushed to the registry (registry.example.com in the example above). And deploy itself will start on the last step.\n\nSee `Building Docker images`_ example for more details.\n\n.. _Building Docker images: https://github.com/renskiy/fabricio/blob/master/examples/build_image\n\nDocker services\n===============\n\nFabricio can deploy Docker services:\n\n.. code:: python\n\n    from fabricio import docker, tasks\n\n    service = tasks.DockerTasks(\n        service=docker.Service(\n            name='my-service',\n            image='nginx:stable',\n            options={\n                'publish': '8080:80',\n                'replicas': 3,\n            },\n        ),\n        hosts=['user@manager'],\n    )\n\nSee `Docker services`_ example for more details.\n\n.. _Docker services: https://github.com/renskiy/fabricio/blob/master/examples/service/swarm/\n\nDocker stacks\n=============\n\nDocker stacks are also supported (available since Docker 1.13):\n\n.. code:: python\n\n    from fabricio import docker, tasks\n\n    stack = tasks.DockerTasks(\n        service=docker.Stack(\n            name='my-docker-stack',\n            options={\n                'compose-file': 'my-docker-compose.yml',\n            },\n        ),\n        hosts=['user@manager'],\n    )\n\nSee `Docker stacks`_ example for more details.\n\n.. _Docker stacks: https://github.com/renskiy/fabricio/blob/master/examples/service/stack/\n\nKubernetes configuration\n========================\n\nKubernetes configuration can be deployed using following settings:\n\n.. code:: python\n\n    from fabricio import kubernetes, tasks\n\n    k8s = tasks.DockerTasks(\n        service=kubernetes.Configuration(\n            name='my-k8s-configuration',\n            options={\n                'filename': 'configuration.yml',\n            },\n        ),\n        hosts=['user@manager'],\n    )\n\nSee `Kubernetes configuration`_ example for more details.\n\n.. _Kubernetes configuration: https://github.com/renskiy/fabricio/blob/master/examples/service/kubernetes/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenskiy%2Ffabricio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenskiy%2Ffabricio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenskiy%2Ffabricio/lists"}