Database Setup

Create the PostgreSQL user and database.

Create a PostgreSQL user and database:

sudo -u postgres psql <<'SQL'
CREATE USER library WITH PASSWORD 'your_secure_password';
CREATE DATABASE library OWNER library;
GRANT ALL PRIVILEGES ON DATABASE library TO library;
SQL

Note: Replace your_secure_password with a strong password. You'll use this in the .env file.