Skip to content

An useful solution to find the pharmacies closest to you

License

Notifications You must be signed in to change notification settings

gsaraceno92/pharmacies_finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pharmacies Finder

An useful solution to find the pharmacies closest to you

For now available only for Campania region.

Step to follow:


Installation

  • Clone the project as follow:

    git clone git@github.com:gsaraceno92/pharmacies_finder.git

  • Copy .env.example into .env

    Note: edit docker .env file only if build fail; that probably means that your user id (in ubuntu system) is different from this one. In this case update with your own id.


Setup

These are the instructions to follow to set up the project on your local environment.

  1. Build the Docker image

    docker-compose up --build -d
    
  2. Use docker image ls and docker container ls (or docker ps) to see your images and the running containers

  3. Enter into the container with

    docker exec -it finder_pharmacies bash
    

Starting and stopping containers

Once created, the containers can be started anytime with the following command:

`docker-compose -f up -d`

To stop the containers, use instead:

`docker-compose stop`

...continue

Sometimes Flask application could not reload automatically the changes (since the binding volume e the work type used to run the app); in this case just restart the container with docker-compose restart.

Note: the above commands must be used in the same folder of the project. If you want to use the commands anywhere use -f to specify the docker-compose file position, e.g.:

`docker-compose -f ./docker-compose.yml up -d`

Running tests

Run the files inside tests directory as follow:

`docker exec -it finder_pharmacies python3 tests/test_pharmacy.py`

Site

The app will run through http://localhost:5000. In particular you can visit http://localhost:5000/api/browse; here can be used the JSON-RPC method.

Use the method SearchNearestPharmacy to retrieve the nearest position to the location set by latitude and longituted in currentLocation parameter.

Define the range (in meters) in which you want to search and set the result size with the limit.

About

An useful solution to find the pharmacies closest to you

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published