fix(be-start): ensure that app + db are networked correctly

This commit is contained in:
Marc 2023-12-27 20:51:10 -05:00
parent a90bfdea4c
commit 1648e09955
Signed by: marc
GPG key ID: 048E042F22B5DC79

View file

@ -1,12 +1,15 @@
#!/bin/bash
docker network create rotini-local || echo "Network already exists"
docker run \
--name $DB_CONTAINER_NAME \
-e POSTGRES_PASSWORD=$DATABASE_PASSWORD \
-e POSTGRES_USER=$DATABASE_USER \
-e POSTGRES_DB=$DATABASE_NAME \
-e POSTGRES_PASSWORD=$DB_PASSWORD \
-e POSTGRES_USER=$DB_USER \
-e POSTGRES_DB=$DB_NAME \
-v $DATABASE_STORAGE_PATH:/var/lib/postgresql/data \
-p 5432:5432 \
--network rotini-local \
-d \
postgres:15.4
@ -20,4 +23,5 @@ docker run \
--publish 8000:8000 \
--name $APP_CONTAINER_NAME \
--env-file ../backend.env \
--network rotini-local \
rotini:dev