Difference between revisions of "System Architecture"
Jump to navigation
Jump to search
Line 17: | Line 17: | ||
#* '''rho-administrator:''' Adminer container for managing the MySQL Database. It can as well be used to manage the postgreSQL DB | #* '''rho-administrator:''' Adminer container for managing the MySQL Database. It can as well be used to manage the postgreSQL DB | ||
# Folder/File Structure | # Folder/File Structure | ||
+ | #* db folder: This folder houses all the files needed by the various databases | ||
+ | #* src folder: This contains the ERP Web root folders as well as the yuicompressor jar file[[File:Folder Structure for Rhomicom Docker Compose.png|alt=Folder Structure for Rhomicom Docker Compose|border|thumb|Folder Structure for Rhomicom Docker Compose]] | ||
# Sample Docker Compose File | # Sample Docker Compose File | ||
+ | #* <syntaxhighlight lang="docker"> | ||
+ | # MediaWiki with MariaDB | ||
+ | # | ||
+ | # Access via "http://localhost:9002" | ||
+ | # (or "http://$(docker-machine ip):8080" if using docker-machine) | ||
+ | version: "3" | ||
+ | services: | ||
+ | mediawiki: | ||
+ | image: mediawiki | ||
+ | restart: always | ||
+ | container_name: rho-wiki | ||
+ | ports: | ||
+ | - 9002:80 | ||
+ | volumes: | ||
+ | # After initial setup, download LocalSettings.php to the same directory as | ||
+ | # this yaml and uncomment the LocalSettings line and use compose to restart | ||
+ | # the mediawiki service | ||
+ | - /var/www/html/images | ||
+ | #- ./LocalSettings.php:/var/www/html/LocalSettings.php | ||
+ | links: | ||
+ | - database | ||
+ | logging: | ||
+ | driver: "json-file" | ||
+ | options: | ||
+ | max-size: "5m" | ||
+ | max-file: "5" | ||
+ | networks: | ||
+ | - nt1 | ||
+ | database: | ||
+ | image: mariadb | ||
+ | restart: always | ||
+ | container_name: rho-wikidb | ||
+ | volumes: | ||
+ | - mysql:/var/lib/mysql | ||
+ | - backup:/var/lib/backup | ||
+ | environment: | ||
+ | # @see https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/DefaultSettings.php | ||
+ | MYSQL_DATABASE: my_wiki | ||
+ | MYSQL_USER: wikiuser | ||
+ | MYSQL_PASSWORD: example | ||
+ | MYSQL_RANDOM_ROOT_PASSWORD: "yes" | ||
+ | logging: | ||
+ | driver: "json-file" | ||
+ | options: | ||
+ | max-size: "5m" | ||
+ | max-file: "5" | ||
+ | networks: | ||
+ | - nt1 | ||
+ | networks: | ||
+ | nt1: | ||
+ | |||
+ | |||
+ | </syntaxhighlight> |
Revision as of 20:45, 5 December 2020
Direct Installation Architecture
- Folder/File Structure
- Web Root Folder (e.g. /var/www/html or /usr/share/nginx/html)
- Database Directory (e.g. /opt/apache/adbs)
- Database Schemas
- Code Executions (Client Javascript to Server PHP)
- Code execution always starts from the client making a request via a javascript ajax call. All client requests are processed first by index.php file and subsequently forwarded to the appropriate php file for execution
Docker Container Architecture
- Container Images
- rho-nginx: This is the container that hosts the web root files and folders. It runs nginx web server on port 8000 and serves the ERP web files. It has php7.4 installed. It is based on the rhomicom/rho-erp-base:v1.2 image on docker hub. Its root folder /usr/share/nginx/html is mounted to the local directory src/RHO_ERP_WEB. It also mounts the local DB Directory folder db/db_dirs/ to /opt/apache
- rho-api: This container contains an installation of NodeJS, expressJS, Java and Chromium Browser. It's main purpose is to make availble apis that can be called by the application running on rho-nginx to execute specific tasks in the background and serve the output back to rho-nginx container. It mounts the local DB Directory folder db/db_dirs/ to /opt/apache
- rho-pgdb: The postgreSQL v12.4 container that houses the database behind the rhomicom erp system
- rho-redis: The redis server container used by the rho-nginx container to handle all php caching and session handling
- rho-mysqldb: The MySQL 5.7 container for the biometric (fingerprint) database behind the rhomicom banking solution
- rho-pgadmin: pgAdmin4 container for managing the postgreSQL database
- rho-administrator: Adminer container for managing the MySQL Database. It can as well be used to manage the postgreSQL DB
- Folder/File Structure
- db folder: This folder houses all the files needed by the various databases
- src folder: This contains the ERP Web root folders as well as the yuicompressor jar file
- Sample Docker Compose File
# MediaWiki with MariaDB # # Access via "http://localhost:9002" # (or "http://$(docker-machine ip):8080" if using docker-machine) version: "3" services: mediawiki: image: mediawiki restart: always container_name: rho-wiki ports: - 9002:80 volumes: # After initial setup, download LocalSettings.php to the same directory as # this yaml and uncomment the LocalSettings line and use compose to restart # the mediawiki service - /var/www/html/images #- ./LocalSettings.php:/var/www/html/LocalSettings.php links: - database logging: driver: "json-file" options: max-size: "5m" max-file: "5" networks: - nt1 database: image: mariadb restart: always container_name: rho-wikidb volumes: - mysql:/var/lib/mysql - backup:/var/lib/backup environment: # @see https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/DefaultSettings.php MYSQL_DATABASE: my_wiki MYSQL_USER: wikiuser MYSQL_PASSWORD: example MYSQL_RANDOM_ROOT_PASSWORD: "yes" logging: driver: "json-file" options: max-size: "5m" max-file: "5" networks: - nt1 networks: nt1: