Fork de https://framagit.org/oxyta.net/oxytanet pour ajouter les choses propres à tetaneutral.net

Guilhem Saurel e751ee7126 fix nginx / certbot 7 years ago
cloud 1a87c32c81 rename folders to subdomain names 7 years ago
frontal 3ce36f6cc0 oxyta.net 7 years ago
git 1a87c32c81 rename folders to subdomain names 7 years ago
im 1a87c32c81 rename folders to subdomain names 7 years ago
pad 1a87c32c81 rename folders to subdomain names 7 years ago
README.md e751ee7126 fix nginx / certbot 7 years ago
nginx.conf e751ee7126 fix nginx / certbot 7 years ago

README.md

Ateliers Docker

Pad

Install on a clean Arch

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

Deploy Services

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

Deploy Frontal

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

Restart nginx

systemctl restart nginx