-
Notifications
You must be signed in to change notification settings - Fork 19
Home
Welcome to the orangehrm-dev-environment wiki!
Orangehrm-dev-environment is a development environment for OrangeHRM that is created using docker. This environment use three containers from orangehrm-dev-image, mysql-5.5-image and phpmyadmin-image. More information about each container can be found in their official docker-hub repositories. Please read carefully readme file provided for the repository.
- you can take a git clone (to recieve the latest code) or download the latest stable release.
- extract it anywhere you want. (make sure the prerequisites are available in your host machine)
- open terminal and go to the extracted directory.
- disable ports 80 and 443 if they are used by your localhost (or follow the guide for how to use both localhost and docker container ?)
- run the command
docker-compose up -d
- run
docker ps
and make suredev_web
,dev_mysql
anddev_phpmyadmin
containers are up and running. - access to phpmyadmin through browser (
localhost:9090
)
Note - For video tutorial click here
- get a checkout into the
ohrm_dev
directory - add a virtual host (follow the guide for how to create virtual host ? ) for your directory
- access from the browser (
https://vhost
) - continue the usual installation
For the environment, virtual hosts are automated (only for orangehrm system instances).Automated virtual host will be your main directory name. To use automated virtual hosts follow the below steps.
- your directory path should match to
/var/www/html/YOUR_DIR_NAME/symfony
in container. (here /var/www/html direcoty is ohrm_dev directory in host machine) - add the line
127.0.0.1 YOUR_DIR_NAME
to /etc/hosts in your host machine. - restart containers if needed (run
docker-compose restart
). - access from browser (
https://YOUR_DIR_NAME
)
In order to use localhost and docker container both at the same time you need to change the exposed ports of dev_web
container. By default dev_web
container exposes port 80 as 80 and port 443 as 443 to host machine.
As an example let's expose port 8080 instead of port 80 and expose port 7070 instead of port 443. To do this change the ports: section under dev_web key in docker-compose.yml .
change
ports:
- "443:443"
- "80:80"
to
ports:
- "7070:443"
- "8080:80"
Once changing the compose settings, docker compose should be restarted to get the changes applied.
docker-compose up -d
Now access from browser by typing https://vhost:7070
.
Note - please do not use the port 9090, since it is used by phpmyadmin container.
Change the mounted volume path of web root to your own directory under dev_web -> volumes key in docker-compose.yml.
change
volumes:
- ./ohrm_dev:/var/www/html
to
volumes:
- YOUR_DIR_PATH:/var/www/html
You can find all the configuration files in /config
folder. Configuration files related to apache, mysql-client, mysql-server and php are available in there. If you want, you can change them and make sure to restart containers after the changes.
Log files related to each containers and included software tools are located in /logs
directory. Also you can view container log by running docker logs <containerID>
.