A dockerized Flask GraphQL API that provides information about countries of the world. A modified version (in a private repo) that powers Countries Browser has been deployed to AWS (ECS, ECR, EC2) via github actions.
Application provides the following features:
- Filter countries based on regions - Africa, Europe, America e.t.c
- Search for country
- View country details
Development:
- Install Docker
- Install Docker-Compose
Clone the repository
git clone https://github.com/eseerigha/countries-api.git
Configure environment variables
Create a env.dev file in the application root
Add configs specified in the environment variables of docker-compose services to the env.dev file such as the example below
MONGO_HOST=<insert value>
Development Environment:
Setup Authentication keys to enable secure connection between ElasticSearch and Kibana,Logstash
docker-compose --f docker-compose.setup.yml --env-file env.dev run --rm keystore
docker-compose --f docker-compose.setup.yml --env-file env.dev run --rm certs
Run services
docker-compose --f docker-compose.yml --env-file env.dev up --build
Load data via POST REQUEST
HEADERS = {Authorization: <auth token from dev.env config>}
http://localhost:500/country/data/load
View API Schema
http://localhost:500/graphql
This project is licensed under the MIT License - see the LICENSE.md file for details