I need a wordpress/mariadb/adminer yaml where all volumns are named properly so that I can easily get the the wp-config.php file as well as the PHP.ini file as there are always changes needed and I can never find the correct files as the volumes get random names and I can never find the php.ini file.
I’m using a QNAP nas sever and have already got several wordpress sites working, but without adminer, it’s luck if I can find the wp-config file, and never see the correct php.ini (i have 7 docker websites set up, when I search for php.ini I find 19!)
Here’s the yaml I use.
version: '3'
services:
db:
# We use a mariadb image which supports both amd64 & arm64 architecture
image: mariadb:10.6.4-focal
# If you really want to use MySQL, uncomment the following line
#image: mysql:8.0.27
command: '--default-authentication-plugin=mysql_native_password'
volumes:
- ./db_data:/var/lib/mysql
restart: always
environment:
- MYSQL_ROOT_PASSWORD=xxxx
- MYSQL_DATABASE=portfolio
- MYSQL_USER=hhhadmin
- MYSQL_PASSWORD=xxxxx
expose:
- 3306
- 33060
wordpress:
image: wordpress:latest
ports:
- 8110:80
restart: always
environment:
- WORDPRESS_DB_HOST=db
- WORDPRESS_DB_USER=xxxx
- WORDPRESS_DB_PASSWORD=xxxxx
- WORDPRESS_DB_NAME=portfolio
volumes:
db_data:
I’m very inexperienced with Docker, and not a UNIX guy, but can follow instructions if needed
Many thanks