Added myadmin flavour

This commit is contained in:
2020-08-05 08:19:28 +02:00
parent 0c2865c620
commit e61f7c3e9b
7 changed files with 92 additions and 5 deletions
+8
View File
@@ -0,0 +1,8 @@
CONTAINER_NAME=TheNameOfYourContainer
MYSQL_ROOT_PASSWORD=YourMySQLRootPasswordHere
MYSQL_USER=wpuser
MYSQL_PASSWORD=The_wpuser_password_here
MYSQL_WP_DATABASE=wordpressdb
EX_PORT=8000
MY_PORT=8100
+20
View File
@@ -0,0 +1,20 @@
INSTRUCTIONS
1. Copy (and edit) .env_default to .env
2. Run docker-compose
3. Access the system in https://hostname:$EX_PORT
4. Follow the system instructions to install WP
5. Have fun!
If you need to access the phpMyAdmin just point your browser to http://hostname:$MY_PORT
.env VARIABLES
The variables in the .env file are:
CONTAINER_NAME: represents the sufix of the containers created
MYSQL_ROOT_PASSWORD: the root password for the MySQL database
MYSQL_USER: the user to own the wordpress database
MYSQL_PASSWORD: the password for the MYSQL_USER
MYSQL_WP_DATABASE: the wordpress database name
EX_PORT: the port to access the wordpress
MY_PORT: the port to access the phpMyAdmin
+44
View File
@@ -0,0 +1,44 @@
version: '3'
services:
db:
image: mysql:8.0
container_name: "${CONTAINER_NAME}_db"
restart: unless-stopped
env_file: .env
environment:
- MYSQL_DATABASE=$MYSQL_WP_DATABASE
volumes:
- ./dbdata:/var/lib/mysql
command: '--default-authentication-plugin=mysql_native_password'
wordpress:
depends_on:
- db
image: wordpress
container_name: "${CONTAINER_NAME}_wp"
restart: unless-stopped
env_file: .env
ports:
- $EX_PORT:80
environment:
- WORDPRESS_DB_HOST=db:3306
- WORDPRESS_DB_USER=$MYSQL_USER
- WORDPRESS_DB_PASSWORD=$MYSQL_PASSWORD
- WORDPRESS_DB_NAME=$MYSQL_WP_DATABASE
volumes:
- ./wordpress:/var/www/html
phpmyadmin:
depends_on:
- db
image: phpmyadmin/phpmyadmin
container_name: "${CONTAINER_NAME}_myadmin"
restart: unless-stopped
ports:
- $MY_PORT:80
env_file: .env
environment:
MYSQL_USER: $MYSQL_USER
MYSQL_PASSWORD: $MYSQL_PASSWORD
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD