Friday, February 25, 2022

Deploy Drupal with Docker

 in This Tutorial you will Learn " How To  Deploy Drupal with Docker On Rocky Linux 8.5"

Docker is an open platform for developing, shipping, and running applications.
Drupal is a powerful, popular content management system and web application framework written in PHP.
_________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      |    IP -192.168.1.20        |     Hostname - www.primaryhost.com
_________________________________________________________________________________________
cat /etc/system-release ; sestatus ; dnf groupinstall "Development Tools" -y ; docker-compose --version ; docker --version
mkdir ~/my_drupal/ ; cd ~/my_drupal/
nano docker-compose.yml
version: '3.3'

services:
  drupal:
    image: drupal:latest
    ports:
      - 80:80
    volumes:
      - drupal_modules:/var/www/html/modules
      - drupal_profiles:/var/www/html/profiles
      - drupal_themes:/var/www/html/themes
      - drupal_sites:/var/www/html/sites
    restart: always

  postgres:
    image: postgres:10
    environment:
      POSTGRES_PASSWORD: Drupalpass123
    volumes:
        - db_data:/var/lib/postgresql/data
    restart: always

volumes:
  drupal_modules:
  drupal_profiles:
  drupal_themes:
  drupal_sites:
  db_data:

docker-compose up -d
docker ps
Db name: postgres | Database username: postgres | Database password:Drupalpass123 Host : postgres
cd ~/my_drupal/ ; docker-compose stop
cd ~/my_drupal/ ; docker-compose start
cd ~/my_drupal/ ; docker-compose down
__________________________________________________________________________________________

No comments:

Post a Comment