https://github.com/bird-dancer/host-from-git-repo
push your code in a git repo and it will be deployed inside of a nginx server block
https://github.com/bird-dancer/host-from-git-repo
automation deployment git hosting nginx
Last synced: about 2 months ago
JSON representation
push your code in a git repo and it will be deployed inside of a nginx server block
- Host: GitHub
- URL: https://github.com/bird-dancer/host-from-git-repo
- Owner: bird-dancer
- License: mit
- Created: 2020-06-11T14:38:33.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-22T14:21:52.000Z (about 4 years ago)
- Last Synced: 2023-12-09T16:27:09.456Z (over 1 year ago)
- Topics: automation, deployment, git, hosting, nginx
- Language: Shell
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# host-from-git-repo
Push your code in a git repo and it will be deployed inside of a nginx server block
## how to use it:
>- create a new user if required
- execute shell script as super user or owner of the `/var/www` directory
- answer the questions
- add the remote repository `host-address:/var/www/reponame/reponame.git` on your machine## how it works:
The pushed code will be put inside the `/var/www/.../content` because of the hook-file `post-receive`The relevant part of the folder structure loks like:
www
└── test
├── content
│ └── [possible backend files]
│ └── html
│ └── index.html
└── test.git
├── hooks
│ ├── post-receive
(The repository name in this case is test)The nginx file inside of `sites-available` has `/var/www/test/content/html` as the root paramenter.