From 7fe90f615ff5697e0317eab631c7f99ef3b511da Mon Sep 17 00:00:00 2001 From: Sean Morley Date: Thu, 18 Apr 2024 01:24:00 +0000 Subject: [PATCH] Add compose-dev.yml file and update startup.sh script --- compose-dev.yml | 13 +++++++++++++ startup.sh | 3 +-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 compose-dev.yml diff --git a/compose-dev.yml b/compose-dev.yml new file mode 100644 index 0000000..9a1b918 --- /dev/null +++ b/compose-dev.yml @@ -0,0 +1,13 @@ +services: + web: + build: . + ports: + - "3000:3000" + environment: + - DATABASE_URL= + # ORIGIN is only necessary when not using a reverse proxy or hosting that includes https + - ORIGIN=http://localhost:3000 + - SKIP_DB_WAIT=true + # Only necessary for externaly hosted databases such as NeonDB + volumes: + - ./sql:/sql diff --git a/startup.sh b/startup.sh index d136da4..ef4e7b9 100644 --- a/startup.sh +++ b/startup.sh @@ -29,10 +29,9 @@ run_sql_scripts() { echo "Starting AdventureLog" # Wait for the database to start up -if (!$SKIP_DB_WAIT); then +if [ -z "$SKIP_DB_WAIT" ] || [ "$SKIP_DB_WAIT" = "false" ]; then wait_for_db fi -wait_for_db # generate the schema # npm run generate