{"id":34837024,"url":"https://github.com/modelingevolution/autoupdater-compose","last_synced_at":"2026-05-25T15:02:34.586Z","repository":{"id":303614998,"uuid":"1015992149","full_name":"modelingevolution/autoupdater-compose","owner":"modelingevolution","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-26T22:31:30.000Z","size":157,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-29T13:47:45.285Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/modelingevolution.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-08T10:28:03.000Z","updated_at":"2025-11-26T22:29:59.000Z","dependencies_parsed_at":"2025-07-08T14:48:30.526Z","dependency_job_id":"093aece1-b4d6-4b5e-99bd-ce851cd6dc02","html_url":"https://github.com/modelingevolution/autoupdater-compose","commit_stats":null,"previous_names":["modelingevolution/autoupdater-compose"],"tags_count":43,"template":false,"template_full_name":null,"purl":"pkg:github/modelingevolution/autoupdater-compose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelingevolution%2Fautoupdater-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelingevolution%2Fautoupdater-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelingevolution%2Fautoupdater-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelingevolution%2Fautoupdater-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modelingevolution","download_url":"https://codeload.github.com/modelingevolution/autoupdater-compose/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelingevolution%2Fautoupdater-compose/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28032370,"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-12-25T02:00:05.988Z","response_time":58,"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":[],"created_at":"2025-12-25T16:06:48.659Z","updated_at":"2025-12-25T16:08:18.848Z","avatar_url":"https://github.com/modelingevolution.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AutoUpdater Production Deployment\n\nProduction deployment configuration for [ModelingEvolution.AutoUpdater](https://github.com/modelingevolution/autoupdater).\n\n\u003e **Quick Install**: See [INSTALL.md](INSTALL.md) for a simplified installation guide.\n\n## Quick Start\n\n### Automated Installation (Recommended)\n\nUse the installation script for a complete setup:\n\n```bash\n# Download and run the installation script\nwget https://raw.githubusercontent.com/modelingevolution/autoupdater-compose/master/install.sh\nchmod +x install.sh\n\n# Run with your application details\nsudo ./install.sh \u003capp-name\u003e \u003cgit-compose-url\u003e \u003ccomputer-name\u003e [docker-auth] [docker-registry-url]\n\n# Example for RocketWelder:\nsudo ./install.sh rocket-welder https://github.com/modelingevolution/rocketwelder-compose.git RESRV-AI\n```\n\nThe script will:\n1. Install Docker and Docker Compose (if not present)\n2. Install VPN (OpenVPN for Ubuntu 20.04, WireGuard for Ubuntu 22.04+)\n3. Create the `deploy` user and add it to the docker group\n4. Set up the directory structure at `/var/docker/configuration/`\n5. Generate SSH keys for secure communication\n6. Configure the autoupdater to manage both itself and your application\n7. Start the autoupdater container\n\n### Manual Installation\n\nIf you prefer manual setup:\n\n1. **Create deploy user:**\n   ```bash\n   sudo useradd -m -s /bin/bash deploy\n   sudo usermod -aG docker deploy\n   ```\n\n2. **Create directory structure:**\n   ```bash\n   sudo mkdir -p /var/docker/configuration/autoupdater/.ssh\n   sudo mkdir -p /var/docker/configuration/repositories\n   sudo chown -R deploy:deploy /var/docker/configuration\n   ```\n\n3. **Generate SSH keys:**\n   ```bash\n   sudo -u deploy ssh-keygen -t rsa -b 4096 -f /var/docker/configuration/autoupdater/.ssh/id_rsa -N \"\"\n   ```\n\n4. **Create configuration files:**\n   - Copy `docker-compose.yml` to `/var/docker/configuration/autoupdater/`\n   - Copy and customize `appsettings.Production.json`\n   - Create `.env` file with your settings\n\n5. **Start the autoupdater:**\n   ```bash\n   cd /var/docker/configuration/autoupdater\n   sudo -u deploy docker-compose up -d\n   ```\n\n\u003e **Note**: For manual installation, you'll need to install Docker, Docker Compose, and VPN separately. The automated script handles all prerequisites.\n\n## Configuration Structure\n\n### StdPackages vs Packages\n\nThe configuration separates packages into two categories:\n\n- **StdPackages**: System-critical packages including the autoupdater itself\n  - The autoupdater monitors its own repository here\n  \n- **Packages**: Application packages managed by the autoupdater\n  - Your applications (like RocketWelder) go here\n  - Updated after StdPackages are up-to-date\n\n### AutoUpdater Version\n\nThe current stable version used in the installation script is **1.0.32**, which includes:\n- Proper SSH host configuration for secure deployments\n- Fixed health endpoint at `/health` (not `/api/health`)\n- Automatic application deployment triggering after AutoUpdater becomes healthy\n- Improved Azure Container Registry (ACR) repository-scoped token authentication\n\n### Example Configuration\n\n```json\n{\n  \"StdPackages\": [\n    {\n      \"RepositoryLocation\": \"/data/autoupdater\",\n      \"RepositoryUrl\": \"https://github.com/modelingevolution/autoupdater-compose.git\",\n      \"DockerComposeDirectory\": \"./\"\n    }\n  ],\n  \"Packages\": [\n    {\n      \"RepositoryLocation\": \"/data/rocket-welder\",\n      \"RepositoryUrl\": \"https://github.com/modelingevolution/rocket-welder-compose.git\",\n      \"DockerComposeDirectory\": \"./\"\n    }\n  ]\n}\n```\n\n## Installation Script Parameters\n\nThe installation script accepts three required parameters and two optional parameters:\n\n### Required Parameters\n\n| Parameter | Description | Example |\n|-----------|-------------|---------|\n| `app-name` | Name of your application (used in repository paths) | `rocket-welder` |\n| `git-compose-url` | Git repository URL for your application's compose configuration | `https://github.com/modelingevolution/rocketwelder-compose.git` |\n| `computer-name` | Unique identifier for this deployment/computer | `RESRV-AI` |\n\n### Optional Parameters\n\n| Parameter | Description | Example |\n|-----------|-------------|---------|\n| `docker-auth` | Docker registry Personal Access Token (PAT) for private registries | `ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` |\n| `docker-registry-url` | Docker registry URL (without trailing slash) | `ghcr.io/myorg` |\n\n### Usage Syntax\n\n```bash\n# Basic usage (public registries only)\nsudo ./install.sh [--json] \u003capp-name\u003e \u003cgit-compose-url\u003e \u003ccomputer-name\u003e\n\n# With Docker authentication (for private registries)\nsudo ./install.sh [--json] \u003capp-name\u003e \u003cgit-compose-url\u003e \u003ccomputer-name\u003e [docker-auth] [docker-registry-url]\n```\n\n### Example Usage\n\n```bash\n# For RocketWelder on RESRV-AI (public registry)\nsudo ./install.sh rocket-welder https://github.com/modelingevolution/rocketwelder-compose.git RESRV-AI\n\n# For a private registry with authentication\nsudo ./install.sh rocket-welder https://github.com/modelingevolution/rocketwelder-compose.git RESRV-AI ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ghcr.io/modelingevolution\n\n# With JSON output for automation\nsudo ./install.sh --json my-app https://github.com/myorg/my-app-compose.git PROD-001\n```\n\n### Docker Registry Authentication\n\nWhen `docker-auth` and `docker-registry-url` are provided:\n\n1. **Docker Login**: The script automatically logs into the specified Docker registry using the provided PAT\n2. **Configuration Update**: The registry URL and authentication are added to the application configuration\n3. **Image Access**: Enables pulling private Docker images from authenticated registries like GitHub Container Registry (GHCR)\n\n**Security Note**: The Docker authentication token is used only for login and stored in the configuration for the AutoUpdater to access private registries. Ensure your PAT has only the necessary permissions (typically `read:packages`).\n\n## Directory Structure\n\nAfter installation, the following structure is created:\n\n```\n/var/docker/configuration/\n├── autoupdater/ (GIT VERSIONED)\n│   ├── docker-compose.yml           # Git compose file\n│   ├── appsettings.Production.json  # Git configuration\n│   └── .env                         # Environment variables (exploded from GIT with gitignore)\n└── \u003capp-name\u003e/                      # Your application repository (maps to /data/\u003capp-name\u003e)\n/var/docker/data/ (NO GIT)\n├── autoupdater/app\n│   ├── appsettings.override.json    # Autoupdater computer specific configuration for this installation\n│   └── .ssh/                        # SSH keys \n│       ├── id_rsa                   # Private key (auto-generated)\n│       └── id_rsa.pub               # Public key\n└── \u003capp-name\u003e/\u003ccontainer-name\u003e      # Your app specific data folder for this installation for a container defined within compose\n    └── appsettings.override.json    # Additional configuration specific for this installation.\n/var/data (NO GIT)                   # If present, second partition for user-data that would be used by containers. Use-case ? Recording for RocketWelder\n├── \u003capp-name\u003e/\u003ccontainer-name\u003e      # For example rocketwelder/app\n│   └── \u003cspecific folder defined in docker-compose from the app\u003e\n```\n\n**Important**: All Git repositories must be owned by `root:root` for the container to perform Git operations successfully.\n\n### Key Paths\n\n- **Configuration Base**: `/var/docker/configuration/`\n- **AutoUpdater Config**: `/var/docker/configuration/autoupdater/`\n- **SSH Keys**: `/var/docker/data/autoupdater/.ssh/`\n- **Repositories**: `/var/docker/configuration/`\n\n## Security Considerations\n\n1. **SSH Keys**: \n   - Store SSH private keys securely\n   - Use passphrase-protected keys for additional security\n   - Limit SSH key permissions to deployment operations only\n\n2. **Docker Socket**: \n   - The autoupdater requires access to Docker socket\n   - Ensure proper host security measures are in place\n\n3. **Network Security**:\n   - Use HTTPS for all Git repository URLs\n   - Configure firewall rules appropriately\n   - Consider using VPN for SSH connections\n\n## Monitoring\n\n- Access the web UI at: http://localhost:8080\n- Check logs: `docker-compose logs -f`\n- Monitor update status via the API endpoints\n\n## Troubleshooting\n\n### Health Check Issues\n\nIf the installation gets stuck during health checks:\n\n```bash\n# Test health endpoint directly\ncurl http://localhost:8080/health\n\n# Check autoupdater.sh health command\n./autoupdater.sh health\n\n# Common issue: Wrong health endpoint\n# The health endpoint is at /health, not /api/health\n# This was fixed in version 1.0.32\n```\n\n### SSH Connection Issues\n```bash\n# Test SSH connectivity\ndocker-compose exec autoupdater ssh -i /data/ssh/id_rsa deploy@172.17.0.1 echo \"Connected\"\n\n# Check SSH key permissions\ndocker-compose exec autoupdater ls -la /data/ssh/\n```\n\n### Repository Access Issues\n```bash\n# Verify repository clone\ndocker-compose exec autoupdater ls -la /data/\n\n# Check Git connectivity\ndocker-compose exec autoupdater git ls-remote https://github.com/modelingevolution/autoupdater-compose.git\n\n# Fix Git ownership issues (if repositories show \"dubious ownership\" errors)\nsudo chown -R root:root /var/docker/configuration/autoupdater\nsudo chown -R root:root /var/docker/configuration/rocket-welder\n\n# Test Git operations from inside container\ndocker exec autoupdater bash -c \"cd /data/autoupdater \u0026\u0026 git pull\"\n```\n\n## Updates\n\nThe autoupdater will automatically update itself when new versions are tagged in this repository. To trigger a manual update:\n\n1. Tag a new version in this repository\n2. The autoupdater will detect and apply the update within its polling interval\n\n### Version Management\n\nFor development and maintenance, use the `update-version.sh` utility:\n\n```bash\n# Check for latest AutoUpdater version on Docker Hub\n./update-version.sh\n\n# This script will:\n# 1. Query Docker Hub for the latest version\n# 2. Update all relevant files with the new version\n# 3. Regenerate checksums for dependent scripts\n```\n\nThe script automatically updates:\n- `install.template` (template for generated install.sh)\n- `install-updater.sh` (AutoUpdater installation script)\n- `checksums.txt` (SHA256 checksums for script verification)\n\n## License\n\nMIT License - See the main [autoupdater repository](https://github.com/modelingevolution/autoupdater) for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodelingevolution%2Fautoupdater-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodelingevolution%2Fautoupdater-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodelingevolution%2Fautoupdater-compose/lists"}