This is the code you see deployed on https://aladhan.com. This documentation explains how you can get setup to deploy your own instance and contribute code.
The app is fully Dockerised. You just need docker to spin it up.
A production ready Docker image of the app is published as:
To get your own instance up, simply run:
docker run -it -p 8082:8080 ghcr.io/islamic-network/aladhan.com:latest
You can now visit http://localhost:8082/ and start using it.
Please note that the Dockerfile included builds a production ready container which has opcache switched on and xdebug turned off, so you will only see your changes every 5 minutes if you are developing. To actively develop, change the FROM ghcr.io/islamic-network/php:8.0-apache
line to ghcr.io/islamic-network/php:8.0-apache-dev
.
docker build . -t ghcr.io/islamic-network/aladhan.com
. This will build an image with production dependencies only.docker run -it -p 8081:8080 -v $(pwd)/.:/var/www ghcr.io/islamic-network/aladhan.com
to spin up the built image.composer install
to add development dependencies.This app takes 37 MB per apache process / worker and is set to have a maximum of 10 Apache workers.
A single instance should be sized with a maximum of 400 MB RAM, after which you should scale it horizontally.
Build the container and run:
docker run -p 8080:8080 -v $(pwd)/.:/var/www -e API_BASE_URI=http://host.docker.internal --add-host=host.docker.internal:host-gateway <<containername>>
You can contribute code by raising a pull request.
There's a backlog of stuff under issues for things that potentially need to be worked on, so please feel free to pick something up from there or contribute your own improvements.
You can also join the community at https://community.islamic.network/ or the Islamic Network Discord Server to discuss any of the apps or APIs @ https://discord.gg/FwUy69M.