https://github.com/volny/flask-microservices
  
  
     
    https://github.com/volny/flask-microservices
  
        Last synced: 8 months ago 
        JSON representation
    
- Host: GitHub
 - URL: https://github.com/volny/flask-microservices
 - Owner: volny
 - Created: 2019-08-04T05:02:52.000Z (over 6 years ago)
 - Default Branch: master
 - Last Pushed: 2022-12-08T00:47:31.000Z (almost 3 years ago)
 - Last Synced: 2025-03-02T18:57:55.430Z (8 months ago)
 - Language: Python
 - Homepage:
 - Size: 117 KB
 - Stars: 1
 - Watchers: 2
 - Forks: 0
 - Open Issues: 8
 - 
            Metadata Files:
            
- Readme: README.md
 
 
Awesome Lists containing this project
README
          # following this presentation: 
consisting of 4 "microservices"
* Main 
* Users 
* Client 
* Swagger 
* Eval 
## Steps
### users db
* install users db: `docker-compose up -d --build users-db`  
  (or just install all services at once with `docker-compose up -d --build`)
* check if it worked `docker exec -ti users-db psql -U postgres -W`
### users app
* `docker-compose up -d --build users-service`
* start, seed, test
```sh
# create and seed the db
docker-compose run users-service python manage.py recreate_db
docker-compose run users-service python manage.py seed_db
# run unit and integration tests
docker-compose run users-service python manage.py test
```
### client
* build
```sh
# add env variable
export REACT_APP_USERS_SERVICE_URL=localhost
# build and run:
docker-compose up -d --build web-service
```
* test it works by visiting `http://localhost:9000`
### swagger
* `docker-compose up -d --build swagger`
* check the auto-generated docs at `http://localhost:8080/`