Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Docker is the new method to run the database. If you’re a returning developer and still have the old way, that’s ok, you can keep using it. This way is just easier to setup! (NOTE: If you have Windows and method 1 isn’t working, move on to method 2!!!)please migrate to docker, we will be unable to support using postgres now.

Method 1

  1. Install Docker

    1. Download Docker Desktop for your OS and install it following the default steps (there are a few weird steps for Windows so make sure to do those).

    2. After installation, restart your computer if required.

  2. Once Docker is setup go to the root directory of FinishLine and run yarn database:setup

  3. Go to your Docker desktop app and the container you just made should appear. If it says “running”, then everything is working!

Method 2 (for Windows users who can’t get Docker running)

  1. Go to https://www.postgresql.org/download/ and download Postgres

  2. Run the installer with all defaults except: uncheck “Stack Builder” on the list of things to install, and make your password “password” when prompted.

  3. Once it’s done, press the windows button and search for “psql” and open the thing called something like “psql command line”

  4. press enter for everything except password, where you should type “password” then press enter

  5. run CREATE DATABASE nerpm;

  6. go back to powershell and cd to the main folder of the repo, then cd to src/backend

  7. [Windows] run ni .env then Set-Content -Path .env 'DATABASE_URL="postgresql://postgres:password@localhost:5432/nerpm?schema=public"'If using Windows follow two more steps because Docker for Windows runs on WSL (Windows Subsystem for Linux):

    1. Install WSL by running wsl --install

    2. Setup wsl by launching ubuntu from the start menu

Initial Database Migration

...