Refactoring

This commit is contained in:
d3m0k1d
2025-11-20 17:21:44 +03:00
parent f2ecc5cc1a
commit e0c206cfc5
12 changed files with 0 additions and 63 deletions

View File

@@ -1,21 +0,0 @@
services:
frontend:
build: ./frontend
ports:
- 80:80
- 443:443
restart: always
volumes:
- ./frontend:/usr/share/nginx/html:ro
- /etc/letsencrypt:/etc/letsencrypt:ro
- ./frontend/nginx.conf:/etc/nginx/nginx.conf:ro
networks:
- blog
networks:
blog:
driver: bridge
volumes:
frontend:
driver: local

View File

@@ -1,42 +0,0 @@
- name: Configure a frontend server
hosts: server
become: yes
tasks:
- name: Install git
apt:
name: git
state: latest
update_cache: yes
when: ansible_os_family == "Debian"
- name: Clone repo with script
ansible.builtin.git:
repo: https://github.com/d3m0k1d/automation-scripts.git
dest: /opt/automation-scripts
version: main
when: ansible_os_family == "Debian"
- name: Make install script executable
ansible.builtin.file:
path: /opt/automation-scripts/scripts/sysadmins/debian-init-docker.sh
mode: '0755'
when: ansible_os_family == "Debian"
- name: Run install script
ansible.builtin.shell:
cmd: /opt/automation-scripts/scripts/sysadmins/debian-init-docker.sh
chdir: /opt/automation-scripts/scripts/sysadmins
when: ansible_os_family == "Debian"
register: docker_install_result
- name: Install certbot
apt:
name: python3-certbot-nginx
state: latest
update_cache: yes
when: ansible_os_family == "Debian"
- name: Run certbot for domain
shell: certbot --nginx -d d3m0k1d.ru -d www.d3m0k1d.ru --non-interactive --agree-tos --email contact@d3m0k1d.ru
when: ansible_os_family == "Debian"