mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-08 03:07:14 +02:00
Renamed general and mode constants and implemented a check to verify that constants are just defined ones over the whole repository
This commit is contained in:
@@ -49,7 +49,7 @@ This script:
|
||||
|
||||
**Usage:**
|
||||
```sh
|
||||
sh srv-proxy-6-6-tls-deploy.sh primary_domain /path/to/docker/compose
|
||||
sh srv-proxy-6-6-tls-deploy.sh PRIMARY_DOMAIN /path/to/docker/compose
|
||||
```
|
||||
|
||||
---
|
||||
|
@@ -4,33 +4,33 @@ If you enabled `enable_wildcard_certificate`, follow these steps to manually req
|
||||
### **1️⃣ Run the Certbot Command 🖥️**
|
||||
```sh
|
||||
certbot certonly --manual --preferred-challenges=dns --agree-tos \
|
||||
--email administrator@primary_domain -d primary_domain -d "*.primary_domain"
|
||||
--email administrator@PRIMARY_DOMAIN -d PRIMARY_DOMAIN -d "*.PRIMARY_DOMAIN"
|
||||
```
|
||||
|
||||
### **2️⃣ Add DNS TXT Record for Validation 📜**
|
||||
Certbot will prompt you to add a DNS TXT record:
|
||||
```
|
||||
Please create a TXT record under the name:
|
||||
_acme-challenge.primary_domain.
|
||||
_acme-challenge.PRIMARY_DOMAIN.
|
||||
|
||||
with the following value:
|
||||
9oVizYIYVGlZ3VtWQIKRS5UghyXiqGoUNlCtIE7LiA
|
||||
```
|
||||
➡ **Go to your DNS provider** and create a new **TXT record**:
|
||||
- **Host:** `_acme-challenge.primary_domain`
|
||||
- **Host:** `_acme-challenge.PRIMARY_DOMAIN`
|
||||
- **Value:** `"9oVizYIYVGlZ3VtWQIKRS5UghyXiqGoUNlCtIE7LiA"`
|
||||
- **TTL:** Set to **300 seconds (or lowest possible)**
|
||||
|
||||
✅ **Verify the DNS record** before continuing:
|
||||
```sh
|
||||
dig TXT _acme-challenge.primary_domain @8.8.8.8
|
||||
dig TXT _acme-challenge.PRIMARY_DOMAIN @8.8.8.8
|
||||
```
|
||||
|
||||
### **3️⃣ Complete the Certificate Request ✅**
|
||||
Once the DNS changes have propagated, **press Enter** in the Certbot terminal.
|
||||
If successful, Certbot will save the certificates under:
|
||||
```
|
||||
/etc/letsencrypt/live/primary_domain/
|
||||
/etc/letsencrypt/live/PRIMARY_DOMAIN/
|
||||
```
|
||||
- **fullchain.pem** → The certificate
|
||||
- **privkey.pem** → The private key
|
||||
|
@@ -12,11 +12,11 @@ docker_compose_instance_directory="$2"
|
||||
docker_compose_cert_directory="$docker_compose_instance_directory/volumes/certs"
|
||||
|
||||
# Copy certificates
|
||||
cp -RvL "{{ letsencrypt_live_path }}/$ssl_cert_folder/"* "$docker_compose_cert_directory" || exit 1
|
||||
cp -RvL "{{ LETSENCRYPT_LIVE_PATH }}/$ssl_cert_folder/"* "$docker_compose_cert_directory" || exit 1
|
||||
|
||||
# This code is optimized for mailu
|
||||
cp -v "{{ letsencrypt_live_path }}/$ssl_cert_folder/privkey.pem" "$docker_compose_cert_directory/key.pem" || exit 1
|
||||
cp -v "{{ letsencrypt_live_path }}/$ssl_cert_folder/fullchain.pem" "$docker_compose_cert_directory/cert.pem" || exit 1
|
||||
cp -v "{{ LETSENCRYPT_LIVE_PATH }}/$ssl_cert_folder/privkey.pem" "$docker_compose_cert_directory/key.pem" || exit 1
|
||||
cp -v "{{ LETSENCRYPT_LIVE_PATH }}/$ssl_cert_folder/fullchain.pem" "$docker_compose_cert_directory/cert.pem" || exit 1
|
||||
|
||||
# Set correct reading rights
|
||||
chmod a+r -v "$docker_compose_cert_directory/"*
|
||||
|
Reference in New Issue
Block a user