FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

adminforth/dev-demo at main · devforth/adminforth · GitHub

Repository navigation

Latest commit

 

History

History

README.md

Starting the application

Install dependencies:

pnpm ci

Migrate the database:

pnpm run migrate:local

Start the server:

pnpm run dev

Changing schema

Open schema.prisma and change schema as needed: add new tables, columns, etc (See Prisma schema reference).

Run the following command to generate a new migration and apply it instantly in local database:

pnpm makemigration --name <name_of_changes>

Your colleagues will need to pull the changes and run pnpm migrate:local to apply the migration in their local database.

Deployment tips

You have Dockerfile ready for production deployment. You can test the build with:

# Generate a signing key once and keep it in your secret store (never commit it).
# On Windows without openssl: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
export ADMINFORTH_SECRET="$(openssl rand -hex 32)"

docker build -t dev-demo-image .
docker run -p 3500:3500 -e ADMINFORTH_SECRET="$ADMINFORTH_SECRET" -v $(pwd)/db:/code/db dev-demo-image

To set non-sensitive environment variables in production, use .env.prod file. For sensitive variables, use direct docker environment variables or secrets from your vault.

Documentation


Back | FazBrowse Home | New Git URL