Skip to content

Latest commit

 

History

History
55 lines (37 loc) · 1.03 KB

database.md

File metadata and controls

55 lines (37 loc) · 1.03 KB

Database

Follow this if want to run the database in a local container with Docker and Docker Compose.

Docker

Install and setup Docker on your system.

Docker Compose

Setup .env to contain these and change them as needed:

POSTGRES_ROOT_PASSWORD=the_root_password
POSTGRES_USER=the_user
POSTGRES_PASSWORD=the_password
POSTGRES_DATABASE=bandungdev
POSTGRES_HOST_PORT=5432
POSTGRES_CONTAINER_PORT=5432

Start Docker service.

Run Docker Compose up.

docker-compose up

If everything is fine, exit and run it again in detached mode.

docker-compose up -d

Push the schema to it.

bun db:push

Seed initial data

bun db:seed

Database Backup and Restore

🚧