2024-10-14 20:54:39 +00:00
|
|
|
Scripturi si fisiere yaml pentru docker compose
|
|
|
|
|
|
|
|
|
|
install.sh---
|
|
|
|
|
|
|
|
|
|
Este un fisier care pregateste o noua masina ubuntu pentru a fi folosita
|
|
|
|
|
|
|
|
|
|
Se aduce pe masina cu urmatoarea comanda:
|
|
|
|
|
|
2024-10-14 21:40:31 +00:00
|
|
|
|
|
|
|
|
|
2024-10-14 21:58:17 +00:00
|
|
|
-----nginx certbot in docker xxxxx atentie sa modific peste tot domeniul
|
2024-10-14 21:40:31 +00:00
|
|
|
|
2024-10-15 18:35:15 +00:00
|
|
|
PASI INSTALARE DOCKER COMPOSE 24.04 Ubuntu
|
|
|
|
|
-----------------------------
|
|
|
|
|
|
|
|
|
|
sudo apt update -y
|
2024-10-15 18:35:41 +00:00
|
|
|
|
2024-10-15 18:35:15 +00:00
|
|
|
sudo apt upgrade -y
|
2024-10-15 18:35:41 +00:00
|
|
|
|
2024-10-15 18:35:15 +00:00
|
|
|
sudo apt install docker.io
|
2024-10-15 18:35:41 +00:00
|
|
|
|
2024-10-15 18:35:15 +00:00
|
|
|
sudo chmod +x /usr/local/bin/docker-compose
|
2024-10-15 18:35:41 +00:00
|
|
|
|
2024-10-15 18:35:15 +00:00
|
|
|
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
2024-10-15 18:35:41 +00:00
|
|
|
|
2024-10-15 18:35:15 +00:00
|
|
|
docker-compose --version
|
|
|
|
|
|
2024-10-14 21:58:17 +00:00
|
|
|
fisierul nginx yml se copiaza contentul in /srv in fisier docker-compose.yaml este cea mai noua versiune alpine la 14 oct 24
|
2024-10-14 22:00:00 +00:00
|
|
|
-trebuie editate toate exemple domain si are inauntru verificare la doisprezece ore pentru renew si la sase ore reincarcare
|
2024-10-14 21:40:31 +00:00
|
|
|
|
|
|
|
|
tot acolo copiez si continutul lui nginx-for-docker config in /data/nginx/app.conf
|
|
|
|
|
|
2024-10-14 21:58:17 +00:00
|
|
|
Cu comanda urmatoare aduc fisierul de initializare prima data: (il editez local sa schimb domeniul example)
|
2024-10-14 22:01:06 +00:00
|
|
|
curl -L https://repos.bogdancarpean.com/micutu/Linux_ubuntu_scripts/raw/branch/main/install.sh > init-letsencrypt.sh
|
2024-10-14 21:58:17 +00:00
|
|
|
|
2024-10-15 03:33:12 +00:00
|
|
|
chmod +x init-letsencrypt.sh
|
|
|
|
|
|
2024-10-15 01:15:36 +00:00
|
|
|
cand rulez scriptul sterg location / {
|
|
|
|
|
return 301 https://$host$request_uri;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
si pun in loc
|
|
|
|
|
|
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
|
|
|
root /var/www/certbot;
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-14 21:58:17 +00:00
|
|
|
chmod +x init-letsencrypt.sh
|
2024-10-14 22:01:23 +00:00
|
|
|
|
2024-10-14 21:58:17 +00:00
|
|
|
sudo ./init-letsencrypt.sh
|