We're a place where coders share, stay up-to-date and grow their careers.
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: """
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.
Helped me, a lot, thanks
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.
Helped me, a lot, thanks