Install OrangeHRM on Oracle Cloud

Install OrangeHRM on Oracle Cloud

This guide will install OrangeHRM Starter Edition on Oracle Cloud Compute and setup a custom domain for it.

This gives a powerful HRM platform for business HR functions

  1. Create a Compute Instance using this guide

  2. Install Docker & Docker Compose using this guide

  3. Log on to the compute box and create folders

     mkdir -p docker/orangehrm
     cd docker/orangehrm
    
  4. Create a new docker-compose.yml

     nano docker-compose.yml
    
  5. Modify this file specifically change the Pab!oPassM@ster passwords (its in two places). However you're welcome to use this password if you like 😉

     version: "3.3"
     services:
       orangehrm:
         image: orangehrm/orangehrm:latest
         restart: unless-stopped
         ports:
           - "8200:80"
           - "8243:443"
         environment:
           - ORANGEHRM_DATABASE_HOST=mariadb
           - ORANGEHRM_DATABASE_USER=orangehrmuser
           - ORANGEHRM_DATABASE_PASSWORD=Pab!oPassM@ster
           - ORANGEHRM_DATABASE_NAME=orangehrm
           - PUID=998
           - PGID=100
         volumes:
           - ./orange:/orangehrm
         depends_on:
           - mariadb
         links:
           - mariadb:mariadb      
    
       mariadb:
         image: mariadb:10.2
         restart: unless-stopped
         volumes:
           - ./db_orange:/var/lib/mysql
         environment:
           - MYSQL_ROOT_PASSWORD=Pab!oPassM@ster
           - MYSQL_ROOT_USER=root
           - MYSQL_DATABASE=orangehrm
    
  6. Paste the file into nano and CTRL+X to save and quit

  7. Compose the file (it'll take 1-mins) using the command below

     docker-compose up -d
    

    It'll look like this

     [opc@holamundo orangehrm]$ docker-compose up -d
     [+] Running 30/30
      ✔ mariadb 12 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                                                                                                                                                                                                           27.3s
        ✔ 22c5ef60a68e Pull complete                                                                                                                                                                                                                                                                                                                                                       3.7s
        ✔ 0ee278c19a4a Pull complete                                                                                                                                                                                                                                                                                                                                                       3.7s
     ...                                                                                                                                                                                                                                                                                                                                                      5.5s
      ✔ orangehrm 16 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                                                                                                                                                                                                     32.8s
        ✔ 0e0969fcaa82 Pull complete                                                                                                                                                                                                                                                                                                                                                       0.8s
        ✔ 1ff5e264c017 Pull complete                                                                                                                                                                                                                                                                                                                                                       0.4s
     ...                                                                                                                                                                                                                                                                                                                                                    3.6s
     [+] Building 0.0s (0/0)                                                                                                                                                                                                                                                                                                                                                     docker:default
     [+] Running 3/3
      ✔ Network orangehrm_default        Created                                                                                                                                                                                                                                                                                                                                           0.9s
      ✔ Container orangehrm-mariadb-1    Started                                                                                                                                                                                                                                                                                                                                           0.1s
      ✔ Container orangehrm-orangehrm-1  Started
    
  8. Check the docker containers are running

     docker ps --filter "name=orangehrm*"
    

    It should show

     CONTAINER ID   IMAGE                        COMMAND                  CREATED              STATUS              PORTS                                                                            NAMES
     098eb5436d58   orangehrm/orangehrm:latest   "docker-php-entrypoi…"   About a minute ago   Up About a minute   0.0.0.0:8200->80/tcp, :::8200->80/tcp, 0.0.0.0:8243->443/tcp, :::8243->443/tcp   orangehrm-orangehrm-1
     f0afb3064bed   mariadb:10.2                 "docker-entrypoint.s…"   About a minute ago   Up About a minute   3306/tcp                                                                         orangehrm-mariadb-1
    

    Write down the NAME of the mariadb, in my case its orangehrm-mariadb-1 (we'll need this later).

  9. Open the following ports using this guide

    • 8200

    • 8243

    • 3306

  10. Log in to your Domain Administration (I'm using CloudFlare) and add an A to the IP of your NGINX Proxy Manager - setup guide here

  11. Log in to your NGINX Proxy Manager Dashboard and add a proxy host. Type in the Domain Name you added to you Domain Registration and the IP of your NPM box.

    Also select your SSL certificate on the SSL tab. I'm using my 15 year CloudFlare one.

  12. Visit the sub domain and you should be good to go

  13. Click Fresh Install > Next

  14. Read the license agreement. Come on.... its not long

  15. If you decide to accept the license, then click to Accept the Terms in the License Agreement and click next

  16. Select Existing Empty Database and complete the Database Configuration as per the picture below. Note the Database Host Name is the name of the mariadb container name you made a note of earlier. The DB Name, User and Password are the 3 values at the bottom of thedocker-compose.yamlfile - scroll up this blog to find them.

  17. Check everything is green and click Next

  18. Enter your Organization Name. Sorry no English (United Kingdom) here, so you have to pick another English variant.

  19. Enter the Admin details on the next page and remember to unselect the register your system with OrangeHRM - see picture below

  20. On the next page, confirmation, click Install and this will just take a minute

  21. Click Launch OrangeHRM

  22. Enter the Admin Username & Password you just created during the wizard

  23. Enjoy

Mobile App

When you download the OrangeHRM’s mobile app it gives you the ability to apply for Leave, Complete Timesheets & more. Download the apps here

  • android

  • ios

  • Download APK

Enjoy!

What's the picture? Its the Statues on the roof of Victoria Shopping Center, Harrogate. Visit Yorkshire!

Credits:
https://wiki.opensourceisawesome.com/books/open-source-personnel-management/page/install-and-configure-orangehrm

https://www.youtube.com/watch?v=FWS7KH7os2Y