Commit 508c4106 authored by Guilhem Saurel's avatar Guilhem Saurel

fix documentations & docker-compose files to use proxyta.net

parent 3cf320e9
# Nextcloud
https://nextcloud.com/
## Configure
```
echo MYSQL_ROOT_PASSWORD=$(openssl rand -base64 32) >> .env
echo MYSQL_PASSWORD=$(openssl rand -base64 32) >> .env
echo MYSQL_DATABASE=nextcloud >> .env
echo MYSQL_USER=nextcloud >> .env
echo MYSQL_HOST=db >> .env
```
## Deploy
```
docker-compose up -d
```
version: '3'
networks:
traefik:
proxytanet:
external: true
services:
db:
image: mariadb
restart: always
environment:
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
env_file:
- .env
volumes:
- ${CHATONS_ROOT_DIR:-/srv/chatons}/nextcloud/db:/var/lib/mysql
app:
image: nextcloud
image: nextcloud:fpm-alpine
restart: always
environment:
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_HOST=db:3306
env_file:
- .env
labels:
traefik.enable: "true"
traefik.backend: "nextcloud"
traefik.frontend.rule: "Host: cloud.${CHATONS_DOMAIN:-local}, www.cloud.${CHATONS_DOMAIN:-local}"
traefik.docker.network: "traefik"
traefik.docker.network: "proxytanet"
networks:
- traefik
- proxytanet
- default
volumes:
- ${CHATONS_ROOT_DIR:-/srv/chatons}/nextcloud/app:/var/www/html
# Oxyta.net's Homepage
https://oxyta.net/
## Deploy
```
docker-compose up -d
```
version: '3'
networks:
traefik:
proxytanet:
external: true
services:
......@@ -13,4 +13,4 @@ services:
traefik.backend: "homepage"
traefik.frontend.rule: "Host: ${CHATONS_DOMAIN:-local}, www.${CHATONS_DOMAIN:-local}"
networks:
- traefik
- proxytanet
# Matrix
:warning: This is a work in progress, and not production ready :warning:
## Install
# Deploy your kittens
## Install docker & docker-compose
```
# Install docker
# See https://docs.docker.com/engine/installation/linux/docker-ce/debian/#install-using-the-repository
apt install \
apt install -y \
apt-transport-https \
ca-certificates \
curl \
......@@ -12,13 +12,10 @@ apt install \
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | apt-key add -
echo \
"deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
$(lsb_release -cs) \
stable" \
> /etc/apt/sources.list.d/docker.list
echo "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
$(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list
apt update && apt install docker-ce msmtp python3-pip
apt update && apt install -y docker-ce python3-pip
# install docker-compose
pip3 install docker-compose
......@@ -26,43 +23,47 @@ pip3 install docker-compose
# Start docker
systemctl start docker
systemctl enable docker
```
# Add keys
## Add the ssh keys of the team
```
cd
git clone https://framagit.org/altermediatic/keys.git
cd .ssh
rm -f authorized_keys
ln -s ../keys/ssh authorized_keys
```
# Add this repo
## Add this repo
```
cd
git clone https://framagit.org/altermediatic/docker-atelier.git
cd docker-atelier
```
# Configure environment variables in setup.sh then run it
cp setup.sh.dist setup.sh
vim setup.sh
./setup.sh
## Deploy the proxy
```
docker network create proxytanet
```
And then
- [dev](proxy/dev/)
- [prod with letsencrypt](proxy/prod-le/) (look at the README first)
- [prod with your certificates](proxy/prod-ssl/) (look at the README first)
# Deploy traefik
docker network create traefik
cd traefik
docker-compose up -d
cd ..
## Configure your domain name and email addresses
# Deploy the services you want
for service in pad cloud homepage
do
pushd $service
docker-compose up -d
popd
done
```
echo "export CHATONS_DOMAIN=oxyta.net" >> .bashrc
echo "export ACME_EMAIL=acme@${CHATONS_DOMAIN}" >> .bashrc
. .bashrc
```
## Configure mail
## Deploy the services you want
[doc](mail)
- [nextcloud](cloud/)
- [etherpad](pad/)
- [homepage](homepage/)
## Update homepage
## Configure mail
docker-compose build --no-cache
[doc](mail)
# Install msmtp
```
apt install -y msmtp
```
# Configure
`/etc/msmtprc`:
......
# Etherpad
http://etherpad.org/
## Configure
```
export MYSQL_ROOT_PASSWORD=$(openssl rand -base64 32)
echo MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD >> .env
echo ETHERPAD_DB_PASSWORD=$MYSQL_ROOT_PASSWORD >> .env
```
## Deploy
```
docker-compose up -d
```
version: '3'
networks:
traefik:
proxytanet:
external: true
services:
......@@ -25,9 +25,9 @@ services:
traefik.enable: "true"
traefik.backend: "etherpad"
traefik.frontend.rule: "Host: pad.${CHATONS_DOMAIN:-local}, www.pad.${CHATONS_DOMAIN:-local}"
traefik.docker.network: "traefik"
traefik.docker.network: "proxytanet"
networks:
- default
- traefik
- proxytanet
volumes:
- ${CHATONS_ROOT_DIR:-/srv/chatons}/etherpad/app:/opt/etherpad-lite/var
Subproject commit 46e827eed99f7fcb38f17d08605e9667834db4b9
Subproject commit 03574beba38b1fc81cad759148c601ca4836ed41
#!/bin/sh
[ -f .env ] && echo "JUST DONT" && exit 1
## You can (should) customize those variables
# the docker-compose project name
export CHATONS_COMPOSE_PROJECT=oxyta
# the host directory for the containers' volumes
export CHATONS_ROOT_DIR=./srv
# the domain name for all services
export CHATONS_DOMAIN=oxyta.net
# the email to which services will send important email
export CHATONS_MAIL=services@$CHATONS_DOMAIN
## Those do not need customization
export CHATONS_MYSQL_PASSWORD=$(openssl rand -base64 32)
export CHATONS_MYSQL_ROOT_PASSWORD=$(openssl rand -base64 32)
if [ ! -d "$CHATONS_ROOT_DIR" ]; then
echo "error: $CHATONS_ROOT_DIR must exist and be a regular folder" >&2
exit 1
fi
# Export common environment variables
echo "COMPOSE_PROJECT_NAME=$CHATONS_COMPOSE_PROJECT" > .env
echo "CHATONS_ROOT_DIR=$CHATONS_ROOT_DIR" >> .env
echo "CHATONS_DOMAIN=$CHATONS_DOMAIN" >> .env
echo "CHATONS_MAIL=$CHATONS_MAIL" >> .env
# Export specific environment configuration
echo "MYSQL_PASSWORD=$CHATONS_MYSQL_PASSWORD" > cloud/.env
echo "MYSQL_ROOT_PASSWORD=$CHATONS_MYSQL_ROOT_PASSWORD" >> cloud/.env
echo "MYSQL_ROOT_PASSWORD=$CHATONS_MYSQL_ROOT_PASSWORD" > pad/.env
echo "ETHERPAD_DB_PASSWORD=$CHATONS_MYSQL_ROOT_PASSWORD" >> pad/.env
# Configure traefik
mkdir -p "$CHATONS_ROOT_DIR/traefik"
touch "$CHATONS_ROOT_DIR/traefik/acme.json"
chmod 600 "$CHATONS_ROOT_DIR/traefik/acme.json"
cp traefik/traefik.toml "$CHATONS_ROOT_DIR/traefik/traefik.toml"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment