{"id":31769578,"url":"https://github.com/robalb/compose-prod","last_synced_at":"2025-10-10T02:51:21.329Z","repository":{"id":305529289,"uuid":"1023063695","full_name":"robalb/compose-prod","owner":"robalb","description":"A template to deploy your containerized projects on a single-node server","archived":false,"fork":false,"pushed_at":"2025-08-26T22:06:25.000Z","size":81,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-27T06:44:49.604Z","etag":null,"topics":["ansible","ci-cd","deployment-automation","docker-compose","paas"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/robalb.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-20T12:58:26.000Z","updated_at":"2025-08-26T22:06:29.000Z","dependencies_parsed_at":"2025-07-20T17:30:33.301Z","dependency_job_id":"24e06237-745b-4274-8843-e83cefb7559f","html_url":"https://github.com/robalb/compose-prod","commit_stats":null,"previous_names":["robalb/compose-prod"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/robalb/compose-prod","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robalb%2Fcompose-prod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robalb%2Fcompose-prod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robalb%2Fcompose-prod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robalb%2Fcompose-prod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robalb","download_url":"https://codeload.github.com/robalb/compose-prod/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robalb%2Fcompose-prod/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002551,"owners_count":26083403,"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-10-10T02:00:06.843Z","response_time":62,"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":["ansible","ci-cd","deployment-automation","docker-compose","paas"],"created_at":"2025-10-10T02:51:18.646Z","updated_at":"2025-10-10T02:51:21.321Z","avatar_url":"https://github.com/robalb.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Compose prod\n\nAn Infrastructure-As-Code template for deploying your containerized projects\non a single-node server.\n\nFeatures:\n\n- Deploy your projects by defining a simple `docker-compose.yml` file\n- Ready out of the box: Buy a VPS, fork this repository, and follow the [guide](#guide) to\n  have your project running and deployed in a few minutes.\n- from zero to https in an instant: Automatic TLS certificate generation, powered by traefik.\n- A grafana control panel to monitor the state of all your services, and their logs.  \n  powered by pre-configured Prometheus, Loki, node-exporter, Container-advisor.\n\n## Guide\n\n- [Setup your computer to work on the infrastructure](./docs/devenv-setup.md)\n- [Setup the infrastructure from scratch](./docs/infra-from-scratch.md)\n- [Deploy a new project](./docs/deploy.md)\n- [Manage an existing infrastructure](./docs/manage-existing-infra.md)\n\n## Overview\n\nThis ansible project will configure your ubuntu server, install docker,\nand set up the following folder structure in the home folder of the \nadministrator user:\n\n```\nhome/admin/\n├── platform/\n│   ├── docker-compose.platform.yml\n│   └── docker-compose.traefik.yml\n├── project-name1/\n│   └── docker-compose.yml\n└── project-name2/\n    └── docker-compose.yml\n```\n\nTo deploy your projects, you have then [several options](./docs/deploy.md).\nIf you want to follow a continuos-deployment approach:\n\n- add a docker-compose file to your project repository\n- configure the `deploy.yml` file in the infrastructure repository:\n  ```\n  projects:\n    - name: \"my-projet\"\n      git: \"https://github.com/username/repository\"\n      compose_path: \"/compose-prod/\"\n      autodeploy_on_change: true\n  ```\n- That's it! The system running on your server will monitor your project repository, and will automatically deploy \n  your docker-compose when it detects a change. \n  If you deployed a web server, it will instantly be availabe online, with a valid TLS \n  certificate.\n\nIf you want to manually manage your projects, that's fine too!\nJust copy your docker-compose files into the server, and launch them with `docker compose up -d`  \nYour project logs and metrics will be available on the Grafana dashboard.\n\n## FAQ\n\n- __Does this scale?__\n  Chances are this is not the question you should be asking:  \n  No. This Infrastructure will run on a single-server only, and cannot scale to multiple nodes.  \n  But most project will never need to scale. This infrastructure running on a `4$` VPS\n  can handle more than `10k` cuncurrent users depending on the workload.  \n  Know your system: are you running expensive machine learning inference models, or just serving a static web page?\n  Most importantly: can you afford downtime? can you run your database on a single node?\n\n- __What happens if the server breaks?__  \n  All the `docker-compose` projects you deployed on the server will go\n  offline. Since all your infrastructure is stored in git and automated via Ansible, you can get a new server up and running in a few minutes: just run the Ansible scripts again.  \n  This is an extremely simple and cheap way to deploy your projects, but it comes at the cost of less availabilty.\n  If you cannot afford downtime, `docker-compose` on a single server is not the right way to deploy \n  your projects, and it's probably time to look at more expensive and complicated solutions.\n\n- __Is this [web scale](https://www.youtube.com/watch?v=b2F-DItXtZs)__?  \n  yes, it's web scale. And blazing fast.\n\n\n## Contributing\n\nContributions are always welcome! The ansible code\nin this repository follows an experimental coding style,\nyou can read more about it in the [code guidelines](./docs/code-guidelines.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobalb%2Fcompose-prod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobalb%2Fcompose-prod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobalb%2Fcompose-prod/lists"}