Usage
How to create a new console, handle seeding, migrations, create admin users, and configure environment variables from any terminal.
Create New Console
With the CLI installed, you can now create a new console. Follow the steps to configure your Console with your DATABASE_URL
. In your terminal, execute:
Make sure Docker is running!🐳
Behind the scenes, this will:
create a
docker-compose.yml
file in the current directory.launch your Console,
apply migrations to your specified database,
seed the database with examples (optional)
Database Migration & Seeding
Migrations
Migrate a specified database or the one set in your configuration.
Seeding
Seed a specified database.
IMPORTANT: Ensure the database is migrated before seeding.
Creating Admins
Interactive
Create an admin interactively (recommended):
Command Line
Create an admin using command line arguments:
Configuration Values
DATABASE_URL
The URL of the Postgres database to connect to.
NEXTAUTH_SECRET
The secret used by NextAuth.
NEXTAUTH_URL
The URL of the 2bttns app.
GITHUB_ID
The GitHub OAuth app ID, if you want to allow admin users to sign in via GitHub.
GITHUB_SECRET
The GitHub OAuth app secret that corresponds to your GITHUB_ID.
SERVER_LOG_LEVEL
The log level for the server.
SERVER_LOG_LOCALE
The log locale for the server.
Was this helpful?