Skip to content

orangehrm/orangehrm-test-environment

Repository files navigation

OrangeHRM TEST Environment for PHP 7.1

Docker Automated Docker Status Docker Pulls Build Status

Introduction

orangehrm-test-environment is a dockerized Test environment for OrangeHRM. Usually it will take hours to configure and prepare the uat environment for OrangeHRM system. This project will save the support engineers / deployment time.

This environment will depends on containers of orangehrm-uat-image,mysql and phpmyadmin.

Prerequisites

  • Docker engine installed.(Get docker)
  • Minimum docker version 17.3
  • Minimum docker-compose version 1.12
  • Disable ports 443 and 8443 if they are used by localhost.

How to use ?

Make sure mentioned prerequisites are there in your host machine.

  1. go to release tab and download the latest release.
  2. open terminal and go to the cloned directory
  3. run the command docker-compose up -d
  4. run docker ps and make sure all the containers are up and running.
  5. Your web root will be /ohrm_uat directory and make sure to put your project in that folder.

Note : Video Tutorial

Containers

Container Name Service Name in docker-compose.yml Description IP Address Used Ports
test_web web PHP 5.6 10.5.0.2 443
test_mysql db MySQL 5.5 10.5.0.3 3306
test_phpmyadmin phpmyadmin phpMyAdmin 10.5.0.4 9090

Install orangehrm eagle-core inside the container

  1. Get a checkout from svn to ohrm_uat directory (svn checkout https://repos.orangehrm.com/enterprise/branch/eagle-core/).
  2. To get the named virtual hosts to work, add the project folder name to /etc/hosts file (127.0.0.1 folderName).
  3. access from your browser (https://folderName). If you have changed the default port configuration in uat_web container then you can access using htttps://folderName
  4. Continue installation by installing system as normal way. (you can have access to inside of uat_web_56 container by running the command docker exec -it uat_web_56 bash)

Default configurations

Developer can override the default configurations if they want by simply adding a docker-compose.override.yml file.It is better to have some knowledge on docker-compose file. (docker-compose file reference)

Default configurations in uat_web container

ports:
  - "443:443"
volumes:
  - ./ohrm_dev:/var/www/html
  - ./config/php5/apache2/php.ini:/etc/php5/apache2/php.ini
  - ./config/php5/cli/php.ini:/etc/php5/cli/php.ini
  - ./config/mysql-client:/etc/mysql
  - ./config/apache2/sites-available:/etc/apache2/sites-available
  - ./config/apache2/cert:/etc/apache2/cert
  - ./logs/web_logs/55:/var/log/apache2
  - /etc/localtime:/etc/localtime
  - ./config/xhgui/config.php:/usr/local/src/xhgui/config/config.php

Example - Overriding port and web root

  • Sets apache port to 8080
  • Changes web root directory to /home/john/web (from default of ./ohrm_dev)
services:
  web56:
    ports:
      - "8080:443"
    volumes:
      - /home/john/web:/var/www/html

If you want to change any default apache or php configurations you can find them under /config folder.

Default configurations in uat_mysql container

expose:
  - "3306"
volumes:
  - ./config/mysql-server:/etc/mysql
  - ./logs/mysql_logs:/var/log
  - /etc/localtime:/etc/localtime
  - mysql:/var/lib/mysql
environment:
  MYSQL_ROOT_PASSWORD: 1234

You can change exposed port as mentioned in uat_web_55 container configuration. For more information about this container refer into mysql official image.

Default configurations in uat_phpmyadmin container

volumes:
  - /etc/localtime:/etc/localtime
links:
  - db
ports:
  - "9090:80"
environment:
  PMA_HOST: db

More about phpmyadmin container can find in docker hub phpmyadmin image

Additional information

  1. Can access a shell inside of any containers by running docker exec -it <containerID or ContainerName> /bin/bash -c "TERM=$TERM; exec bash"
  2. Can restart containers using docker-compose restart
  3. Can stop containers using docker-compose stop
  4. Developer can find log files for each container from /logs directory. ( Also possible to get logs of containers by running the command docker logs <container ID>)
  5. Developer can find configurations for apache, php, mysql-client, mysql-server, etc from _/config directory.

About

Dockerized Test environment for OrangeHRM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published