From 86c7e86ea3929b8f22c633fc8bdfa07688a6f98b Mon Sep 17 00:00:00 2001 From: Moritz Utcke <62291876+Letsmoe@users.noreply.github.com> Date: Thu, 8 Jun 2023 13:35:03 +0500 Subject: [PATCH] Update build.sh --- build.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 98d39a47..042fe538 100644 --- a/build.sh +++ b/build.sh @@ -25,5 +25,14 @@ docker stop $APP_NAME docker rm $APP_NAME docker build -t $APP_NAME . +# Create a persistent file storage +PERSISTENT_DIR="${HOME}/persistent/online-energieausweis"; +mkdir -p $PERSISTENT_DIR; + # Und starten unsere App wieder. -docker run -d --name $APP_NAME --link $DB_CONTAINER_NAME -p "$APP_PORT:80" -e DB_CONNECTION=postgresql://$DB_USER:$DB_PASSWORD@${DB_CONTAINER_NAME}:$DB_PORT/$DB_NAME -e DB_PORT=$DB_PORT $APP_NAME \ No newline at end of file +docker run -d --name $APP_NAME --link $DB_CONTAINER_NAME \ + -v "${PERSISTENT_DIR}:/persistent" \ + -p "$APP_PORT:80" \ + -e DB_CONNECTION=postgresql://$DB_USER:$DB_PASSWORD@${DB_CONTAINER_NAME}:$DB_PORT/$DB_NAME \ + -e DB_PORT=$DB_PORT \ + $APP_NAME;