mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Merged client playbook and server playbook
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
# role docker-wordpress
|
||||
|
||||
## database
|
||||
|
||||
## access database
|
||||
To access the database execute
|
||||
```bash
|
||||
docker exec -it wordpress-database-1 /bin/mysql -u wordpress -p
|
||||
```
|
||||
|
||||
## upgrade database
|
||||
To upgrade the database execute
|
||||
```bash
|
||||
docker exec -it wordpress-database-1 /bin/mysql_upgrade --user=root --password=
|
||||
```
|
||||
|
||||
## change database root password
|
||||
- https://wolfgang.gassler.org/reset-password-mariadb-mysql-docker/
|
||||
- https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password
|
||||
|
||||
## bash in application
|
||||
docker exec -it wordpress-application-1 /bin/sh
|
||||
|
||||
## update wp-config.php
|
||||
```bash
|
||||
apt update && apt install nano && nano wp-config.php
|
||||
```
|
||||
|
||||
## multiside
|
||||
- https://multilingualpress.de/doku/wordpress-multisite-installieren-einrichten/
|
||||
- https://pressable.com/knowledgebase/adding-or-changing-the-domain-on-a-wordpress-multisite/
|
||||
- https://wpengine.com/support/how-to-change-a-multi-site-primary-domain/
|
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: recreate wordpress
|
||||
command:
|
||||
cmd: docker-compose -p wordpress up -d --force-recreate
|
||||
chdir: /home/administrator/docker-compose/wordpress/
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
@@ -1,2 +0,0 @@
|
||||
dependencies:
|
||||
- native-docker-reverse-proxy
|
@@ -1,22 +0,0 @@
|
||||
---
|
||||
- name: recieve wordpress certificates
|
||||
command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{item}}
|
||||
loop: "{{domains}}"
|
||||
|
||||
- name: configure wordpress nginx configurations
|
||||
vars:
|
||||
client_max_body_size: "2M"
|
||||
domain: "{{item}}"
|
||||
template: src=roles/native-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{ item }}.conf
|
||||
loop: "{{domains}}"
|
||||
notify: restart nginx
|
||||
|
||||
- name: "create /home/administrator/docker-compose/wordpress/"
|
||||
file:
|
||||
path: "/home/administrator/docker-compose/wordpress/"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest=/home/administrator/docker-compose/wordpress/docker-compose.yml
|
||||
notify: recreate wordpress
|
@@ -1,45 +0,0 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
application:
|
||||
logging:
|
||||
driver: journald
|
||||
image: wordpress
|
||||
restart: always
|
||||
ports:
|
||||
- "127.0.0.1:{{http_port}}:80"
|
||||
environment:
|
||||
WORDPRESS_DB_HOST: database:3306
|
||||
WORDPRESS_DB_USER: "wordpress"
|
||||
WORDPRESS_DB_PASSWORD: "{{wordpress_database_password}}"
|
||||
WORDPRESS_DB_NAME: "wordpress"
|
||||
links:
|
||||
- database
|
||||
volumes:
|
||||
- data:/var/www/html
|
||||
depends_on:
|
||||
- database
|
||||
database:
|
||||
logging:
|
||||
driver: journald
|
||||
image: mariadb
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_DATABASE: "wordpress"
|
||||
MYSQL_USER: "wordpress"
|
||||
MYSQL_PASSWORD: "{{wordpress_database_password}}"
|
||||
MYSQL_ROOT_PASSWORD: "{{wordpress_database_password}}"
|
||||
MARIADB_AUTO_UPGRADE: "1"
|
||||
volumes:
|
||||
- database:/var/lib/mysql
|
||||
healthcheck:
|
||||
test: "/usr/bin/mysql --user=wordpress --password={{wordpress_database_password}} --execute \"SHOW DATABASES;\""
|
||||
interval: 3s
|
||||
timeout: 1s
|
||||
retries: 5
|
||||
volumes:
|
||||
database:
|
||||
data:
|
||||
networks:
|
||||
default:
|
||||
driver: bridge
|
Reference in New Issue
Block a user