####OS X & Linux:
# Update Pip
pip install --upgrade pip --no-cache
# Install pipenv
pip install pipenv
# Install dependencies and Virtualenv based on Pipfile
pipenv install --deploy --ignore-pipfile
The service is Docker'zed. Below are the steps to build and run the Docker image.
# Below command builds the Docker image.
docker build . -f container/Dockerfile-dev -t simba:v1
# Below command runs the docker image on port 5000.
# Sets the SERVICE_ENV environment variable in Docker container.
# The value "dev" is used to take Development configuration.
docker run -p 5000:5000 --env-file ./env.dev PORT=5000 simba.io:v1
env.dev Sample
SERVICE_ENV=dev
REDIS_HOTS={redis_host}
REDIS_PORT={redis_port}
ELASTIC_SEARCH_HOST={es_host}
ELASTIC_SEARCH_port={es_port}
Run below commands to run the Microservice from shell script in background.
export SERVICE_ENV="dev" # Runs the application in Development configuration. Change to "qa" or "prod" based on environment.
export REDIS_HOTS={redis_host} # Cluster Host or Single Instance host
export REDIS_PORT={redis_port} # In case using single host
export ELASTIC_SEARCH_HOST={es_host} # Cluster Host pr Single instance Host
export ELASTIC_SEARCH_port={es_port} # In case using single host
chmod +x start.sh
nohup ./scripts/start.sh ${SERVICE_ENV} &
# Navigate to path /var/log/simba
cd /var/log/simba
# Gunicorn access logs path
tail -f /var/log/simba/access.log
# Application log path
tail -f /var/log/simba/application.log
# Find the docker CONTAINER_ID based on the Image tag: simba.io:v1
docker ps | grep "simba:v1" | cut -d" " -f1
# Access the docker shell
docker exec -it <CONTAINER_ID> /bin/sh
# Navigate to path /var/log/simba
cd /var/log/simba
# Gunicorn access logs path
tail -f /var/log/simba/access.log
# Application log path
tail -f /var/log/simba/application.log
//TODO
- 1.0.0 [[Unreleased]]
If you want to be a contributor please follow the below steps.
- Fork it (https://github.com/saurabh-slacklife/simba/fork)
- Create your feature branch (
git checkout -b feature/add-feature-xyz
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin feature/add-feature-xyz
) - Create a new Pull Request