Hello,
SO in learning WordPress I am attempting to set-up local environment using this guide, [https://www.hostinger.com/tutorials/run-docker-wordpress]).
However, I cannot get the myPHP screen to show. This is what I have in the docker compose file.
version: “3”
# Defines which compose version to use
services:
# Services line define which Docker images to run. In this case, it will be MySQL server and WordPress image.
db:
image: mysql:5.7
# image: mysql:5.7 indicates the MySQL database container image from Docker Hub used in this installation.
restart: always
environment:
MYSQL_ROOT_PASSWORD: MyR00tMySQLPa$$5w0rD
MYSQL_DATABASE: MyWordPressDatabaseName
MYSQL_USER: MyWordPressUser
MYSQL_PASSWORD: Pa$$5w0rD
# Previous four lines define the main variables needed for the MySQL container to work: database, database username, database user password, and the MySQL root password.
wordpress:
depends_on:
– db
image: wordpress:latest
restart: always
# Restart line controls the restart mode, meaning if the container stops running for any reason, it will restart the process immediately.
ports:
– “8000:80”
# The previous line defines the port that the WordPress container will use. After successful installation, the full path will look like this: http://localhost:8000
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: MyWordPressUser
WORDPRESS_DB_PASSWORD: Pa$$5w0rD
WORDPRESS_DB_NAME: MyWordPressDatabaseName
# Similar to MySQL image variables, the last four lines define the main variables needed for the WordPress container to work properly with the MySQL container.
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
restart: always
environment:
PMA_HOST: db
PMA_USER: MyWordPressUser
PMA_PASSWORD: Pa$$5w0rD
ports:
– “8080:80”
volumes:
[“./:/var/www/html”]
volumes:
mysql: {}
What am I missing?
[ad_2]
Is there a specific reason to use Docker?
I only ask because it adds another layer of management for something that is relatively simple with WAMP/MAMP.
And if you use Local by Flywheel it makes the famed 5 minute install even easier.