feat: PRWLR-3989 add PostgreSQL to project (#10)

* feat: PRWLR-3989 add postgresql to project

* chore: PRWLR-3989 add requested changes to docker structure

* chore: PRWLR-3989 update poetry.lock
This commit is contained in:
Víctor Fernández Poyatos authored and GitHub committed 2024-07-11 10:39:09 -04:00
1 parent 157a54f30c
commit 9df759da60
7 files changed
+160 -14

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
#!/bin/sh
apply_migrations() {
echo "Applying database migrations..."
poetry run python manage.py migrate
}
start_dev_server() {
echo "Starting the development server..."
poetry run python manage.py runserver 0.0.0.0:8000
}
start_prod_server() {
echo "Starting the Gunicorn server..."
poetry run gunicorn -c backend/guniconf.py backend.wsgi:application
}
case "$1" in
dev)
apply_migrations
start_dev_server
;;
prod)
apply_migrations
start_prod_server
;;
*)
echo "Usage: $0 {dev|prod}"
exit 1
;;
esac