Skip to content

Commit

Permalink
Update postgres Makefile command
Browse files Browse the repository at this point in the history
Signed-off-by: Jono Yang <[email protected]>
  • Loading branch information
JonoYang committed Oct 17, 2023
1 parent 76cd5b3 commit 9a11606
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,14 @@ postgres:
${SUDO_POSTGRES} dropdb packagedb || true
@echo "-> Create 'packagedb' database"
${SUDO_POSTGRES} createdb --encoding=utf-8 --owner=packagedb packagedb
@$(MAKE) migrate
@echo "-> Create database user 'minecode'"
${SUDO_POSTGRES} createuser --no-createrole --no-superuser --login --inherit --createdb minecode || true
${SUDO_POSTGRES} psql -c "alter user minecode with encrypted password 'minecode';" || true
@echo "-> Drop 'minecode' database"
${SUDO_POSTGRES} dropdb minecode || true
@echo "-> Create 'minecode' database"
${SUDO_POSTGRES} createdb --encoding=utf-8 --owner=minecode minecode
#@$(MAKE) migrate

run:
${MANAGE} runserver 8001 --insecure
Expand Down

0 comments on commit 9a11606

Please sign in to comment.