Since we also setup phpMyAdmin in our Docker compose file, login to phpMyAdmin to view/update WordPress database. Once WordPress setup is completed, login using the username/password provided in previous step and you will be greeted with WordPress Dashboard. Enter Site Title, Username and Password and press Install WordPress. ![]() Once the docker-compose is completed, open up the browser and goto We can start the local wordpress setup. However subsequent invocation is going to be instant. When running first time, Docker will build up the stack and download all the images. $ docker-compose up -d Code language: Shell Session ( shell ) Save the docker-compose.yml file and run docker-compose up command to create and start the docker containers with WordPress, MySQL and phpMyAdmin. Both wordpress and phpmyadmin depends on the db container which runs MySQL image. Similarly phpmyadmin is exposed at port 8080. ![]() The wordpress container exposing the wordpress at port 80. ![]() In above docker-compose.yml file we are creating 3 containers mysql, wordpress and phpmyadmin. :/var/www/html/wp-content environment: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_USER: wordpress WORDPRESS_DB_PASSWORD: wordpress ports: - 80 :80 - 443 :443 networks: - wp phpmyadmin: depends_on: - db image: phpmyadmin/phpmyadmin ports: - 8080 :80 environment: PMA_HOST: db MYSQL_ROOT_PASSWORD: password networks: - wp networks: wp: volumes: db_data: Code language: YAML ( yaml ) Version: "3" services: db: image: mysql:5.7 restart: always volumes: - db_data:/var/lib/mysql environment: MYSQL_ROOT_PASSWORD: password MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: wordpress networks: - wp wordpress: depends_on: - db image: wordpress restart: always volumes:.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |