A Project Management app built with Remix 💿
This project uses Docker to run a Postgres database and Prisma to bootstrap its tables and query the data. Before moving forward you'll need to install and run Docker. Prisma is installed locally in the project's npm dependencies.
- Download this directory, then
cd
into the project directory:
cd pm-app
- Copy
.env.example
to create a new file.env
:
cp .env.example .env
- Copy
docker-compose.example.yml
to create a new filedocker-compose.yml
:
cp docker-compose.example.yml docker-compose.yml
- Create a username and password for your database in
docker-compose.yml
. You can use any values you want here. For example:
environment:
- POSTGRES_USER=chance
- POSTGRES_PASSWORD=yolo2022
- Use the same username and password values to confingue your database URL in
.env
. See the Prisma guide for PostgreSQL for more information.. For example:
DATABASE_URL="postgresql://chance:yolo2022@localhost:5432/pm-app?schema=public"
NOTE: in a real app you wouldn't want the database URL and username/password to be committed to your repository. Those should be environment variables set via your hosting provider's dashboard/cli.
- Install the project's dependencies with npm:
npm install
- Make sure Docker is running (I like to use Docker Desktop). Once it's up, run the
db:start
script:
npm run db:start
- Run the
db:reset
script to setup the project's database.
npm run db:reset
NOTE: If you update the database schema, you'll need to run
npm run db:update
to update the tables.
- Run the dev server to start your app on
http://localhost:3000
:
npm run dev