{"id":21072436,"url":"https://github.com/binarymist/deploymenttool","last_synced_at":"2025-10-07T22:55:20.082Z","repository":{"id":36003181,"uuid":"40296019","full_name":"binarymist/DeploymentTool","owner":"binarymist","description":":truck: VPS Deployment Tool","archived":false,"fork":false,"pushed_at":"2016-09-25T00:33:49.000Z","size":226,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-20T22:12:31.698Z","etag":null,"topics":["deployment","devops"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/binarymist.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}},"created_at":"2015-08-06T09:17:39.000Z","updated_at":"2023-04-14T17:59:13.000Z","dependencies_parsed_at":"2022-08-26T23:10:46.010Z","dependency_job_id":null,"html_url":"https://github.com/binarymist/DeploymentTool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarymist%2FDeploymentTool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarymist%2FDeploymentTool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarymist%2FDeploymentTool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarymist%2FDeploymentTool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binarymist","download_url":"https://codeload.github.com/binarymist/DeploymentTool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243515569,"owners_count":20303258,"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":["deployment","devops"],"created_at":"2024-11-19T18:56:34.276Z","updated_at":"2025-10-07T22:55:15.009Z","avatar_url":"https://github.com/binarymist.png","language":"Shell","readme":"[![BinaryMist Limited](Banner.png)](http://binarymist.io/)\n\n# Licence\n\nThis project is licensed under the `BSD 3-clause “New” or “Revised” License`. For more information please see the licence file\n\n# Usage\n\nFirst rename the `package-deploy.cfg-template` to `package-deploy.cfg` and open the file to make some environmental modifications.  \nThe following variables can be set before runtime or during the running of the script at menu prompt:\n\n    targetServerUser=\"\u003cThe user you use to login to the server you want to host from\u003e\"\n    targetServer=\"\u003cThe server you want to host from\u003e\"\n    sshPort=\"\u003cSelf explanatory\u003e\"\n\nThe following variables may need to be set before the script is run if they don't suite your needs as is, as there are no prompts for these currently:\n\n    sourceDeployment=\"\u003c/End directory that holds the source you want deployed\u003e\"\n    deploymentSourceDir=\"$homeDir/Source/$sourceDeployment\"\n    readonly yearMonthDateHourMin=$(date '+%Y-%m-%d-%H-%M')\n    readonly logFile=\"/mnt/HDD/Logs/package-deploy-$yearMonthDateHourMin.log\"\n    readonly publicWebHostingDir=\"/var/www\"\n    readonly projectHostingDir=\"\u003cdirectory within $publicWebHostingDir usually\u003e\"\n    readonly projectHostingUser=\"\u003cowner of $projectHostingDir and files within\u003e\"\n    readonly initUnitFile=\"\u003csystemd unit name\u003e.service\"\n\n\n\n\n`package-deploy` is the main script which drives the menu and the work that gets executed on the machine you want to deploy your code from.  \nWhen you're first starting out, what I do when I run the `Remote host work` option is to comment out the remote functions within the file `remoteWork` that I don't wnat to run.\nI.E. I just run each in order, starting with the first like this:\n\n    create_rollback_of_project_hosting_dir\n    #clear_out_target_hosting_directory\n    #extract_remoteTaredDeployment_files_to_remoteProjectHostingDir\n    #update_file_ownership_and_perms_of_files_in_remoteProjectHostingDir\n    #restart_webapp\n\nWhen you're making changes to the `remoteWork` file. You don't need to restart the main script each time you execute the \"Remote host work\" main menu option, as the `remoteWork` script is directed to a shell command on the local side, then used as a SSH argument each time we SSH (\"Remote host work\") to the target deployment server.\nThe function that does this is `remote_host_work`. Bear in mind that each time you restart the main script, the date fields are repopulated, so new deployment files will be created. this is not usually what you want to happen, unless you actually want to repackage another source deployment.\n\n## sudoers\n\nAdd all commands in the `remoteWork` file that are prefixed with `sudo` to the `/etc/sudoers` file, other wise they will fail. Be specific about these commands, otherwise you are giving the script more privileges than it needs.\n\nI usually like to add the sudo commands seperated by a `,` to a `Cmnd_Alias`. If you have any trouble constructing your `/etc/sudoers` file, check the [man page](https://linux.die.net/man/5/sudoers), if you are still struggling, submit an issue and I will help you with it.\n\nIf anythings not clear please submit a bug. \n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarymist%2Fdeploymenttool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinarymist%2Fdeploymenttool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarymist%2Fdeploymenttool/lists"}