Skip to content

Commit

Permalink
Add service support for MongoDB
Browse files Browse the repository at this point in the history
Update Dockerfile to include MongoDB dependency
  • Loading branch information
NeonDaniel committed Nov 6, 2024
1 parent a50cf2d commit 8d692b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ RUN apt-get update && \

ADD . /neon_users_service
WORKDIR /neon_users_service
RUN pip install .[mq]
RUN pip install .[mq,mongodb]

CMD ["neon_users_service"]
3 changes: 3 additions & 0 deletions neon_users_service/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ def init_database(self) -> UserDatabase:
if module == "sqlite":
from neon_users_service.databases.sqlite import SQLiteUserDatabase
return SQLiteUserDatabase(**module_config)
elif module == "mongodb":
from neon_users_service.databases.mongodb import MongoDbUserDatabase
return MongoDbUserDatabase(**module_config)
# Other supported databases may be added here

@staticmethod
Expand Down

0 comments on commit 8d692b1

Please sign in to comment.