GithubHelp home page GithubHelp logo

papasmile / api.aladhan.com Goto Github PK

View Code? Open in Web Editor NEW

This project forked from islamic-network/api.aladhan.com

0.0 0.0 0.0 79.63 MB

The AlAdhan API

License: GNU General Public License v3.0

PHP 99.74% Dockerfile 0.26%

api.aladhan.com's Introduction

بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ

CircleCI

AlAdhan API - api.aladhan.com

This repository powers the AlAdhan.com API on http://api.aladhan.com.

Technology Stack

Running the App

The api and all its dependencies are fully Dockerised. You just need docker and docker-compose to spin everything up.

You should enter your Google Maps API Key and Ask Geo Account ID and keys in the docker-compose file on lines 27, 28 and 29.

A production ready Docker image of the app is published as:

  • quay.io/islamic-network/api.aladhan.com on Quay
  • islamicnetwork/api.aladhan.com on Docker Hub

To get your own instance up, simply run:

docker-compose up

This will bring up several containers:

  1. aa-app - This is the actual PHP / Apache instance. This runs on https://localhost:7070 - see https://localhost:7070/v1/status.
  2. aa-db - This is the Percona DB Container.
  3. aa-memcached - This is the Memcached Container.
  4. aa-pma - PHPMYAdmin to acccess your Percona DB. This runs on https://localhost:7071. The default username and password are both 'aladhan'.
  5. aa-memadmin - PHPMemcachedAdmin to access your Memcached container. This runs on localhost:7074. The default username and password are both 'aa'

Build and Contribute

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 vesica/php72:latest line to vesica/php72:dev.

With the above docker-compose up command your code is mapped to the aa-app docker container. You can make any changes and simply refresh the page to see them in real-time.

Scaling and Sizing

This app takes 19 MB per apache process / worker and is set to have a maximum of 50 Apache workers.

A single instance should be sized with a maximum of 1152 MB RAM, after which you should scale it horizontally.

Contributing Code

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 Islamic Network Discord Server to discuss of the apps or APIs @ https://discord.gg/FwUy69M.

api.aladhan.com's People

Contributors

meezaan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.