{"id":43270593,"url":"https://github.com/treeder/operator","last_synced_at":"2026-02-01T15:41:33.828Z","repository":{"id":57525263,"uuid":"63087794","full_name":"treeder/operator","owner":"treeder","description":null,"archived":false,"fork":false,"pushed_at":"2017-10-04T16:21:54.000Z","size":56,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T16:31:56.139Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/treeder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-11T17:24:53.000Z","updated_at":"2016-11-21T21:29:46.000Z","dependencies_parsed_at":"2022-09-19T11:41:11.555Z","dependency_job_id":null,"html_url":"https://github.com/treeder/operator","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/treeder/operator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treeder%2Foperator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treeder%2Foperator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treeder%2Foperator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treeder%2Foperator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/treeder","download_url":"https://codeload.github.com/treeder/operator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treeder%2Foperator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28981456,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T15:35:50.179Z","status":"ssl_error","status_checked_at":"2026-02-01T15:35:38.075Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2026-02-01T15:41:33.094Z","updated_at":"2026-02-01T15:41:33.823Z","avatar_url":"https://github.com/treeder.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Operator\n\n![Operator](https://tctechcrunch2011.files.wordpress.com/2015/04/matrix-operator.jpg)\n\n## Configuration\n\nCreate a file called `.env`, copy and paste the following into it and fill in the blanks. \n\n```sh\n# For private images on DockerHub:\nDOCKER_USERNAME=A\nDOCKER_PASSWORD=B\n\n# For deployment to EC2\nAWS_ACCESS_KEY=X\nAWS_SECRET_KEY=Y\nAWS_KEY_PAIR=X # name of keypair\nAWS_PRIVATE_KEY= # For your private key, wrap it with double quotes and replace all the new lines with `\\n` values so they can go in one line, including one at the very end, eg: \"...uNQgmDXEbU\\n-----END RSA PRIVATE KEY-----\\n\". Docker's --env-file does not work with multi-line values. \nAWS_SUBNET_ID=X\nAWS_SECURITY_GROUP=X\n        \n# For streaming logs to a syslog service, if set, logspout will be installed too:\nSYSLOG_URL=logs.papertrail.com:1234\n```\n\n## Commands:\n\n### Deploy\n\nDeploy your image to a new server, or if it's already on a server, it will just update\n\n```\ndocker run --rm -it --env-file .env treeder/operator --name myapp -e X=Y IMAGE\n```\n\n### List instances\n\n```\ndocker run --rm -it --env-file .env treeder/operator --name myapp instances\n```\n\n### Scale out\n\n**TODO:** \n\nAdd servers to an app cluster\n\n```sh\ndocker run --rm -it --env-file .env treeder/operator deploy --add --name someapp -e X=Y IMAGE\n```\n\n### Run SSH command on all instances of an app\n\nRun an SSH command across all instances of an app\n\n```sh\ndocker run --rm -it --env-file .env treeder/operator sh --name myapp 'some ssh command'\n# examples:\ndocker run --rm -it --env-file .env treeder/operator sh --name myapp 'docker ps'\ndocker run --rm -it --env-file .env treeder/operator sh --name functions 'docker logs myapp'\n```\n\nThe server will be tagged with app name for redeploying. \n\nTODO: add servers to a load balancer, choose instance size, maybe a yaml file?\nTODO: how to set instance type\nTODO: Add logspout if SYSLOG_URL specified\n\n```yml\nimage: treeder/hello-sinatra\nenv_vars: Can put env vars in here?  But probably shouldn't have them in source control anyways\nload_balancer: NAME\ninstance_type: x.large\ndns: some cloudflare info here?  keys in env vars\nmonitoring: logspout, etc\n```\n\n## Utility containers\n\n### Base64 Google Cloud credentials for use in .env files \n\n```sh\ndocker run --rm -v $PWD:/envs -w /envs treeder/operator:google-creds-flatten google-creds.json \u003e creds.tmp\n```\n\nThen take the output in creds.tmp and put into your .env file. \n\n### Convert .env files into -e params when you don't want to deal with moving around .env files\n\neg: \n\n```sh\ndocker run --rm $(docker run --rm -v $PWD:/envs -w /envs treeder/operator:env-to-args .env) -p 8080:8080 IMAGE\n```\n\nFor PowerShell and bash, see [here](helpers/env-to-args). \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreeder%2Foperator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftreeder%2Foperator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreeder%2Foperator/lists"}