Wordpress docker backup
Budget: €8 – €30 EUR
I have a Wordpress working on a docker container installed on a macOS using docker compose for a yml
the Wordpress files is on one container and the mysql on another
attached the yml file content
version: '3.9'
services:
wordpress:
depends_on:
- db
image: wordpress:latest
volumes:
- ./wordpress_files:/var/www/html
ports:
- "80:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: dbuser
WORDPRESS_DB_PASSWORD: dbpassword
WORDPRESS_DB_NAME: wordpressdb
volumes:
- .wordpress/plugins:/var/www/html/wp-content/plugins
- .wordpress/themes:/var/www/html/wp-content/themes
- .wordpress/uploads:/var/www/html/wp-content/uploads
db:
image: mysql:5.7
volumes:
- ./db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpressdb
MYSQL_USER: dbuser
MYSQL_PASSWORD: dbpassword
wold like to create a backup of the container for the Wordpress and the mysql container to use the working Wordpress with docker on another machine.
the Wordpress files is on one container and the mysql on another
attached the yml file content
version: '3.9'
services:
wordpress:
depends_on:
- db
image: wordpress:latest
volumes:
- ./wordpress_files:/var/www/html
ports:
- "80:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: dbuser
WORDPRESS_DB_PASSWORD: dbpassword
WORDPRESS_DB_NAME: wordpressdb
volumes:
- .wordpress/plugins:/var/www/html/wp-content/plugins
- .wordpress/themes:/var/www/html/wp-content/themes
- .wordpress/uploads:/var/www/html/wp-content/uploads
db:
image: mysql:5.7
volumes:
- ./db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpressdb
MYSQL_USER: dbuser
MYSQL_PASSWORD: dbpassword
wold like to create a backup of the container for the Wordpress and the mysql container to use the working Wordpress with docker on another machine.