Task 2
An employee from the administration department has to create a small web presence. Since she has no programming experience and knows Drupal well, you decide to create a container version for her.
The content of the website should be stored in a MongoDB (No-SQL DB)!
Set up the system as follows:
Content Management System (CMS) and database as two separate containers
Connection of the containers by means of an own network
The data of the DB should be available on the host system
Install the CMS, DB and network manually first and document the necessary steps here!
Create a Docker compose file and document their work
Write instructions on how the employee can now start and operate the CMS
we tried this but this didn’t work
Step 1: Install Docker Make sure Docker is installed on your host system. Docker allows you to create and manage containers.
docker network create M169
Step 2: Create MongoDB container Create a MongoDB container to deploy the database. Run the following command:
docker run --name M169mongodb -p 27017:27017 --network M169 -e MONGO_INITDB_ROOT_USERNAME=admin -e MONGO_INITDB_ROOT_PASSWORD=pass123 -e MONGODB_DATABASE=“M169” -v C:\M169\MongoDB:/data/db -d mongo
Step 3: Create Drupal container Create a Drupal container to deploy the content management system. Run the following command:
docker run --name drupal --network M169 -p 8080:80 -v C:\M169\Drupal:/var/www/html/modules/custom -d drupal
Step 4: Drupal installation and configuration Open your web browser and go to the address “http://localhost:8080”. Follow the Drupal installation instructions and configure the required settings.