Removed server_ for better overview

This commit is contained in:
2023-08-22 22:53:44 +02:00
parent 571bed27a3
commit 4254642313
246 changed files with 45 additions and 45 deletions

View File

@@ -0,0 +1,6 @@
# role server_docker-joomla
## delete all data
```bash
docker stop joomla_application_1; docker rm -f joomla_application_1; docker volume rm -f joomla-data;
docker stop joomla_database_1; docker rm -f joomla_database_1; docker volume rm -f joomla-database;
```

View File

@@ -0,0 +1,8 @@
---
- name: recreate joomla
command:
cmd: docker-compose -p joomla up -d --force-recreate
chdir: "{{path_docker_compose_folder}}"
environment:
COMPOSE_HTTP_TIMEOUT: 600
DOCKER_CLIENT_TIMEOUT: 600

View File

@@ -0,0 +1,2 @@
dependencies:
- server_native-docker-reverse-proxy

View File

@@ -0,0 +1,17 @@
---
- name: recieve {{domain}} certificate
command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{domain}}
- name: configure {{domain}}.conf
template: src=roles/server_native-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
notify: restart nginx
- name: "create {{path_docker_compose_folder}}"
file:
path: "{{path_docker_compose_folder}}"
state: directory
mode: 0755
- name: add docker-compose.yml
template: src=docker-compose.yml.j2 dest={{path_docker_compose_folder}}docker-compose.yml
notify: recreate joomla

View File

@@ -0,0 +1,35 @@
version: '3'
services:
application:
image: joomla
logging:
driver: journald
environment:
JOOMLA_DB_HOST: "database:3306"
JOOMLA_DB_USER: "joomla"
JOOMLA_DB_PASSWORD: "{{joomla_database_password}}"
JOOMLA_DB_NAME: "joomla"
restart: always
links:
- database
volumes:
- data:/var/www/html
ports:
- "127.0.0.1:{{http_port}}:80"
database:
image: mariadb
logging:
driver: journald
environment:
MYSQL_DATABASE: "joomla"
MYSQL_USER: "joomla"
MYSQL_PASSWORD: "{{joomla_database_password}}"
MYSQL_ROOT_PASSWORD: "{{joomla_database_password}}"
MARIADB_AUTO_UPGRADE: "1"
volumes:
- database:/var/lib/mysql
restart: always
volumes:
database:
data:

View File

@@ -0,0 +1 @@
path_docker_compose_folder: "{{path_docker_compose_files}}joomla/"