Skip to content

Commit

Permalink
fix: Fix initial superuser setup (#460) (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
gromdimon authored Feb 7, 2024
1 parent 0f22245 commit 98e6d91
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ help:
@echo " test Run tests"
@echo " ci Install dependencies, run lints and tests"
@echo " docs Generate the documentation"
@echo " mksuperuser Create a superuser"
@echo " serve Run the (development) server"
@echo " jupyterlab Run jupyterlab"
@echo " celery Run celery"
Expand Down Expand Up @@ -89,6 +90,11 @@ ci: \
docs:
PYTHONPATH=$(PWD) pipenv run -- make -C ../docs clean html

.PHONY: mksuperuser
mksuperuser:
PYTHONPATH=. pipenv run python app/backend_pre_start.py
PYTHONPATH=. pipenv run python app/initial_data.py

.PHONY: serve
serve:
pipenv run uvicorn app.main:app --host 0.0.0.0 --port 8080 --reload --workers 8
Expand Down
2 changes: 2 additions & 0 deletions backend/app/initial_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

logging.getLogger("passlib.handlers.bcrypt").setLevel(logging.ERROR)


async def main() -> None:
logger.info("Creating initial data")
Expand Down

0 comments on commit 98e6d91

Please sign in to comment.