Skip to content

lewisemm/vistagrid-backend-k8

Repository files navigation

codecov

Getting Started

Building The Images

To run the entire app on docker, first build the user_service and image_service images.

docker-compose -f docker-compose.yml -f deployment/docker/docker-compose-imageservice.yml -f deployment/docker/docker-compose-userservice.yml build

Running The App

The following command will get user_service, image_service and their dependent images started.

docker-compose -f docker-compose.yml -f deployment/docker/docker-compose-imageservice.yml -f deployment/docker/docker-compose-userservice.yml up

Prerequisite Setup

Database Migrations

Apply migrations for the user_service by running the following command.

docker exec user_service flask db upgrade

Apply migrations for the image_service by running the following command.

docker exec image_service python manage.py migrate

Celery Workers

Start the Celery workers in detached mode to handle asynchronous tasks.

docker exec -d image_service celery -A image_service worker -l INFO

Using The App

  1. Creating Users

    curl -X POST http://localhost:5000/api/user -H "Content-Type: application/json" -d '{"username":"joe", "password":"joepassword"}'
  2. Obtaining User JWT

    curl -X POST http://localhost:5000/api/user -H "Content-Type: application/json" -d '{"username":"joe", "password":"joepassword"}'
    # example response
    {"access_token": <token string>}

Docs

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages