{"id":48278297,"url":"https://github.com/pythoninthegrass/icarus","last_synced_at":"2026-04-04T22:40:43.175Z","repository":{"id":342501372,"uuid":"1174185589","full_name":"pythoninthegrass/icarus","owner":"pythoninthegrass","description":"Seed a dokploy project programmatically (IaC!)","archived":false,"fork":false,"pushed_at":"2026-03-25T20:57:49.000Z","size":858,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-30T06:22:54.024Z","etag":null,"topics":["dokploy","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pythoninthegrass.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":["pythoninthegrass"]}},"created_at":"2026-03-06T06:48:49.000Z","updated_at":"2026-03-25T20:57:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pythoninthegrass/icarus","commit_stats":null,"previous_names":["pythoninthegrass/dokploy_seed","pythoninthegrass/icarus"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pythoninthegrass/icarus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Ficarus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Ficarus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Ficarus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Ficarus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pythoninthegrass","download_url":"https://codeload.github.com/pythoninthegrass/icarus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Ficarus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31417566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: 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":["dokploy","python"],"created_at":"2026-04-04T22:40:42.520Z","updated_at":"2026-04-04T22:40:43.161Z","avatar_url":"https://github.com/pythoninthegrass.png","language":"Python","readme":"# icarus\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"logo.png\" alt=\"icarus logo\" width=\"300\"\u003e\n  \u003cbr\u003e\n  \u003csub\u003eImage credit: \u003ca href=\"https://www.history-for-kids.com/icarus.html\"\u003eHistory for Kids\u003c/a\u003e\u003c/sub\u003e\n\u003c/p\u003e\n\nDeployment tool for [Dokploy](https://dokploy.com). Define your project's apps, domains, deploy order, and environment overrides in a single `dokploy.yml` — the tool handles the Dokploy API calls (cf. IaC).\n\n**Table of Contents**\n\n* [icarus](#icarus)\n  * [Prerequisites](#prerequisites)\n  * [Install](#install)\n  * [Quick Start](#quick-start)\n    * [Creating from the command line](#creating-from-the-command-line)\n  * [Commands](#commands)\n  * [Environment Selection](#environment-selection)\n  * [Configuration](#configuration)\n  * [Multi-Environment Support](#multi-environment-support)\n  * [Env Filtering](#env-filtering)\n  * [State Files](#state-files)\n  * [Examples](#examples)\n  * [Adding to an Existing Project](#adding-to-an-existing-project)\n  * [CI Workflows](#ci-workflows)\n  * [API Notes](#api-notes)\n  * [Contributing](#contributing)\n  * [Security](#security)\n  * [License](#license)\n\n## Prerequisites\n\n* A running [Dokploy](https://dokploy.com) instance\n* [uv](https://docs.astral.sh/uv/)\n* A Dokploy API key (generated in Dokploy UI \u003e Settings \u003e API)\n\n## Install\n\n### Standalone (no install)\n\nCopy `main.py` to the target machine and run directly.\nDependencies are resolved automatically by `uv` via\n[PEP 723](https://peps.python.org/pep-0723/) inline metadata.\n\n```bash\n# Run from the repo\n./main.py list\n\n# Or explicitly with uv\nuv run --script main.py --help\n```\n\n### Install from git\n\n```bash\n# One-off execution\nuvx --from git+https://github.com/pythoninthegrass/icarus.git ic --help\n\n# Persistent install\nuv tool install git+https://github.com/pythoninthegrass/icarus.git\nic --help\n```\n\n## Quick Start\n\n1. Click **Use this template** \u003e **Create a new repository** at the top of this page (or use the [GitHub CLI](#creating-from-the-command-line)).\n\n2. Clone your new repo and create your `dokploy.yml` (see `dokploy.yml.example` or the `examples/` directory).\n\n3. Set environment variables:\n\n    ```bash\n    export DOKPLOY_URL=https://dokploy.example.com\n    export DOKPLOY_API_KEY=your-api-key\n    ```\n\n    Or add them to your project's `.env` file (see `.env.example`).\n\n4. Run:\n\n    ```bash\n    ic --env prod setup     # Create project + apps + providers + domains\n    ic --env prod env       # Push filtered .env to env_targets + per-app env\n    ic --env prod apply     # Full pipeline: check, setup, env, trigger\n    ic --env prod status    # Show status of all apps\n    ic --env prod destroy   # Delete project + all apps\n    ```\n\n### Creating from the command line\n\n```bash\ngh repo create my-project --template pythoninthegrass/icarus --private --clone\ncd my-project\n```\n\n## Commands\n\n| Command   | Description                                                                                      |\n|-----------|--------------------------------------------------------------------------------------------------|\n| `setup`   | Create Dokploy project, apps, configure providers (Docker/GitHub), set commands, create domains  |\n| `env`     | Push filtered `.env` to `env_targets` apps + per-app custom env vars                             |\n| `apply`   | Full pipeline: check, setup, env, trigger deploys in `deploy_order` wave sequence                |\n| `status`  | Show application status for all apps in the project                                              |\n| `destroy` | Delete the Dokploy project (cascades to all apps) and remove state file                          |\n\n## Environment Selection\n\nThe `--env` flag is optional and defaults to `dev`. It can also be set via the `DOKPLOY_ENV` environment variable (in `.env` or exported):\n\n```bash\n# Explicit flag (highest priority)\nic --env prod status\n\n# Via environment variable\nexport DOKPLOY_ENV=prod\nic status\n\n# No flag, no variable -\u003e defaults to 'dev'\nic status\n\n# Standalone mode\nuv run --script main.py --env prod status\n```\n\nResolution order: `--env` flag \u003e `DOKPLOY_ENV` (from `.env` or environment) \u003e `dev`.\n\n## Configuration\n\nAll configuration lives in `dokploy.yml`. See [docs/configuration.md](docs/configuration.md) for the full reference.\n\nThe file is validated by `schemas/dokploy.schema.json`. Add this directive at the top of your `dokploy.yml` for IDE autocomplete and validation:\n\n```yaml\n# yaml-language-server: $schema=https://raw.githubusercontent.com/pythoninthegrass/icarus/main/schemas/dokploy.schema.json\n```\n\n## Multi-Environment Support\n\nEach deployment targets a named environment (e.g. `prod`, `dev`). The environment determines:\n\n1. **Project name**: base `project.name` is suffixed with `-\u003cenv\u003e` (e.g. `my-app-prod`)\n2. **State file**: each environment gets its own `.dokploy-state/\u003cenv\u003e.json`\n3. **Config overrides**: the `environments` section in `dokploy.yml` can override `github` settings and per-app properties\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eConfig Merging\u003c/strong\u003e\u003c/summary\u003e\n\nThe `environments.\u003cenv\u003e` section is merged into the base config before any command runs:\n\n* `environments.\u003cenv\u003e.github` — shallow-merges into the base `github` section (e.g. override `branch` per environment)\n* `environments.\u003cenv\u003e.apps.\u003cname\u003e` — shallow-merges into the matching base app definition (can override `command`, `env`, `dockerImage`, `domain`)\n\n\u003e [!IMPORTANT]\n\u003e Structural properties (`name`, `source`) cannot be overridden per-environment since they define the app's identity.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eConfig File Discovery\u003c/strong\u003e\u003c/summary\u003e\n\nThe tool walks upward from the current working directory looking for `dokploy.yml`. This means it works from any subdirectory within a project that has a `dokploy.yml` at its root.\n\n\u003c/details\u003e\n\n## Env Filtering\n\nWhen pushing `.env` to `env_targets`, comments, blank lines, and lines matching `DEFAULT_ENV_EXCLUDE_PREFIXES` are stripped. Built-in excluded prefixes:\n\n* `COMPOSE_`, `CONTAINER_NAME`, `DOPPLER_`, `PGDATA`, `POSTGRES_VERSION`, `DOKPLOY_`, `TASK_X_`\n\n\u003e [!TIP]\n\u003e Extend with `ENV_EXCLUDE_PREFIXES` in your `.env` (comma-separated).\n\n## State Files\n\n`.dokploy-state/\u003cenv\u003e.json` files contain Dokploy resource IDs (project ID, app IDs, app names). They contain **no secrets** and should be committed to version control.\n\n## Examples\n\nSee the `examples/` directory:\n\n* [`web-app/`](examples/web-app/dokploy.yml) — GitHub-sourced web + worker + redis + flower monitor\n* [`docker-only/`](examples/docker-only/dokploy.yml) — All Docker images, no GitHub source\n* [`minimal/`](examples/minimal/dokploy.yml) — Single Docker app, simplest valid config\n\n## Adding to an Existing Project\n\nInstall `ic` globally:\n\n```bash\nuv tool install git+https://github.com/pythoninthegrass/icarus.git\n```\n\nThen in your project directory:\n\n1. Create `dokploy.yml` based on `dokploy.yml.example` (schema is fetched from GitHub automatically)\n2. Create `.dokploy-state/` directory (add a `.gitkeep`)\n3. Add `DOKPLOY_URL` and `DOKPLOY_API_KEY` to your `.env`\n4. Run `ic --env prod setup`\n\n\u003e [!WARNING]\n\u003e The `destroy` command is irreversible — it deletes the entire Dokploy project and all associated apps. The local state file is also removed.\n\n## Project Structure\n\n```text\nmain.py                  # PEP 723 standalone script + all logic\nsrc/icarus/\n  __init__.py            # Re-exports main for package distribution\n  main.py                # Symlink to ../../main.py\npyproject.toml           # uv_build backend + entry point\n.tool-versions           # mise runtime versions (python, ruff, uv)\n.env.example             # Environment variable template\n```\n\n## Development\n\n```bash\n# Install python, ruff, and uv via mise\nmise install\n\n# Install project dependencies\nuv sync --all-extras\n\n# Lint\nruff format --check --diff .\nruff check .\n\n# Format\nruff format .\n```\n\n## CI Workflows\n\n| Workflow                                                 | Trigger                   | Description                                                                           |\n| -------------------------------------------------------- | ------------------------- | ------------------------------------------------------------------------------------- |\n| [E2E Tests](.github/workflows/e2e.yml)                   | Push/PR to `main`         | Runs end-to-end test suite against a live Dokploy instance                            |\n| [Release Please](.github/workflows/release-please.yml)   | Push to `main`            | Automates version bumps and changelog generation                                      |\n| [Monitor Dokploy](.github/workflows/monitor-dokploy.yml) | Daily (8 AM UTC) / manual | Checks for new Dokploy releases, fetches the OpenAPI spec, and opens a tracking issue |\n\nThe monitor workflow can also be triggered manually via `workflow_dispatch` with an optional tag input (e.g., `v0.28.8`). If the spec for a given version already exists in `schemas/src/`, the run is a no-op.\n\n## API Notes\n\nSee [docs/api-notes.md](docs/api-notes.md) for Dokploy API quirks and gotchas.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Security\n\nSee [SECURITY.md](SECURITY.md)\n\n## License\n\n[Unlicense](LICENSE)\n","funding_links":["https://github.com/sponsors/pythoninthegrass"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythoninthegrass%2Ficarus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpythoninthegrass%2Ficarus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythoninthegrass%2Ficarus/lists"}