Skip to content
Commits on Source (16)
# 1.0.0
* libre command
* post-update scripts
* SUBNET support (allow more than 32 applications per server)
* usage of .env file
# 0.3.0 # 0.3.0
* adds automation script for user provisionning * adds automation script for user provisionning
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
[![Backers on Open Collective](https://opencollective.com/libresh/backers/badge.svg)](#backers) [![Backers on Open Collective](https://opencollective.com/libresh/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/libresh/sponsors/badge.svg)](#sponsors) [![Sponsors on Open Collective](https://opencollective.com/libresh/sponsors/badge.svg)](#sponsors)
/!\ This is version 1, based on docker-compose and version 2, based on kubernetes is at http://libre.sh
## Introduction ## Introduction
A PaaS that is aimed at hosting free software \o/ A PaaS that is aimed at hosting free software \o/
...@@ -52,13 +54,12 @@ All of this is hosted by libre.sh :) ...@@ -52,13 +54,12 @@ All of this is hosted by libre.sh :)
Here is a list of modules supported: Here is a list of modules supported:
- https proxy: - https proxy:
- [HAProxy](https://github.com/indiehosters/haproxy) - [HAProxy](https://github.com/indiehosters/haproxy)
- [Nginx](https://github.com/indiehosters/nginx) - [Nginx](https://github.com/indiehosters/nginx)
- [logs](https://github.com/indiehosters/logs) - [logs](https://github.com/indiehosters/logs)
- [monitoring](https://github.com/indiehosters/monitoring) - [monitoring](https://github.com/indiehosters/monitoring)
- [git-puller](https://github.com/indiehosters/git-puller) - [git-puller](https://github.com/indiehosters/git-puller)
- [backups](https://github.com/indiehosters/backups) - [backups](https://github.com/indiehosters/borg-server)
- [sshd](https://github.com/indiehosters/sshd)
Go to their respective page for more details. Go to their respective page for more details.
......
...@@ -16,7 +16,7 @@ EnvironmentFile=-/data/domains/%i/env ...@@ -16,7 +16,7 @@ EnvironmentFile=-/data/domains/%i/env
Environment=HOSTNAME=%H Environment=HOSTNAME=%H
WorkingDirectory=/data/domains/%i/ WorkingDirectory=/data/domains/%i/
ExecStartPre=-/opt/bin/docker-compose rm -f ExecStartPre=-/opt/bin/docker-compose rm -f
ExecStart=/bin/bash -euxc "VIRTUAL_HOST=%i,www.%i /opt/bin/docker-compose up" ExecStart=/bin/bash -euxc "VIRTUAL_HOST=%i /opt/bin/docker-compose up"
ExecStop=/opt/bin/docker-compose stop ExecStop=/opt/bin/docker-compose stop
[Install] [Install]
......
...@@ -29,7 +29,7 @@ function configure_dns () { ...@@ -29,7 +29,7 @@ function configure_dns () {
&Address4=v=spf1%20include:${mail_hostname}\ &Address4=v=spf1%20include:${mail_hostname}\
&Hostname5=_dmarc\ &Hostname5=_dmarc\
&RecordType5=TXT\ &RecordType5=TXT\
&Address5=v=DMARC1;%20p=none;%20rua=mailto:support@indie.host\ &Address5=v=DMARC1;%20p=none;%20rua=mailto:dmarc@indie.host\
&HostName6=mail._domainkey\ &HostName6=mail._domainkey\
&RecordType6=TXT\ &RecordType6=TXT\
&Address6=${domain_key}\ &Address6=${domain_key}\
......
...@@ -41,11 +41,7 @@ case "$1" in ...@@ -41,11 +41,7 @@ case "$1" in
journalctl -fu $(systemctl_param) journalctl -fu $(systemctl_param)
fi;; fi;;
ps|exec|logs) ps|exec|logs)
if [ -f ./env ]; then docker-compose $1 ${@:2};;
env $(cat ./env | xargs) docker-compose $1 ${@:2}
else
docker-compose $1 ${@:2}
fi;;
update) update)
if [ "$(pwd)" == "/libre.sh" ]; then if [ "$(pwd)" == "/libre.sh" ]; then
git pull git pull
...@@ -56,6 +52,10 @@ case "$1" in ...@@ -56,6 +52,10 @@ case "$1" in
docker-compose pull docker-compose pull
docker-compose build docker-compose build
/opt/bin/libre restart /opt/bin/libre restart
if [ -f ./scripts/post-update ]; then
sleep 10
./scripts/post-update
fi
fi;; fi;;
provision) provision)
provision ${@:2};; provision ${@:2};;
...@@ -64,7 +64,8 @@ case "$1" in ...@@ -64,7 +64,8 @@ case "$1" in
*) *)
echo "Usage:" echo "Usage:"
echo " - start|status|enable|disable|restart|stop: command sent to systemctl." echo " - start|status|enable|disable|restart|stop: command sent to systemctl."
echo " - journal: show the journal of unit-file."
echo " - ps|exec|logs: command sent to docker compose." echo " - ps|exec|logs: command sent to docker compose."
echo " - update: to update the current folder." echo " - update: to update the current folder."
echo " - stats: show docker stats with names." echo " - stats: show docker stats with names.";;
esac esac
...@@ -107,6 +107,8 @@ function application () { ...@@ -107,6 +107,8 @@ function application () {
cd /data/domains/${arg_u} cd /data/domains/${arg_u}
if [ -f ./scripts/install ]; then if [ -f ./scripts/install ]; then
export URL=${arg_u} export URL=${arg_u}
CURRENT_SUBNET=$(for folder in `ls /data/domains`; do if [ -f /data/domains/$folder/.env ];then cat /data/domains/$folder/.env; fi | grep SUBNET | cut -d"=" -f2; done | sort -g | tail -n1)
export SUBNET=$(($CURRENT_SUBNET +1))
if [ -z ${MAIL_DOMAIN:-} ]; then if [ -z ${MAIL_DOMAIN:-} ]; then
warning "you have no email server setup, we'll print a random configuration in your application. Make sure to check the parameters for your app to send proper emails." warning "you have no email server setup, we'll print a random configuration in your application. Make sure to check the parameters for your app to send proper emails."
warning "To stop having this warning, please configure your libre.sh to be abble to create email accounts." warning "To stop having this warning, please configure your libre.sh to be abble to create email accounts."
......