This project is built on Drupal CMS version 10 to demonstrate the integration of an external API. It showcases the retrieval and display of hydrological and meteorological data. Additionally, Docker is employed for streamlined deployment.
Quick Start
-
Clone the Repository: Download the repository to your local machine using the following command:
git clone https://github.com/dundermave/imgw
-
Navigate to the Directory: Move into the project directory:
cd <project_folder>
-
Run Docker Compose: Use the following command to start the application with Docker Compose:
docker compose -f docker-compose.yml up
This command will build the necessary Docker images and containers. Once completed, the application will be accessible at
localhost:8080
, and PHPMyAdmin can be accessed atlocalhost:8081
.
To run internal commands inside the container, type:
docker exec -it imgw-mydrupal-1 bash
Install Drush using the following command:
composer require drush/drush && composer install
Execute the Drupal automatic installation:
echo 'yes' | drush site-install standard --db-url=mysql://user:userpassword@mymariadb:3306/imgw_db --account-name=admin --account-pass=admin --site-name="My IMGW website"
Activate the IMGW module and rebuild the cache for the application:
drush en imgw -y && drush cr
- Navigate through the Drupal automatic installation, providing the following database details:
- Database name:
imgw_db
- Database username:
user
- Database password:
userpassword
- Set the host to
mymariadb
.
-
Complete Configuration.
-
Enable IMGW Api Module: Navigate to extensions and activate the IMGW Api module.