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