loading...

re: Microservice in Python using FastAPI VIEW POST

FULL DISCUSSION
 

Major bugs:
(1) you need to initialize first de dabases in the "docker-compose.yml". Otherwise the services try to conect (in my case) to them without being initialize.
(2) change DATABASE_URL for DATABASE_URI here:
"""

~/python-microservices/movie-service/app/api/db.py

import os

from sqlalchemy import (Column, DateTime, Integer, MetaData, String, Table,
create_engine, ARRAY)

from databases import Database

DATABASE_URL = os.getenv('DATABASE_URL')
"""

 

And thanks indeed for the post.

code of conduct - report abuse