Sample Project Overview
Introduction
This sample project showcases a Docker Compose stack comprising Metal Server and various Database Management System (DBMS) providers.
The stack comes preloaded with data, facilitating the execution and testing of diverse use cases.
The project has been tested on:
- CentOS 7
- Ubuntu 22
Stack Services
Here's an overview of the key services included in the stack:
Service Name | Description | Docker Image |
---|---|---|
metal | Metal Server | metal-server Dockerfile |
mdb-mflix | MongoDB | mongo:latest |
ms-hr | MS SQL Server 2019 | mcr.microsoft.com/mssql/server:2019-latest |
pg-northwind | PostgreSQL Server | postgres:latest |
pg-clubdata | PostgreSQL Server | postgres:latest |
pg-clubdata-bookings | PostgreSQL Server | postgres:latest |
pg-clubdata-members | PostgreSQL Server | postgres:latest |
pg-clubdata-facilities | PostgreSQL Server | postgres:latest |
azurite | Microsoft Azure Storage Azurite | mcr.microsoft.com/azure-storage/azurite:latest |
Databases
For each DBMS, the project includes specific databases with associated tables or collections:
Service Name | Database Name | Tables/Collections Names |
---|---|---|
mdb-mflix | mflix | movies, users, sessions, comments, theaters |
ms-hr | hr | regions, countries, locations, jobs, departments, employees, dependents |
pg-northwind | northwind | territories, order_details, employee_territories, us_states, customers, orders, employees, shippers, products, categories, suppliers, region, customer_demographics, customer_customer_demo |
pg-clubdata | clubdata | members, facilities, bookings, mflix_log |
pg-clubdata-members | clubdata | members |
pg-clubdata-facilities | clubdata | facilities |
pg-clubdata-bookings | clubdata | bookings |
Files
The project includes files to be used with File Data provider:
File Name | Storage | Content |
---|---|---|
colors.json | azurite (datacontainer1) | JSON data |
addresses.csv | azurite (datacontainer1) | CSV data |
Configuration File
The project includes a readily available configuration file for seamless setup. Configuration File
Prerequisites
Before delving into the sample project, ensure that your environment meets the following prerequisites:
- Docker 24+
- Git 2.42 or newer
Installation
Follow these steps to install the sample project:
Clone the sample project repository:
bashgit clone https://github.com/anismegdiche/metal-sample-project.git
Navigate to the project directory:
bashcd metal-sample-project
Change the permissions of the
install.sh
script:bashchmod +x *.sh
Run the installation script:
bash./install.sh
The stack will be up and ready after the installation process.
Verification
To ensure everything is set up correctly, run CRUD tests for each DBMS using the following command:
docker-compose exec metal npm run test-client
Congratulations! You have successfully configured and verified your Metal Server Sample Project.
For more use cases, please refer to the section Use cases