I'm currently working on a project using the WordPress API.
This is my docker-compose.yml file:
version: '3.1'
services:
wordpress:
image: wordpress
volumes:
- ./volumes/wordpress/:/var/www/html
ports:
- 8080:80
environment:
WORDPRESS_DB_PASSWORD: root
depends_on:
- mysql
mysql:
image: mysql:5.7
volumes:
- ./volumes/mysql/:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
web:
build:
context: .
dockerfile: Dockerfile
volumes:
- ./src/:/src
ports:
- 8081:8081
depends_on:
- wordpress
In order to use the WordPress API, I need to configure the WordPress container manually by going to http://localhost:8080/wp-admin and changing some settings.
Thing is, I need to make this settings changes automatic because everytime I remove the volume folder in order to reset the WordPress content, it also removes the settings.
Any idea on how I can achieve this?