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.
- 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.
Make sure mentioned prerequisites are there in your host machine.
- go to release tab and download the latest release.
- open terminal and go to the cloned directory
- run the command
docker-compose up -d
- run
docker ps
and make sure all the containers are up and running. - Your web root will be /ohrm_uat directory and make sure to put your project in that folder.
Note : Video Tutorial
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 |
- Get a checkout from svn to ohrm_uat directory (
svn checkout https://repos.orangehrm.com/enterprise/branch/eagle-core/
). - To get the named virtual hosts to work, add the project folder name to /etc/hosts file (
127.0.0.1 folderName
). - access from your browser (
https://folderName
). If you have changed the default port configuration in uat_web container then you can access usinghtttps://folderName
- 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
)
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)
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
- 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.
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.
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
- Can access a shell inside of any containers by running
docker exec -it <containerID or ContainerName> /bin/bash -c "TERM=$TERM; exec bash"
- Can restart containers using
docker-compose restart
- Can stop containers using
docker-compose stop
- 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>
) - Developer can find configurations for apache, php, mysql-client, mysql-server, etc from _/config directory.