Added myadmin flavour

This commit is contained in:
Jose Miguel López Coronado 2020-08-05 08:19:28 +02:00
parent 0c2865c620
commit e61f7c3e9b
7 changed files with 92 additions and 5 deletions

View File

@ -1 +1,7 @@
This directory will contain several configuration files for the deployment of wordpress sites using docker
The subdirectories represent different wordpress deployment:
- basic: MySQL and WordPress containers only
- myadmin: MySQL, WordPress and phpMyAdmin containers
- basic_redis: added redis container to basic
- myadmin_redis: added redis container to myadmin

View File

@ -1,4 +1,4 @@
$CONTAINER_NAME=TheNameOfYourContainer
CONTAINER_NAME=TheNameOfYourContainer
MYSQL_ROOT_PASSWORD=YourMySQLRootPasswordHere
MYSQL_USER=wpuser
MYSQL_PASSWORD=The_wpuser_password_here

View File

@ -2,7 +2,16 @@ INSTRUCTIONS
1. Copy (and edit) .env_default to .env
2. Run docker-compose
3. Access the system in hostname:$EX_PORT
3. Access the system in http://hostname:$EX_PORT
4. Follow the system instructions to install WP
5. Have fun!
.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

View File

@ -3,7 +3,7 @@ version: '3'
services:
db:
image: mysql:8.0
container_name: $CONTAINER_NAME_db
container_name: "${CONTAINER_NAME}_db"
restart: unless-stopped
env_file: .env
environment:
@ -16,7 +16,7 @@ services:
depends_on:
- db
image: wordpress
container_name: $CONTAINER_NAME_wp
container_name: "${CONTAINER_NAME}_wp"
restart: unless-stopped
env_file: .env
ports:

8
myadmin/.env_default Normal file
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
myadmin/README.md Normal file
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

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