{"id":21124495,"url":"https://github.com/zauberware/ssh-deploy","last_synced_at":"2025-03-14T11:25:35.788Z","repository":{"id":48706123,"uuid":"385654217","full_name":"zauberware/ssh-deploy","owner":"zauberware","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-27T14:18:09.000Z","size":139,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-21T18:46:45.924Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/zauberware.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":"2021-07-13T15:37:39.000Z","updated_at":"2021-07-15T14:15:11.000Z","dependencies_parsed_at":"2023-01-23T10:00:10.564Z","dependency_job_id":null,"html_url":"https://github.com/zauberware/ssh-deploy","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/zauberware%2Fssh-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zauberware%2Fssh-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zauberware%2Fssh-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zauberware%2Fssh-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zauberware","download_url":"https://codeload.github.com/zauberware/ssh-deploy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243567194,"owners_count":20311998,"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":[],"created_at":"2024-11-20T04:16:44.718Z","updated_at":"2025-03-14T11:25:35.762Z","avatar_url":"https://github.com/zauberware.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ssh-deploy\n\n### Table of Contents\n\n- [Install](#install)\n- [Create vhosts](#create-vhosts)\n- [Env](#.env)\n  - [Sample](#sample)\n  - [Options](#env-options)\n- [package.json scripts](#package.json-scripts)\n\n## Install\n\n```\nnpm i @zauberware/ssh-deploy --save\n```\n\n## Create vhosts\n\nnginx minimum config for default .env\n\n**storybook**\n\n```\nserver {\n    listen 80;\n    server_name storybook.example.com;\n\n    # Tell Nginx your app's 'public' directory is\n    root /home/exampleuser/storybook/current;\n}\n```\n\n**staging**\n\n```\nserver {\n    listen 80;\n    server_name staging.example.com;\n\n    # Tell Nginx your app's 'public' directory is\n    root /home/exampleuser/staging/current;\n}\n```\n\n**production**\n\n```\nserver {\n    listen 80;\n    server_name production.example.com;\n\n    # Tell Nginx your app's 'public' directory is\n    root /home/exampleuser/production/current;\n}\n```\n\n## .env\n\nConfigure and put these env variables to your .env file.\nOr use the gui for the basic configuration\n\n```\nENV_MODE=init npm explore @zauberware/ssh-deploy -- npm run sshDeploy --env=$PWD\n```\n\n### Sample\n\n```\nDEFAULT_USERNAME=exampleuser\nDEFAULT_PASSWORD=supersecretpassword\nDEFAULT_HOST=example.com\nDEFAULT_PORT=22\n\nDEFAULT_HOST_BASEPATH=~/\nDEFAULT_HOST_LOGFOLDER=releases/\n\nLOCAL_STORYBOOK_FOLDER=storybook-static/\nLOCAL_APPFOLDER=build/\n```\n\n### Options\n\nOverview of possible .env key=value options\n\n#### local folders\n\n| Key                    |   Defaultvalue    | Description                                            |\n| :--------------------- | :---------------: | ------------------------------------------------------ |\n| LOCAL_STORYBOOK_FOLDER | storybook-static/ | folder where the storybook build on your machine lives |\n| LOCAL_APPFOLDER        |      build/       | folder where the build on your machine lives           |\n\n#### connection\n\n| Key                    | Defaultvalue | Description                                                                                            |\n| ---------------------- | :----------: | ------------------------------------------------------------------------------------------------------ |\n| DEFAULT_USERNAME       |     ---      | user for ssh connection                                                                                |\n| DEFAULT_PASSWORD       |     ---      | password for ssh connection                                                                            |\n| DEFAULT_HOST           |     ---      | hostaddress or name for ssh connection                                                                 |\n| DEFAULT_PORT           |     ---      | port for ssh connection                                                                                |\n| DEFAULT_HOST_BASEPATH  |      ~/      | basepath where the subfolders for deployment live (default subfolders: production, staging, storybook) |\n| DEFAULT_HOST_LOGFOLDER |  releases/   | relative path to logfile savelocation                                                                  |\n\n#### optional options for storybook\n\n| Key                       | Defaultvalue | Description                                                |\n| :------------------------ | :----------: | ---------------------------------------------------------- |\n| STORYBOOK_USERNAME        |     ---      |                                                            |\n| STORYBOOK_PASSWORD        |     ---      |                                                            |\n| STORYBOOK_HOST            |     ---      |                                                            |\n| STORYBOOK_PORT            |     ---      |                                                            |\n| STORYBOOK_HOST_BASEPATH   |      ~/      |                                                            |\n| STORYBOOK_HOST_DEPLOYPATH |  storybook/  |                                                            |\n| STORYBOOK_HOST_LOGFOLDER  |  releases/   | relative path to logfile savelocation for storybook deploy |\n\n#### optional options for staging\n\n| Key                     | Defaultvalue | Description |\n| :---------------------- | :----------: | ----------- |\n| STAGING_USERNAME        |     ---      |             |\n| STAGING_PASSWORD        |     ---      |             |\n| STAGING_HOST            |     ---      |             |\n| STAGING_PORT            |     ---      |             |\n| STAGING_HOST_BASEPATH   |      ~/      |             |\n| STAGING_HOST_DEPLOYPATH |   staging/   |             |\n| STAGING_HOST_LOGFOLDER  |  releases/   |             |\n\n#### optional options for production\n\n| Key                        | Defaultvalue | Description |\n| :------------------------- | :----------: | ----------- |\n| PRODUCTION_USERNAME        |     ---      |             |\n| PRODUCTION_PASSWORD        |     ---      |             |\n| PRODUCTION_HOST            |     ---      |             |\n| PRODUCTION_PORT            |     ---      |             |\n| PRODUCTION_HOST_BASEPATH   |      ~/      |             |\n| PRODUCTION_HOST_DEPLOYPATH |  production  |             |\n| PRODUCTION_HOST_LOGFOLDER  |  releases/   |             |\n\n## package.json scripts\n\nPut these scripts into your root package.json\n\n```\n\"deploy\": \"ENV_MODE=deploy npm explore @zauberware/ssh-deploy -- npm run sshDeploy --env=$PWD\",\n\"rollback\": \"ENV_MODE=rollback npm explore @zauberware/ssh-deploy -- npm run sshDeploy --env=$PWD\",\n\"sshDeploy\": \"npm explore @zauberware/ssh-deploy -- npm run sshDeploy --env=$PWD\",\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzauberware%2Fssh-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzauberware%2Fssh-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzauberware%2Fssh-deploy/lists"}