Skip to content

orangehrm/orangehrm-os-dev-environment

Repository files navigation

OrangeHRM Open Source Development Environment

Docker build

Introduction

This project will facilitate inbuilt development environment for developers and testers

Technology

  • Docker
  • Docker compose
  • Nginx
  • PHP 5.6, PHP 7.0, PHP 7.1, PHP 7.2, PHP 7.3, PHP 7.4, PHP 8.0, PHP 8.1, PHP 8.2, PHP 8.3

Installation:

  1. Clone this project
  2. Copy the file .env.dist to .env and change (LOCAL_SRC) path to your project path
  3. update /etc/hosts file with following line Example:
127.0.0.1	php56 php70 php71 php72 php73 php74 php80 php81 php82 php83

Read the full guide here.

Note: All docker compose commands should run inside this project root directory

How to up/down containers

Up all containers

docker compose up -d

Up only development containers

docker compose up -d php-8.1 mysql57

Down all container

docker compose down

Stop all container

docker compose stop

Env information

PHP Version Host Start command
PHP 8.3 http://php83 $ bash ./scripts/php83
PHP 8.2 http://php82 $ bash ./scripts/php82
PHP 8.1 http://php81 $ bash ./scripts/php81
PHP 8.0 http://php80 $ bash ./scripts/php80
PHP 7.4 http://php74 $ bash ./scripts/php74
PHP 7.3 http://php73 $ bash ./scripts/php73
PHP 7.2 http://php72 $ bash ./scripts/php72
PHP 7.1 http://php71 $ bash ./scripts/php71
PHP 7.0 http://php70 $ bash ./scripts/php70
PHP 5.6 http://php56 $ bash ./scripts/php56

Config & Database

DB Host User Password
MySQL 5.5 mysql55 root root
MySQL 5.6 mysql56 root root
MySQL 5.7 mysql57 root root
MySQL 8.0 mysql80 root root
MySQL 8.1 mysql81 root root
MySQL 8.2 mysql82 root root
MariaDB 5.5 mariadb55 root root
MariaDB 10.0 mariadb100 root root
MariaDB 10.1 mariadb101 root root
MariaDB 10.2 mariadb102 root root
MariaDB 10.3 mariadb103 root root
MariaDB 10.4 mariadb104 root root
MariaDB 10.5 mariadb105 root root
MariaDB 10.6 mariadb106 root root
MariaDB 10.7 mariadb107 root root
MariaDB 10.8 mariadb108 root root
MariaDB 10.9 mariadb109 root root
MariaDB 10.10 mariadb1010 root root
MariaDB 10.11 mariadb1011 root root
MariaDB 11.0 mariadb110 root root
MariaDB 11.1 mariadb111 root root
MariaDB 11.2 mariadb112 root root

To use the command line clients provided by the containers you can use the following commands:

# MySQL
docker compose exec mysql55 mysql -u root -p"root"

# MariaDB
docker compose exec mariadb55 mysql -u root -p"root"

How to browse OrangeHRM

Note: Here PORT is either NGINX_PORT or NGINX_SSL_PORT which are defined in .env. When using NGINX_SSL_PORT as the PORT then URL should start with https instead of http.

Run commands in a running container

Execute in PHP 8.3:

docker compose exec php-8.3 bash
# OR
docker exec -it os_dev_php83 bash

Execute in PHP 8.2:

docker compose exec php-8.2 bash
# OR
docker exec -it os_dev_php82 bash

Execute in PHP 8.1:

docker compose exec php-8.1 bash
# OR
docker exec -it os_dev_php81 bash

Execute in PHP 8.0:

docker compose exec php-8.0 bash
# OR
docker exec -it os_dev_php80 bash

Execute in PHP 7.4:

docker compose exec php-7.4 bash
# OR
docker exec -it os_dev_php74 bash

Execute in PHP 7.3:

docker exec -it os_dev_php73 bash

Execute in PHP 7.2:

docker exec -it os_dev_php72 bash

Execute in PHP 7.1:

docker exec -it os_dev_php71 bash

Execute in PHP 7.0:

docker exec -it os_dev_php70 bash

Build Images

# Build all images
docker compose build
# OR only specific
docker compose build nginx

Legacy Services

Older containers have been moved to docker-compose-legacy-services.yml.

To run these containers, pass the file as an argument using -f

docker compose -f docker-compose-legacy-services.yml up -d php-7.1

About

Orangehrm open source development environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published