Slight changes & refactors for README's (#448)

./README.md
- Added clear link to vagrant README
- Added headers

./vagrant/README.md
- Added syntax highlighting
- Added cd & relative clones in installation
- Fixed typo (requirements 2. virtualbox)
- Merged some code blocks

Reviewed-on: #448
Reviewed-by: meaz <meaz@no-reply@disroot.org>
Co-authored-by: Sprite <compromisedneopetspassword@proton.me>
Co-committed-by: Sprite <compromisedneopetspassword@proton.me>
This commit is contained in:
Sprite 2023-10-23 13:48:27 +00:00 committed by meaz
parent a89ac4b9ea
commit e0485b707c
2 changed files with 32 additions and 47 deletions

View File

@ -1 +1,7 @@
https://disroot.org - site. (need to add licence)
# Disroot.org
https://disroot.org - site
For instructions on cloning & running locally, see [vagrant/README.md](vagrant/README.md)
## License
(need to add licence)

View File

@ -7,83 +7,62 @@ If you prefer the easy way, just execute the vagrant.sh script provided. Make su
## requirements
1. vagrant 2.2.17
for install on Debian run commands:
```
```bash
wget https://releases.hashicorp.com/vagrant/2.2.17/vagrant_2.2.17_x86_64.deb
```
```
sudo dpkg -i vagrant_2.2.17_x86_64.deb
```
```
sudo apt install -f
```
2. virtuabox
2. virtualbox
for install on Debian Buster run command:
```
```bash
sudo echo 'deb http://download.virtualbox.org/virtualbox/debian buster contrib' > /etc/apt/sources.list.d/virtualbox.list
```
```
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
```
```
sudo apt-get update ; sudo apt-get install virtualbox-6.1
```
3. vagrant plugins vagrant-vbguest:
for install on Debian run commands:
```
```bash
vagrant plugin install vagrant-vbguest
```
4. git
```
```bash
sudo apt install git
```
## Installation
1. Create a Disroot folder, in which you'll clone six repositories:
```
```bash
mkdir ~/Disroot
```
2. Clone disroot-website repo to Disroot folder
```
git clone https://git.disroot.org/Disroot/Website.git ~/Disroot/Website
```
3. Clone grav-theme-disroot repo to Disroot folder
```
git clone https://git.disroot.org/Disroot/grav-theme-disroot.git ~/Disroot/grav-theme-disroot
```
4. Clone grav-theme-disrootblog repo to Disroot folder
```
git clone https://git.disroot.org/Disroot/grav-theme-disrootblog.git ~/Disroot/grav-theme-disrootblog
```
5. Clone grav-plugin-language-selector repo to Disroot folder
```
git clone https://git.disroot.org/Disroot/grav-plugin-language-selector.git ~/Disroot/grav-plugin-language-selector
```
6. Clone Disroot-Privacy-Policy repo to Disroot folder
```
git clone https://git.disroot.org/Disroot/Disroot-Privacy-Policy.git ~/Disroot/Disroot-Privacy-Policy
```
7. Clone Disroot Changelog repo to Disroot folder
```
git clone https://git.disroot.org/Disroot/CHANGELOG.git ~/Disroot/Disroot-Changelog
```
8. Add the local domain name for the hub to your host machine's `/etc/hosts` file.
2. Clone the repositories
```bash
cd ~/Disroot
git clone https://git.disroot.org/Disroot/Website.git Website
git clone https://git.disroot.org/Disroot/grav-theme-disroot.git grav-theme-disroot
git clone https://git.disroot.org/Disroot/grav-theme-disrootblog.git grav-theme-disrootblog
git clone https://git.disroot.org/Disroot/grav-plugin-language-selector.git grav-plugin-language-selector
git clone https://git.disroot.org/Disroot/Disroot-Privacy-Policy.git Disroot-Privacy-Policy
git clone https://git.disroot.org/Disroot/CHANGELOG.git Disroot-Changelog
git clone https://git.disroot.org/Disroot/Disroot-ToS.git Disroot-ToS
```
3. Add the local domain name for the hub to your host machine's `/etc/hosts` file.
```bash
sudo echo "192.168.33.12 disroot.lan" >> /etc/hosts
```
9. Launch Vagrant to build the virtual machine (VM). This will take several minutes.
```
4. Launch Vagrant to build the virtual machine (VM). This will take several minutes.
```bash
cd ~/Disroot/Website/vagrant
vagrant up disroot_lan
```
Congratulations, you should now have a fully functioning apache+GRAV server running locally in a Virtualbox-hosted VM managed by Vagrant. Next time you want to run vagrant simply run command
```
```bash
cd ~/Disroot/Website/vagrant
vagrant up disroot_lan
vagrant provision
@ -94,17 +73,17 @@ Congratulations, you should now have a fully functioning apache+GRAV server runn
To make your development workflow more efficient, you may wish to use an SSH connection to rapidly synchronize the files you are developing in your local (host machine) development environment.
1. On your host machine, copy your public key.
```
```bash
user@host:~$ cat ~/.ssh/id_rsa.public
ssh-rsa eLX1UQbJHUCHf2V3K7YlMP0YmIT+50rlEsWre1eobApKb0Ac/WbvssX/Gh/ user@host
```
2. Use `vagrant ssh disroot_lan` to log in to the virtual machine.
```
```bash
user@host:~$ cd ~/Disroot/Website/vagrant
user@host:hubzilla-vagrant$ vagrant ssh disroot_lan
```
3. Switch to root and add your host user public key.
```
```bash
vagrant@stretch:~$ sudo -i
root@jessie:~# ssh-keygen
Generating public/private rsa key pair.
@ -131,6 +110,6 @@ To make your development workflow more efficient, you may wish to use an SSH con
root@stretch:~# echo "ssh-rsa eLX1UQbJHUCHf2V3K7YlMP0YmIT+50rlEsWre1eobApKb0Ac/WbvssX/Gh/ user@host" >> ~/.ssh/authorized_keys
```
4. From your host machine, you may now SSH into the virtual machine using
```
```bash
ssh root@disroot.lan
```