|
@@ -2,57 +2,59 @@
|
|
|
|
|
|
[Pad](https://mypads.framapad.org/mypads/?/mypads/group/altermediatic-toulouse-deatm79d/pad/view/docker-atelier-acqwh7km)
|
|
|
|
|
|
-## All
|
|
|
+## Install on a clean Arch
|
|
|
|
|
|
-- add `include /etc/nginx/sites-enabled/*` to /etc/nginx/nginx.conf in http section
|
|
|
-```
|
|
|
-mkdir /etc/nginx/sites-enabled/ /srv/letsencrypt
|
|
|
-export DOMAIN=oxyta.net
|
|
|
-export MAIL=<le mail pour les services>
|
|
|
-```
|
|
|
-
|
|
|
-## Frontal
|
|
|
-
|
|
|
-```
|
|
|
-cd frontal
|
|
|
-docker build -t oxytanet .
|
|
|
-docker run -d -p 8080:80 -t oxytanet
|
|
|
-ln -s $PWD/nginx.conf /etc/nginx/sites-enabled/main
|
|
|
-certbot certonly --email $MAIL --webroot -w /srv/letsencrypt/ --agree-tos -d www.$DOMAIN -d $DOMAIN
|
|
|
```
|
|
|
+# Install packages
|
|
|
+pacman -Syu git docker docker-compose nginx certbot
|
|
|
+systemctl start docker
|
|
|
+systemctl enable docker
|
|
|
|
|
|
-## Etherpad
|
|
|
+# Add keys
|
|
|
+cd
|
|
|
+git clone git@framagit.org:altermediatic/keys.git
|
|
|
+cd .ssh
|
|
|
+rm authorized_keys
|
|
|
+ln -s ../keys/ssh authorized_keys
|
|
|
|
|
|
-```
|
|
|
-cd etherpad
|
|
|
-export MYSQL_ROOT_PASSWORD=$(openssl rand -base64 32)
|
|
|
-ln -s $PWD/nginx.conf /etc/nginx/sites-enabled/etherpad
|
|
|
-certbot certonly --email $MAIL --webroot -w /srv/letsencrypt/ --agree-tos -d www.pad.$DOMAIN -d pad.$DOMAIN
|
|
|
-docker-compose up -d
|
|
|
+# Add this repo
|
|
|
+cd
|
|
|
+git clone git@framagit.org:altermediatic/docker-atelier.git
|
|
|
+cd docker-atelier
|
|
|
```
|
|
|
|
|
|
+## Deploy Services
|
|
|
|
|
|
-## Nextcloud
|
|
|
+add `include /etc/nginx/sites-enabled/*` to /etc/nginx/nginx.conf in http section
|
|
|
|
|
|
```
|
|
|
-cd nextcloud
|
|
|
-export MYSQL_ROOT_PASSWORD=$(openssl rand -base64 32)
|
|
|
+mkdir /etc/nginx/sites-enabled/ /srv/letsencrypt
|
|
|
+export DOMAIN=oxyta.net
|
|
|
+export MAIL=services@$DOMAIN
|
|
|
export MYSQL_PASSWORD=$(openssl rand -base64 32)
|
|
|
-ln -s $PWD/nginx.conf /etc/nginx/sites-enabled/nextcloud
|
|
|
-certbot certonly --email $MAIL --webroot -w /srv/letsencrypt/ --agree-tos -d www.cloud.$DOMAIN -d cloud.$DOMAIN
|
|
|
-docker-compose up -d
|
|
|
+export MYSQL_ROOT_PASSWORD=$(openssl rand -base64 32)
|
|
|
+
|
|
|
+for service in pad git cloud
|
|
|
+do
|
|
|
+ pushd $service
|
|
|
+ ln -s $PWD/nginx.conf /etc/nginx/sites-enabled/$service
|
|
|
+ certbot certonly --email $MAIL --webroot -w /srv/letsencrypt/ --agree-tos -d www.$service.$DOMAIN -d $service.$DOMAIN
|
|
|
+ docker-compose up -d
|
|
|
+ popd
|
|
|
+done
|
|
|
```
|
|
|
|
|
|
-## gitlab
|
|
|
+## Deploy Frontal
|
|
|
|
|
|
```
|
|
|
-cd gitlab
|
|
|
-ln -s $PWD/nginx.conf /etc/nginx/sites-enabled/gitlab
|
|
|
-certbot certonly --email $MAIL --webroot -w /srv/letsencrypt/ --agree-tos -d www.git.$DOMAIN -d git.$DOMAIN
|
|
|
-docker-compose up -d
|
|
|
+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
|
|
|
```
|
|
|
|
|
|
-## After
|
|
|
+## Restart nginx
|
|
|
|
|
|
```
|
|
|
systemctl restart nginx
|