in This Tutorial you will Learn " Deploy WordPress with Docker Compose On Rocky Linux 8.5"
Docker Compose is a tool that was developed to help define and share multi-container applications.
WordPress is an open-source content management system (CMS).
_________________________________________________________________________________________
Server - Os: Rocky Linux 8.5 64Bit | IP -192.168.1.20 | Hostname - www.primaryhost.com
_________________________________________________________________________________________
cat /etc/system-release ; sestatus ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y
mkdir ~/my_wordpress/ ; cd ~/my_wordpress/
nano docker-compose.yml
version: '3.3'
services:
wordpress:
depends_on:
- db
image: wordpress:latest
volumes:
- wordpress_files:/var/www/html
ports:
- "80:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: db_password
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: db_root_password
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: db_password
volumes:
wordpress_files:
db_data:
docker-compose up -d
http://
cd ~/my_wordpress/ ; docker-compose stop
cd ~/my_wordpress/ ; docker-compose start
cd ~/my_wordpress/ ; docker-compose down
__________________________________________________________________________________________
Friday, February 25, 2022
Deploy WordPress with Docker Compose On Rocky Linux 8.5
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment