{"id":15648083,"url":"https://github.com/scmmishra/slick-deploy","last_synced_at":"2025-04-13T18:02:33.796Z","repository":{"id":206638225,"uuid":"716876468","full_name":"scmmishra/slick-deploy","owner":"scmmishra","description":"CLI tool to declaratively deploy containers with Caddy","archived":false,"fork":false,"pushed_at":"2024-08-08T15:54:28.000Z","size":289,"stargazers_count":47,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T04:17:43.072Z","etag":null,"topics":["caddy","cli","containers","deployment","docker","go","golang","vm"],"latest_commit_sha":null,"homepage":"","language":"Go","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/scmmishra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-11-10T03:57:20.000Z","updated_at":"2025-02-10T01:13:41.000Z","dependencies_parsed_at":"2023-11-23T12:23:01.583Z","dependency_job_id":"a57c955c-266c-4d5a-b2e7-002cfb2bb317","html_url":"https://github.com/scmmishra/slick-deploy","commit_stats":null,"previous_names":["scmmishra/slick-deploy"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scmmishra%2Fslick-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scmmishra%2Fslick-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scmmishra%2Fslick-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scmmishra%2Fslick-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scmmishra","download_url":"https://codeload.github.com/scmmishra/slick-deploy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248758438,"owners_count":21156957,"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","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":["caddy","cli","containers","deployment","docker","go","golang","vm"],"created_at":"2024-10-03T12:23:16.101Z","updated_at":"2025-04-13T18:02:33.735Z","avatar_url":"https://github.com/scmmishra.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\u003ch1\u003e\n  \u003cimg src=\"./.github/logo.png\" alt=\"SlickDeploy\" width=\"30\"\u003e Slick Deploy\n\u003c/h1\u003e\n\n[![DeepSource](https://app.deepsource.com/gh/scmmishra/slick-deploy.svg/?label=code+coverage\u0026show_trend=true\u0026token=Bsp9BiRQD-9Ya1stCaYGzjgv)](https://app.deepsource.com/gh/scmmishra/slick-deploy/)\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n\u003c/div\u003e\n\n# Slick Deploy\n\nSlick Deploy is a command-line tool designed to facilitate zero-downtime deployment for applications running in Docker containers, with Caddy as the reverse proxy.\n\n\u003e [!WARNING]\n\u003e Slick is not ready for production, but you can give it a shot if you're feeling adventurous\n\n### Installing\n\nTo start using Slick Deploy, install it using this one-line command:\n\n```bash\ncurl -fsSL https://dub.sh/install-slick | bash\n```\n\nIt will install the latest version of slick in /usr/local/bin/slick. You can use the same script to update the CLI.\n\nTo install from source manually, run the following commands:\n\n```bash\ngit clone https://github.com/scmmishra/slick-deploy.git\ncd slick-deploy\nmake install\n```\n\n## Features\n\n- Zero-downtime deployment: Update your running application without interrupting service.\n- Easy configuration: Use simple YAML files to manage deployment settings.\n- Health checks: Ensure your application is running correctly before switching over.\n- Rollback capability: Quickly revert to the previous version if something goes wrong.\n\n## Why?\n\nJust for fun, I couldn't find a tool that was minimal and had near zero-downtime deploys. All I was looking for something that worked as a slim layer between me and the tools I use to run apps on a VM. So I built it.\nI also wanted to learn Go for a while, and Go is simply amazing for building CLI tools.\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.\n\n### Prerequisites\n\nBefore you begin, ensure you have the following installed:\n\n- Docker\n- Caddy\n\n### Usage\n\nTo deploy an application:\n\n```bash\nslick deploy --config path/to/your/config.yaml --env path/to/your/.env\n```\n\nTo check the status of your deployment:\n\n```bash\nslick status\n```\n\nTo check logs for your deployment:\n\n```bash\nslick logs\n```\n\nSee `slick --help` for more information on commands and flags.\n\n### Configuration\n\nCreate a config.yaml file with your deployment settings. Here's an example configuration:\n\n```yaml\napp:\n  name: \"memos\"\n  image: \"ghcr.io/usememos/memos\"\n  container_port: 5230\n  registry:\n    username: \"\u003cusername\u003e\"\n    password: SLICK_REGISTRY_PASSWORD\n  env:\n    - AWS_S3_ACCESS_KEY_ID\n    - AWS_S3_BUCKET_NAME\n    - AWS_S3_CUSTOM_DOMAIN\n    - AWS_S3_ENDPOINT_URL\n    - AWS_S3_REGION_NAME\n    - AWS_S3_SECRET_ACCESS_KEY\n  volumes:\n    - \"my_volume:/data\"\n  port_range:\n    start: 8000\n    end: 9000\n\ncaddy:\n  admin_api: \"http://localhost:2019\"\n  rules:\n    - match: \"*.pages.dev\"\n      reverse_proxy:\n        - path: \"\"\n          to: \"http://localhost:{port}\"\n\n    - match: \"localhost\"\n      reverse_proxy:\n        - path: \"\"\n          to: \"localhost:{port}\"\n        - path: \"/api/*\"\n          to: \"localhost:{port}/internal/api/*\"\n\nhealth_check:\n  endpoint: \"/health\"\n  timeout_seconds: 5\n```\n\n### Managing environment variables\n\nYou can point to an `.env` file to load environment variables from. This is useful for storing sensitive information like passwords and API keys.\n\n```bash\nslick deploy --config path/to/your/config.yaml --env path/to/your/.env\n```\n\nHowever, it is best to use a tool like [Phase](https://phase.dev) to manage your environment variables. Phase allows you to store your environment variables in a secure, encrypted vault, and then inject them into your application at runtime.\n\n```bash\nphase run slick deploy\n```\n\nRead more about Phase CLI [here](https://docs.phase.dev/cli/commands).\n\n### Development\n\nTo run the build with air use the following command\n\n```bash\nair --build.cmd \"go build -o bin/slick cmd/slick/main.go\" --build.bin \"\"\n```\n\nAdd an alias to your .bashrc or .zshrc file to make it easier to run the slick command\n\n```bash\nalias slickdev=\"\u003cpath-to-project\u003e/bin/slick\"\n```\n\n\u003e Note, we use `slickdev` instead of `slick` to avoid conflicts with the global slick binary.\n\n#### Testing\n\nTo run the tests, use the following command\n\n```bash\ngo test ./... -coverprofile=coverage.out\n```\n\nThis will also generate the coverage report, which can be viewed by running\n\n```bash\ngo tool cover -html=coverage.out\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscmmishra%2Fslick-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscmmishra%2Fslick-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscmmishra%2Fslick-deploy/lists"}