reify READMEs into documentation
This commit is contained in:
parent
af5b048b05
commit
dc50db57f6
14 changed files with 440 additions and 31 deletions
|
@ -1 +1,23 @@
|
|||
# compose.libre.sh
|
||||
# `libre.sh` *Compose Edition*
|
||||
|
||||
[![Backers on Open Collective](https://opencollective.com/libresh/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/libresh/sponsors/badge.svg)](#sponsors)
|
||||
|
||||
> An ecosystem to ease free software hosting \o/
|
||||
|
||||
## What is `libre.sh`?
|
||||
|
||||
[`libre.sh`](https://libre.sh/), Compose Edition, is a little framework to host Docker Compose in systemd. It is simple, modular and puts convention over configuration.
|
||||
|
||||
This is aimed at hosters to manage a large amount of web applications and a quantity of domain names.
|
||||
|
||||
It is currently installed at three different hosters in production.
|
||||
|
||||
When installed, use it to:
|
||||
|
||||
- buy a domain name
|
||||
- configure DNS
|
||||
- configure email (with dkim, dmarc, autoconfig)
|
||||
- install and start a web application on that domain (WordPress, Nextcloud, Matomo...)
|
||||
- provision a TLS certificate on that domain
|
||||
|
||||
Amazing, right?
|
||||
|
|
15
content/about.md
Normal file
15
content/about.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# About
|
||||
|
||||
[libre.sh](https://libre.sh/) is an ecosystem of libre hosting platforms for community infrastructure.
|
||||
|
||||
## Other projects
|
||||
|
||||
Simplifying web application hosting has always been a goal for a lot of other projects, here is some project that share goals with libre.sh
|
||||
|
||||
- Yunohost https://yunohost.org
|
||||
- Sandstorm https://sandstorm.io/
|
||||
- Cloudron https://git.cloudron.io/cloudron/box
|
46
content/contributing.md
Normal file
46
content/contributing.md
Normal file
|
@ -0,0 +1,46 @@
|
|||
---
|
||||
title: 'Contributing'
|
||||
weight: 90
|
||||
---
|
||||
|
||||
# Contributing
|
||||
|
||||
If you have any issue (something not working, missing doc), please do report an issue here! Thanks
|
||||
|
||||
This system is used in production at [IndieHosters](https://indiehosters.net/) so it is maintained. If you use it, please tell us, and we'll be really happy to update this README!
|
||||
|
||||
You can help us by:
|
||||
- starring this project
|
||||
- sending us a thanks email
|
||||
- reporting bugs
|
||||
- writing documentation/blog on how you got up and running in 5mins
|
||||
- writing more documentation
|
||||
- sending us cake :) We loove cake!
|
||||
|
||||
## Contributors
|
||||
|
||||
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
|
||||
<a href="https://github.com/indiehosters/libre.sh/graphs/contributors"><img src="https://opencollective.com/libresh/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
|
||||
## Backers
|
||||
|
||||
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/libresh#backer)]
|
||||
|
||||
<a href="https://opencollective.com/libresh#backers" target="_blank"><img src="https://opencollective.com/libresh/backers.svg?width=890"></a>
|
||||
|
||||
|
||||
## Sponsors
|
||||
|
||||
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/libresh#sponsor)]
|
||||
|
||||
<a href="https://opencollective.com/libresh/sponsor/0/website" target="_blank"><img src="https://opencollective.com/libresh/sponsor/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/libresh/sponsor/1/website" target="_blank"><img src="https://opencollective.com/libresh/sponsor/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/libresh/sponsor/2/website" target="_blank"><img src="https://opencollective.com/libresh/sponsor/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/libresh/sponsor/3/website" target="_blank"><img src="https://opencollective.com/libresh/sponsor/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/libresh/sponsor/4/website" target="_blank"><img src="https://opencollective.com/libresh/sponsor/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/libresh/sponsor/5/website" target="_blank"><img src="https://opencollective.com/libresh/sponsor/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/libresh/sponsor/6/website" target="_blank"><img src="https://opencollective.com/libresh/sponsor/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/libresh/sponsor/7/website" target="_blank"><img src="https://opencollective.com/libresh/sponsor/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/libresh/sponsor/8/website" target="_blank"><img src="https://opencollective.com/libresh/sponsor/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/libresh/sponsor/9/website" target="_blank"><img src="https://opencollective.com/libresh/sponsor/9/avatar.svg"></a>
|
|
@ -1,10 +0,0 @@
|
|||
---
|
||||
title: "Applications"
|
||||
weight: 1
|
||||
# bookFlatSection: false
|
||||
# bookToc: true
|
||||
# bookHidden: false
|
||||
# bookCollapseSection: false
|
||||
# bookComments: false
|
||||
# bookSearchExclude: false
|
||||
---
|
|
@ -1,10 +0,0 @@
|
|||
---
|
||||
title: "Installation"
|
||||
weight: 1
|
||||
# bookFlatSection: false
|
||||
# bookToc: true
|
||||
# bookHidden: false
|
||||
# bookCollapseSection: false
|
||||
# bookComments: false
|
||||
# bookSearchExclude: false
|
||||
---
|
|
@ -1,10 +0,0 @@
|
|||
---
|
||||
title: "System Modules"
|
||||
weight: 1
|
||||
# bookFlatSection: false
|
||||
# bookToc: true
|
||||
# bookHidden: false
|
||||
# bookCollapseSection: false
|
||||
# bookComments: false
|
||||
# bookSearchExclude: false
|
||||
---
|
22
content/installation/_index.md
Normal file
22
content/installation/_index.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
title: "Installation"
|
||||
weight: 10
|
||||
# bookFlatSection: false
|
||||
# bookToc: true
|
||||
# bookHidden: false
|
||||
# bookCollapseSection: false
|
||||
# bookComments: false
|
||||
# bookSearchExclude: false
|
||||
---
|
||||
|
||||
# Installation
|
||||
|
||||
To install it, follow the instructions for one of these options:
|
||||
|
||||
- [Cloud](./cloud)
|
||||
- [Hetzner](./hetzner)
|
||||
- [Linux](./linux)
|
||||
|
||||
Alternatively, you can run our installer script:
|
||||
|
||||
wget https://lab.libreho.st/libre.sh/compose.libre.sh/raw/master/install.linux.sh -O - | bash
|
37
content/installation/cloud.md
Normal file
37
content/installation/cloud.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# Instructions to install libre.sh
|
||||
|
||||
Recommendation
|
||||
|
||||
- you'd need API key on Namecheap (if you want to automatically buy and configure domain name)
|
||||
|
||||
## Installation
|
||||
|
||||
These instructions depend a bit on your cloud provider.
|
||||
|
||||
### [Digital Ocean](https://m.do.co/c/1b468ce0671f)
|
||||
|
||||
1. Install [doctl](https://github.com/digitalocean/doctl/)
|
||||
2. Issue the following command:
|
||||
|
||||
```
|
||||
doctl compute droplet create libre.sh --user-data-file ./user_data --wait --ssh-keys $KEY_ID --size 1gb --region lon1 --image coreos-stable
|
||||
```
|
||||
|
||||
### Provider with user_data support
|
||||
|
||||
If you use a cloud provider that support `user_data`, like [Scaleway](http://scaleway.com/), just use [this user_data](https://raw.githubusercontent.com/indiehosters/libre.sh/master/user_data).
|
||||
|
||||
### Hetzner
|
||||
|
||||
You can also buy a baremetal at [Hetzner](https://serverboerse.de/index.php?country=EN) as they are the cheapest options around. Follow these [instructions](hetzner) in this case.
|
||||
|
||||
### Provider without user_data support
|
||||
|
||||
Use boot a live cd, and issue that command:
|
||||
|
||||
```
|
||||
wget https://raw.github.com/coreos/init/master/bin/coreos-install
|
||||
bash coreos-install -d /dev/sda -c user_data
|
||||
```
|
||||
|
||||
And voila, your first libre.sh node is ready!
|
77
content/installation/hetzner.md
Normal file
77
content/installation/hetzner.md
Normal file
|
@ -0,0 +1,77 @@
|
|||
# Instructions to install libre.sh
|
||||
|
||||
Recommendation
|
||||
|
||||
- ssd on /dev/sda
|
||||
- hdd on /dev/sdb
|
||||
- hdd on /dev/sdc
|
||||
- API key on Namecheap (if you want to automatically buy domain name)
|
||||
|
||||
## Installation
|
||||
|
||||
First, you need a server.
|
||||
We recommend [Hetzner](https://serverboerse.de/index.php?country=EN) as they are the cheapest options around.
|
||||
You can filter servers with ssd.
|
||||
|
||||
These instructions can also work on any VM/VPS/Hardware.
|
||||
|
||||
### The system
|
||||
|
||||
```
|
||||
IP=
|
||||
|
||||
ssh -o "StrictHostKeyChecking no" root@$IP
|
||||
|
||||
hostname=
|
||||
ssh_public_key=""
|
||||
|
||||
fdisk -l #find your ssd
|
||||
|
||||
# Setup raid
|
||||
cat > /etc/mdadm.conf << EOF
|
||||
MAILADDR dev@null.org
|
||||
EOF
|
||||
mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sdb /dev/sdc
|
||||
mkfs.ext4 /dev/md0
|
||||
|
||||
cat > cloud-config.tmp << EOF
|
||||
#cloud-config
|
||||
|
||||
hostname: "$hostname"
|
||||
ssh_authorized_keys:
|
||||
- $ssh_public_key
|
||||
EOF
|
||||
|
||||
apt-get install gawk
|
||||
wget https://raw.github.com/coreos/init/master/bin/coreos-install
|
||||
bash coreos-install -d /dev/sda -c cloud-config.tmp
|
||||
|
||||
reboot
|
||||
```
|
||||
|
||||
```
|
||||
ssh core@$IP
|
||||
|
||||
#configure mdmonitor.
|
||||
|
||||
sudo su -
|
||||
|
||||
mdadm --examine --scan > /etc/mdadm.conf
|
||||
vim /etc/mdadm.conf
|
||||
#ADD your mail
|
||||
MAILADDR xxx@xxx.org
|
||||
|
||||
# Start service
|
||||
systemctl start mdmonitor.service
|
||||
|
||||
cat > /etc/systemd/system/data.mount << EOF
|
||||
[Mount]
|
||||
What=/dev/md0
|
||||
Where=/data
|
||||
Type=ext4
|
||||
EOF
|
||||
|
||||
wget https://raw.githubusercontent.com/indiehosters/libre.sh/master/user_data -O /var/lib/coreos-install/user_data
|
||||
|
||||
coreos-cloudinit /var/lib/coreos-install/user_data
|
||||
```
|
112
content/installation/linux.md
Normal file
112
content/installation/linux.md
Normal file
|
@ -0,0 +1,112 @@
|
|||
# Instructions to install libre.sh on linux with Systemd
|
||||
|
||||
Recommendation
|
||||
|
||||
- Systemd distro (ubuntu server 18.04.3 or debian 9 )
|
||||
|
||||
## Installation
|
||||
Where basicly reproduce what the user_data do for us.
|
||||
|
||||
as root
|
||||
|
||||
### configure sshd (Optional)
|
||||
Don't forget to create the user core and adding your ssh key before
|
||||
You could also remove AllowUsers core or/and change the username.
|
||||
|
||||
```
|
||||
cat > /etc/ssh/sshd_config <<EOF
|
||||
UsePrivilegeSeparation sandbox
|
||||
Subsystem sftp internal-sftp
|
||||
PermitRootLogin no
|
||||
AllowUsers core
|
||||
PasswordAuthentication no
|
||||
ChallengeResponseAuthentication no
|
||||
EOF
|
||||
chmod 600 /etc/ssh/sshd_config
|
||||
systemctl restart sshd
|
||||
```
|
||||
|
||||
### add kernel parameter (optional but recommended )
|
||||
|
||||
```
|
||||
cat > /etc/sysctl.d/libresh.conf <<EOF
|
||||
fs.aio-max-nr=1048576
|
||||
vm.max_map_count=262144
|
||||
vm.overcommit_memory=1
|
||||
EOF
|
||||
chmod 644 /etc/sysctl.d/libresh.conf
|
||||
sysctl -p /etc/sysctl.d/libresh.conf
|
||||
|
||||
echo never > /sys/kernel/mm/transparent_hugepage/enabled
|
||||
```
|
||||
|
||||
### define Localhost (should not be needed but... )
|
||||
|
||||
```
|
||||
cat > /etc/hosts <<EOF
|
||||
127.0.0.1 localhost
|
||||
255.255.255.255 broadcasthost
|
||||
::1 localhost
|
||||
EOF
|
||||
```
|
||||
|
||||
### define envrionment
|
||||
|
||||
```
|
||||
cat > /etc/environment <<EOF
|
||||
NAMECHEAP_URL="namecheap.com"
|
||||
NAMECHEAP_API_USER="pierreo"
|
||||
NAMECHEAP_API_KEY=
|
||||
IP="curl -s http://icanhazip.com/"
|
||||
FirstName="Pierre"
|
||||
LastName="Ozoux"
|
||||
Address=""
|
||||
PostalCode=""
|
||||
Country="Portugal"
|
||||
Phone="+351.967184553"
|
||||
EmailAddress="pierre@ozoux.net"
|
||||
City="Lisbon"
|
||||
CountryCode="PT"
|
||||
BACKUP_DESTINATION=root@xxxxx:port
|
||||
MAIL_USER=
|
||||
MAIL_PASS=
|
||||
MAIL_HOST=mail.indie.host
|
||||
MAIL_PORT=587
|
||||
EOF
|
||||
```
|
||||
|
||||
### docker
|
||||
|
||||
*Current tested version : 19.03.5 see https://docs.docker.com/install/linux/docker-ce/ubuntu/ .*
|
||||
|
||||
### docker-compose
|
||||
|
||||
*Remark I did a variante to find the last version of DockerCompose and download it*
|
||||
|
||||
```
|
||||
mkdir -p /opt/bin &&\
|
||||
dockerComposeVersion=$(curl -s https://api.github.com/repos/docker/compose/releases/latest|grep tag_name|cut -d'"' -f4) &&\
|
||||
curl -L https://github.com/docker/compose/releases/download/$dockerComposeVersion/docker-compose-`uname -s`-`uname -m` > /opt/bin/docker-compose &&\
|
||||
chmod +x /opt/bin/docker-compose
|
||||
```
|
||||
### Libre.sh
|
||||
|
||||
```
|
||||
git clone https://lab.libreho.st/libre.sh/compose.libre.sh /libre.sh &&\
|
||||
mkdir -p /{data,system} &&\
|
||||
mkdir -p /data/trash &&\
|
||||
cp /libre.sh/unit-files/* /etc/systemd/system && systemctl daemon-reload &&\
|
||||
systemctl enable web-net.service &&\
|
||||
systemctl start web-net.service &&\
|
||||
mkdir -p /opt/bin &&\
|
||||
cp /libre.sh/utils/* /opt/bin/
|
||||
```
|
||||
|
||||
### add path
|
||||
|
||||
```
|
||||
cat > /etc/profile.d/libre.sh <<EOF
|
||||
export PATH=$PATH:/opt/bin
|
||||
EOF
|
||||
chmod 644 /etc/profile.d/libre.sh
|
||||
```
|
18
content/modules/_index.md
Normal file
18
content/modules/_index.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
weight: 40
|
||||
---
|
||||
|
||||
## Modules
|
||||
|
||||
The PaaS is really modular, that's why it contains the strict necessary, then you'll probably want to add [`system`](./system) modules or [`applications`](./applications).
|
||||
|
||||
There are 2 [unit-files](https://lab.libreho.st/libre.sh/compose.libre.sh/tree/master/unit-files) to manage system modules and applications.
|
||||
|
||||
### Debugging
|
||||
|
||||
```
|
||||
libre ps
|
||||
libre logs -f --tail=100
|
||||
libre stop
|
||||
libre restart
|
||||
```
|
42
content/modules/applications.md
Normal file
42
content/modules/applications.md
Normal file
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
title: "Applications"
|
||||
weight: 40
|
||||
# bookFlatSection: false
|
||||
# bookToc: true
|
||||
# bookHidden: false
|
||||
# bookCollapseSection: false
|
||||
# bookComments: false
|
||||
# bookSearchExclude: false
|
||||
---
|
||||
|
||||
## Applications
|
||||
|
||||
### List of supported applications
|
||||
|
||||
| Application | Latest Version | Comments |
|
||||
|--------------|---------------------------|------------|
|
||||
| wordpress | 5.9 | Includes the support of SMTP email though libresh variables |
|
||||
| dolibarr | 15.0.3 | need manual deletion of the install.lock to upgrade |
|
||||
|
||||
Find more at [lab.libreho.st/libre.sh/compose/](https://lab.libreho.st/libre.sh/compose/)
|
||||
|
||||
### Provisioning
|
||||
|
||||
To provision the application `wordpress` on `example.org`, first make point example.org to your server IP, and then, just run:
|
||||
|
||||
```
|
||||
libre provision -a wordpress -u example.org -s
|
||||
```
|
||||
|
||||
Command line arguments:
|
||||
|
||||
Argument | Value | Description
|
||||
--- | --- | ---
|
||||
-u | [arg] | URL to process. Required.
|
||||
-a | [arg] | Application to install. (wordpress in REPO_MODE)
|
||||
-t | [arg] | Checkout a specific tag or branch from the application repo. default to master
|
||||
-e | [arg] | Specify the email of the application admin
|
||||
-s | | Start the application right away.
|
||||
-b | | Buys the associated domain name.
|
||||
-i | | Configure OpenDKIM.
|
||||
-c | | Configures DNS if possible.
|
31
content/modules/system.md
Normal file
31
content/modules/system.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
title: "System"
|
||||
weight: 30
|
||||
# bookFlatSection: false
|
||||
# bookToc: true
|
||||
# bookHidden: false
|
||||
# bookCollapseSection: false
|
||||
# bookComments: false
|
||||
# bookSearchExclude: false
|
||||
---
|
||||
|
||||
## System modules
|
||||
|
||||
Here is a list of modules supported:
|
||||
- https proxy:
|
||||
- [HAProxy](https://lab.libreho.st/libre.sh/compose/haproxy)
|
||||
- [Nginx](https://lab.libreho.st/libre.sh/compose/nginx)
|
||||
- [monitoring](https://lab.libreho.st/libre.sh/compose/monitoring)
|
||||
- [git-puller](https://lab.libreho.st/libre.sh/compose/git-puller)
|
||||
|
||||
Go to their page for details.
|
||||
|
||||
### To install and start a module
|
||||
|
||||
```
|
||||
cd /system/
|
||||
git clone https://lab.libreho.st/libre.sh/compose/[module]
|
||||
cd module
|
||||
libre enable
|
||||
libre start
|
||||
```
|
17
content/support.md
Normal file
17
content/support.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
title: 'Support'
|
||||
weight: 99
|
||||
date: 2024-09-24T19:10:51+02:00
|
||||
---
|
||||
|
||||
# Support
|
||||
|
||||
You can use the following channels to request community support:
|
||||
- [mailinglist/forum](https://forum.indie.host/t/about-the-libre-sh-category/71)
|
||||
- [chat](https://chat.indie.host/channel/libre.sh)
|
||||
|
||||
For paid support, just send an inquiry to support@libre.sh.
|
||||
|
||||
You can also watch the Fosdem Video : [Video Fosdem](https://fosdem.org/2017/schedule/event/libre_sh/)
|
||||
|
||||
All of this is hosted by libre.sh :)
|
Loading…
Reference in a new issue