{"id":20408489,"url":"https://github.com/prhost/ssh-deploy","last_synced_at":"2025-08-28T12:23:36.784Z","repository":{"id":72286547,"uuid":"126096049","full_name":"prhost/ssh-deploy","owner":"prhost","description":"Docker image para copiar arquivos (rsync) e executar comandos remotamente (SSH)","archived":false,"fork":false,"pushed_at":"2022-12-16T14:33:42.000Z","size":29,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T15:56:54.820Z","etag":null,"topics":["deploy","docker","gitlab-ci","rsync","ssh"],"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/prhost.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":"2018-03-20T23:31:07.000Z","updated_at":"2022-04-27T21:34:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"ffdaaf3d-99ec-4a19-9feb-8e0fadf35e42","html_url":"https://github.com/prhost/ssh-deploy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/prhost/ssh-deploy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prhost%2Fssh-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prhost%2Fssh-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prhost%2Fssh-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prhost%2Fssh-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prhost","download_url":"https://codeload.github.com/prhost/ssh-deploy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prhost%2Fssh-deploy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272498354,"owners_count":24944820,"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-08-28T02:00:10.768Z","response_time":74,"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":["deploy","docker","gitlab-ci","rsync","ssh"],"created_at":"2024-11-15T05:32:44.295Z","updated_at":"2025-08-28T12:23:36.772Z","avatar_url":"https://github.com/prhost.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker image para copiar arquivos (rsync) e executar comandos remotamente (SSH)\n\n## Exemplo de uso no Gitlab CI\n\n```yaml\nUpload files:\n  image: \"prhost/ssh-deploy\"\n  variables:\n    HOST: \"servidor.com.br\" # host ou ip do servidor\n    IP: \"111.111.111.111\" # ip do servidor\n    SSHKEY_PRIVATE: $SSH_PRIVATE_KEY # texto da chave privada. Recomendado usar variables do Gitlab\n    USER_HOST: \"root\" # usuario do ssh\n    PUBLIC_DIRECTORY: \"/var/www/html\" # pasta inicial onde o ssh vai se conectar\n    SOURCE_DIR: $CI_PROJECT_DIR # pasta do projeto no gitlab\n    IGNORE_FILES: \".env.example .git/ .gitignore\" # Define quais arquivos gostaria de ignorar no upload\n    DELETE: \"true\" # Se true, vai sobrescrever os arquivos e pastas existentes, se false vai mesclar com os arquivos e pastas\n    FILES: \"index.php .htaccess app/ vendor/\" # Arquivos e pastas que devem ser copiadas\n  script:\n    - ssh-deploy\n\nExecute remote command:\n  image: prhost/ssh-deploy\n  variables:\n    HOST: \"servidor.com.br\" # host ou ip do servidor\n    IP: \"111.111.111.111\" # ip do servidor\n    SSHKEY_PRIVATE: $SSH_PRIVATE_KEY # texto da chave privada. Recomendado usar variables do Gitlab\n    USER_HOST: \"root\" # usuario do ssh\n    SOURCE_DIR: $CI_PROJECT_DIR # pasta do projeto no gitlab\n    EXEC_SCRIPT: \"ls -la\"\n  script:\n    - ssh-exec\n```\n\n***O comando `ssh-deploy` necessita de RSYNC do lado do servidor remoto.***\n***Também existe o comando `scp-deploy` que pode ser usado no lugar do `ssh-deploy`. É usado mais quando não se tem RSYNC e não pode ser instalado (no caso de hospedagens compartilhadas).***\n\n### Pacotes usados\n\n* https://github.com/Gruppio/Echolor\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprhost%2Fssh-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprhost%2Fssh-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprhost%2Fssh-deploy/lists"}