If you need your own WordPress server with HTTPS and Backups.
- Oracle VPS Free Tier ARM (VM.Standard.A1.Flex) I did on 4 CPU Ampere 24 RAM.
- Ubuntu 20.04 ARM
- docker-compose version 2.4
- wordpress:php8.0
- redis 6.0.15-alpine
- Zabbix agent 5.0.16
- Postgres 12
- Traefik 2.5.3
- Portainer 2.9.3-alpine
- phpmyadmin 5.1.1
- pgadmin 4.6.2
- mysql-server:8.0 (Oracle)
- 2021-12-21
cd ~ &&
git clone https://github.com/anklav24/wordpress-docker &&
cd wordpress-docker
git checkout develop
deploy_configs_example
->deploy_configs
.env.example
->.env
Replace domains, envs, emails, logins, passwords and tls.certresolver on yours! Don't use examples in production!
chmod +x install.sh && ./install.sh
- https://github.com/prasmussen/gdrive
- Find folder_id
# Example
gdrive list --absolute --query "mimeType = 'application/vnd.google-apps.folder' and name contains 'backup'" --max 1000
- Change in
4soulsband_wordpress_backup.sh
gdrive_folder_id
variable to yourId
- In
.env
add yourYANDEX_TOKEN
- Go to web yandex disk and create folder /backups/sites_backup/ or change the path in the backup scripts
- Setup
logrotate
check config indeploy_configs/logrotate.d/traefik
- Or turn off logs
- https://YOUR-WORDPRESS-DOMAIN.com
- Setup wordpress and install
redis-object-cache
plugin
cd ~/wordpress-docker
docker-compose -f 1-docker-compose.yaml up -d;
docker-compose -f 2-docker-compose.yaml up -d
- https://xn--4-htbm7bza.xn--p1ai/
- https://traefik.oracle24.duckdns.org
- https://portainer.oracle24.duckdns.org (Restricted by IP with Traefik)
- https://pgadmin.oracle24.duckdns.org (Restricted by IP with Traefik)
- https://phpmyadmin.oracle24.duckdns.org (Restricted by IP with Traefik)
- https://www.duckdns.org/
- https://ssllabs.com/ssltest
- https://hstspreload.org/
- https://doc.traefik.io/traefik/
- https://github.com/prasmussen/gdrive
- https://docs.docker.com/compose/compose-file/compose-file-v2/
If a WordPress site has the "gateway timeout" error, you need to set default network for traefik:
- traefik.docker.network=traefik_proxy_net
docker exec -ti redis redis-cli -p 6380 monitor
docker exec -ti redis redis-cli -p 6380
127.0.0.1:6379> KEYS *
Set up backup automation:
sudo cp systemd_services/* /etc/systemd/system/ # Copy services and timers files.
sudo systemctl start 4soulsband_wordpress_montly_backup.service # Check the service works properly (Example)
sudo systemctl enable 4soulsband_wordpress_montly_backup.timer # Enable a timer (Example)
sudo systemctl daemon-reload # Reload systemd after service changing.
clear; sudo systemctl status *4sou*timer # Check backup timers
sudo systemctl list-timers # Check all timers
sudo systemctl start 4soulsband_wordpress_daily_backup.service # Start the backup manually.
sudo systemctl start 4soulsband_wordpress_weekly_backup.service # Start the backup manually.
sudo systemctl start 4soulsband_wordpress_yearly_backup.service # Start the backup manually. With Google Drive Sync
journalctl -u 4soulsband_wordpress_daily_backup.timer # Check logs
journalctl -u 4soulsband_wordpress_daily_backup.service # Check logs
# Example
./4soulsband_wordpress_backup.sh daily 7 YOUR_DATABASE_NAME YOUR_DATABASE_USER YOUR_DATABASE_PASSWORD true
# Need args: task_name (daily, monthly, yearly), days_to_keep (7, 186, 1825), mysql_db_name, mysql_user, mysql_password, [debug (true)]
# Before you need change timestamp and backup_dir_name variables in the file
./4soulsband_wordpress_restore.sh daily YOUR_DATABASE_NAME YOUR_DATABASE_USER YOUR_DATABASE_PASSWORD true
# Need args: task_name (daily, monthly, yearly), mysql_db_name, mysql_user, mysql_password, [debug (true)]