Install git and clone the repo:
git clone https://github.com/SCE-Development/spartan-compass/- Install Docker:
If you are going to do the tutorial in the wiki, finish the tutorial before proceeding with steps 2 - 7
cp .env.example .envbun run db:startbun run db:generate(This command is only needed when database schema changes are made)bun run db:migratebun run db:seed
Run bun run db:studio to access the database at http://local.drizzle.studio
Warning
If you need to, never delete the files themselves as this will mess with Drizzle. You should instead run:
bun run db:dropbun install
Run bun dev to start the dev server at http://localhost:3000
The production compose file consists of the following parts ran in this order:
- db - postgres container
- migrator - runs drizzle migrator and can be manually used to scrape data
- app - the actual app container that runs nextjs
To start:
docker compose -f docker/compose.prod.yml upTo manually run the scraper once:
docker compose -f docker/compose.prod.yml run migrator bun run db:insertFor reference, see .env.example
Production requires the following changes:
DATABASE_URLneeds to be set to the postgres container instead of localhostNEXT_PUBLIC_SITE_URLneeds to be set tohttps://{domain}