Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/edmartt/workorders

Microservice for handling work orders and when are done send event through Redis streams
https://github.com/edmartt/workorders

docker docker-compose openapi openapi3 postgres postgresql python python3 redis sql sqlalchemy swagger swagger-ui

Last synced: about 1 month ago
JSON representation

Microservice for handling work orders and when are done send event through Redis streams

Awesome Lists containing this project

README

        

# work orders

## Requirements

- Python 3.11
- PostgreSQL
- Docker
- Redis

Work order REST API

## Running Development Version With Flask

1. Clone the repo:

```
git clone https://github.com/Edmartt/WorkOrders.git
```

2. Browse into the project directory

```
cd WorkOrders/
```

3. Create a virtual environment

```
python -m venv
```

4. Activate the virtual environment

```
source /bin/activate
```

5. Install dependencies
```
pip3 install -r requirements
```

6. Set the environment variables following the envrc.example file here ![.envrc.example](https://github.com/Edmartt/WorkOrders/blob/dev/.envrc.example)

```
source .envrc
```

#### Note

Remember to set a .env file for docker-compose ![env.example](https://github.com/Edmartt/WorkOrders/blob/dev/env.example) and run `docker-compose up -d` for creating a postgres instance

7. Migrations

We need migrations for our data models

```
flask db upgrade
```

8. Run with

```
flask run
```

#### Note

For requesting the api docs after running the project just go to `/api/docs`