feat: re-add certbot confs

This commit is contained in:
Lenoctambule
2026-04-02 16:06:28 +02:00
parent bc257ace2d
commit a9319ec7c5
4 changed files with 14 additions and 2 deletions

View File

@@ -72,6 +72,7 @@ services:
depends_on: depends_on:
- wordpress - wordpress
volumes: volumes:
- site_data:/var/www/wordpress
- ./nginx/secure/:/etc/nginx/templates/ - ./nginx/secure/:/etc/nginx/templates/
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
- ./nginx/certbot/conf:/etc/letsencrypt - ./nginx/certbot/conf:/etc/letsencrypt

View File

@@ -24,8 +24,8 @@ server {
ssl_protocols TLSv1.2 TLSv1.3; ssl_protocols TLSv1.2 TLSv1.3;
ssl_certificate /etc/letsencrypt/live/${APP_DOMAIN}/fullchain.pem; ssl_certificate /etc/letsencrypt/live/${APP_DOMAIN}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/${APP_DOMAIN}/privkey.pem; ssl_certificate_key /etc/letsencrypt/live/${APP_DOMAIN}/privkey.pem;
# include /etc/letsencrypt/options-ssl-nginx.conf; include /etc/letsencrypt/options-ssl-nginx.conf;
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
location ~ \.php$ { location ~ \.php$ {
try_files $uri =404; try_files $uri =404;

View File

@@ -17,6 +17,7 @@
pkg: pkg:
- ca-certificates - ca-certificates
- curl - curl
- make
force: true force: true
- name: Add Docker GPG key and Repository - name: Add Docker GPG key and Repository

View File

@@ -41,6 +41,16 @@
state: present state: present
when: not ansible_check_mode when: not ansible_check_mode
- name: Download recommended NGINX conf
ansible.builtin.get_url:
url: https://raw.githubusercontent.com/certbot/certbot/master/certbot-nginx/certbot_nginx/_internal/tls_configs/options-ssl-nginx.conf
dest: "{{ dest_dir }}/srcs/nginx/certbot/conf/options-ssl-nginx.conf"
- name: Download recommended TLS parameters
ansible.builtin.get_url:
url: https://raw.githubusercontent.com/certbot/certbot/master/certbot/certbot/ssl-dhparams.pem
dest: "{{ dest_dir }}/srcs/nginx/certbot/conf/ssl-dhparams.pem"
- name: Run the app - name: Run the app
ansible.builtin.command: "make -C {{ dest_dir }}" ansible.builtin.command: "make -C {{ dest_dir }}"