Fork de https://framagit.org/oxyta.net/oxytanet pour ajouter les choses propres à tetaneutral.net
|
7 years ago | |
---|---|---|
cloud | 7 years ago | |
frontal | 7 years ago | |
git | 7 years ago | |
im | 7 years ago | |
pad | 7 years ago | |
README.md | 7 years ago | |
nginx.conf | 7 years ago |
echo 'LANG="en_US.UTF-8"' > /etc/locale.conf
mkdir -p /etc/nginx/sites-enabled/ /srv/letsencrypt ~/.ssh
# Install packages
pacman -Syu --noconfirm git docker docker-compose nginx certbot
systemctl start docker
systemctl enable docker
# Add keys
cd
git clone https://framagit.org/altermediatic/keys.git
cd .ssh
rm authorized_keys
ln -s ../keys/ssh authorized_keys
# Add this repo
cd
git clone https://framagit.org/altermediatic/docker-atelier.git
cd docker-atelier
export DOMAIN=oxyta.net
export MAIL=services@$DOMAIN
export MYSQL_PASSWORD=$(openssl rand -base64 32)
export MYSQL_ROOT_PASSWORD=$(openssl rand -base64 32)
cp nginx.conf /etc/nginx
systemctl nginix restart
for service in pad git cloud
do
pushd $service
ln -s $PWD/nginx.conf /etc/nginx/sites-enabled/$service
systemctl restart nginx
certbot certonly --email $MAIL --webroot -w /srv/letsencrypt/ --agree-tos -d www.$service.$DOMAIN -d $service.$DOMAIN
docker-compose up -d
popd
done
cd frontal
docker build -t oxytanet .
docker run -d -p 8080:80 -t oxytanet
ln -s $PWD/nginx.conf /etc/nginx/sites-enabled/frontal
certbot certonly --email $MAIL --webroot -w /srv/letsencrypt/ --agree-tos -d www.$DOMAIN -d $DOMAIN
systemctl restart nginx