Skip to content
README.md 1.48 KiB
Newer Older
## IndieHosters

Pierre Ozoux's avatar
Pierre Ozoux committed
This repository contains the configuration and scripts we use to control our servers.
It can run inside Vagrant or
[deploy to a server](doc/getting-started-as-a-hoster.md) (FIXME: update those instructions to
prescribe less folder structure, explain static https+smtp hosting, and check if they currently
work).

Michiel de Jong's avatar
Michiel de Jong committed
## Prerequisites to running this code with Vagrant:
pierreozoux's avatar
pierreozoux committed
- [vagrant](http://www.vagrantup.com/)
- [virtualbox](https://www.virtualbox.org/)
Michiel de Jong's avatar
Michiel de Jong committed
- nfs
Pierre Ozoux's avatar
Pierre Ozoux committed
  - linux: run `apt-get install nfs-kernel-server`, or your OS equivalent
- [vagrant-hostsupdater](https://github.com/cogitatio/vagrant-hostsupdater)
  - run `vagrant plugin install vagrant-hostsupdater` to install
pierreozoux's avatar
pierreozoux committed

## Get started:

```bash
vagrant up
```

Michiel de Jong's avatar
Michiel de Jong committed
Wait for the provisioning to finish (~40mins), and go to your browser: https://indiehosters.dev
Pierre Ozoux's avatar
Pierre Ozoux committed

Michiel de Jong's avatar
Michiel de Jong committed
If the process fails, for instance due to network problems, you can retry by running `vagrant provision`.
Michiel de Jong's avatar
Michiel de Jong committed
### Set up a domain:
Michiel de Jong's avatar
Michiel de Jong committed

```bash
Michiel de Jong's avatar
Michiel de Jong committed
vagrant ssh core-1
Pierre Ozoux's avatar
Pierre Ozoux committed
sudo mkdir -p /data/import/example.dev/TLS
sudo cp /data/indiehosters/scripts/unsecure-certs/example.dev.pem /data/import/example.dev/TLS
sudo systemctl start static@example.dev
Michiel de Jong's avatar
Michiel de Jong committed
sudo systemctl restart haproxy-confd
Michiel de Jong's avatar
Michiel de Jong committed
```
Pierre Ozoux's avatar
Pierre Ozoux committed

Michiel de Jong's avatar
Michiel de Jong committed
Check https://example.dev in your bowser!

### Cleaning up

To clean up stuff from previous runs of your VM, you can do:
pierreozoux's avatar
pierreozoux committed

```bash
Pierre Ozoux's avatar
Pierre Ozoux committed
vagrant destroy
vagrant up
pierreozoux's avatar
pierreozoux committed
```
Pierre Ozoux's avatar
Pierre Ozoux committed

## Tests

```bash
vagrant destroy
vagrant up
Michiel de Jong's avatar
Michiel de Jong committed
# Check in your browser https://example.dev
vagrant ssh core-1
Pierre Ozoux's avatar
Pierre Ozoux committed
sudo su
Michiel de Jong's avatar
Michiel de Jong committed
/data/indiehosters/tests/main.sh
Pierre Ozoux's avatar
Pierre Ozoux committed
```