{"id":18406784,"url":"https://github.com/agentcoop/webmaster","last_synced_at":"2025-04-12T20:53:40.723Z","repository":{"id":144020877,"uuid":"149729110","full_name":"AgentCoop/webmaster","owner":"AgentCoop","description":"Bash scripts for Web application deployment using Docker containers","archived":false,"fork":false,"pushed_at":"2021-06-01T17:52:50.000Z","size":198,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T20:53:38.307Z","etag":null,"topics":[],"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/AgentCoop.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}},"created_at":"2018-09-21T07:49:39.000Z","updated_at":"2019-04-09T06:04:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"fce17617-47a8-499c-9d63-72172c4ffa95","html_url":"https://github.com/AgentCoop/webmaster","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/AgentCoop%2Fwebmaster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgentCoop%2Fwebmaster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgentCoop%2Fwebmaster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgentCoop%2Fwebmaster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AgentCoop","download_url":"https://codeload.github.com/AgentCoop/webmaster/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631724,"owners_count":21136560,"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-06T03:10:48.188Z","updated_at":"2025-04-12T20:53:40.703Z","avatar_url":"https://github.com/AgentCoop.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ch1\u003eRemember, coder, Git is not a deployment tool!\u003c/h1\u003e\n    \u003cimg width=\"100%\" height=\"480px\" src=\"https://raw.githubusercontent.com/AgentCoop/webmaster/master/docs/banner.jpg\" /\u003e\n\u003c/p\u003e\n\n## Overview\nWebmaster tools is an old school way to deploy your code to production using Docker containers and Bash scripts. The demo below will show you how to deploy a Laravel application in few commands.\n\nFirst, create a test application:\n```bash\n$ mkdir myapp \u0026\u0026 cd myapp \u0026\u0026 touch .gitignore \u0026\u0026 git init \u0026\u0026 git add . \u0026\u0026 git commit -m 'First commit'\n$ git clone -b 'v0.0.2' --single-branch --depth 1 https://github.com/AgentCoop/webmaster.git\n$ composer create-project --prefer-dist laravel/laravel webmaster/sandbox/apps/laravel/app\n```\n\nNow add SSH credentials for your remote host(s) to *./webmaster/sandbox/recipes/hosts/prod/laravel-app.txt*, the credentials must have the following format: user@ip_address ssh-key, where ssh-key is a SSH private key in ~/.ssh directory. Specify domain name for your host(s) in *./webmaster/sandbox/recipes/laravel-app.sh*.\n\n1. Build required Docker images\n```bash\n./webmaster/deploy/build.sh -r laravel-app -i php-fpm --rdir ./webmaster/sandbox/recipes/\n./webmaster/deploy/build.sh -r laravel-app -i nginx --rdir ./webmaster/sandbox/recipes/\n```\n\n2. Deploy the images to production server\n```bash\n./webmaster/deploy/sync-images.sh --recipe laravel-app -i php-fpm --rdir ./webmaster/sandbox/recipes/\n./webmaster/deploy/sync-images.sh --recipe laravel-app -i nginx --rdir ./webmaster/sandbox/recipes/\n```\n\n3. Build your app and deploy the code:\n```bash\n./webmaster/deploy/run.sh -r laravel-app --rdir ./webmaster/sandbox/recipes/\n```\nOpen https://whateveryourdomain.com in the browser. That's it. In less than 10 minutes you will have your Laravel app ready for production use.\n\n1, 2 items are not something you will often do. Most likely, you will modify your application runtime environment from time to time. That's when you need to re-build and reload your Docker images.\n\n## Installation\nIn the root directory of your application run the following commands:\n```bash\n$ git clone -b 'v0.0.2' --single-branch --depth 1 https://github.com/AgentCoop/webmaster.git\n$ mkdir -p webmaster-recipes/hosts/{staging,prod}\n```\n\n*webmaster-recipes* is the default directory for the recipes. Do not forget to add it to your Git repository.\n\n## Prerequisites\nRemote host with Docker Engine installed.\n\n## Deployment\nEvery time you want to deploy your code, switch to either staging or master branch. Everything on staging branch is being deployed to your staging server(s), everything on master - to production one(s), this is quite obvious behavior.\n\nA recipe is nothing else than a Bash script containing instruction for deployment.\n\nA typical recipe looks like:\n```bash\n#!/usr/bin/env bash\n\nset -e\n\nBASE_DIR=./webmaster/sandbox/apps/laravel\nDOCKER_DIR=\"$BASE_DIR/docker\"\nSOURCE_DIR=\"$BASE_DIR/app\"\nDOMAIN_NAMES=\"laravel-app.webmaster.asamuilik.info\"\n\nbeforeRun() {\n    echo 'before'\n}\n\nafterRun() {\n    echo 'after'\n}\n\nrecipe() {\n    echo 'Do some work'\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentcoop%2Fwebmaster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagentcoop%2Fwebmaster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentcoop%2Fwebmaster/lists"}