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
* adds automation script for user provisionning
......
......@@ -2,6 +2,8 @@
[![Backers on Open Collective](https://opencollective.com/libresh/backers/badge.svg)](#backers)
[![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
A PaaS that is aimed at hosting free software \o/
......@@ -52,13 +54,12 @@ All of this is hosted by libre.sh :)
Here is a list of modules supported:
- https proxy:
- [HAProxy](https://github.com/indiehosters/haproxy)
- [Nginx](https://github.com/indiehosters/nginx)
- [HAProxy](https://github.com/indiehosters/haproxy)
- [Nginx](https://github.com/indiehosters/nginx)
- [logs](https://github.com/indiehosters/logs)
- [monitoring](https://github.com/indiehosters/monitoring)
- [git-puller](https://github.com/indiehosters/git-puller)
- [backups](https://github.com/indiehosters/backups)
- [sshd](https://github.com/indiehosters/sshd)
- [backups](https://github.com/indiehosters/borg-server)
Go to their respective page for more details.
......
......@@ -16,7 +16,7 @@ EnvironmentFile=-/data/domains/%i/env
Environment=HOSTNAME=%H
WorkingDirectory=/data/domains/%i/
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
[Install]
......
......@@ -29,7 +29,7 @@ function configure_dns () {
&Address4=v=spf1%20include:${mail_hostname}\
&Hostname5=_dmarc\
&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\
&RecordType6=TXT\
&Address6=${domain_key}\
......
......@@ -41,11 +41,7 @@ case "$1" in
journalctl -fu $(systemctl_param)
fi;;
ps|exec|logs)
if [ -f ./env ]; then
env $(cat ./env | xargs) docker-compose $1 ${@:2}
else
docker-compose $1 ${@:2}
fi;;
docker-compose $1 ${@:2};;
update)
if [ "$(pwd)" == "/libre.sh" ]; then
git pull
......@@ -56,6 +52,10 @@ case "$1" in
docker-compose pull
docker-compose build
/opt/bin/libre restart
if [ -f ./scripts/post-update ]; then
sleep 10
./scripts/post-update
fi
fi;;
provision)
provision ${@:2};;
......@@ -64,7 +64,8 @@ case "$1" in
*)
echo "Usage:"
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 " - update: to update the current folder."
echo " - stats: show docker stats with names."
echo " - stats: show docker stats with names.";;
esac
......@@ -107,6 +107,8 @@ function application () {
cd /data/domains/${arg_u}
if [ -f ./scripts/install ]; then
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
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."
......