This directory contains all Docker-related configuration files for the Better Auth Backend project.
docker/
├── docker-compose.yml # PostgreSQL + Adminer services configuration
├── postgres/
│ ├── init.sql # Database initialization script
│ └── scripts/ # Additional SQL scripts (optional)
└── README.md # This file
- PostgreSQL 15: Main database server
- Adminer: Lightweight web-based database management tool
# Start PostgreSQL + Adminer
docker compose -f docker/docker-compose.yml up -d
# Stop all services
docker compose -f docker/docker-compose.yml down
# Remove data volumes (fresh start)
docker compose -f docker/docker-compose.yml down -vcd docker
# Start all services
docker compose up -d
# Stop all services
docker compose downAccess URL: http://localhost:8080
Login Credentials:
- System: PostgreSQL
- Server:
postgres - Username:
app_user - Password:
app_password - Database:
app_db
Features:
- Browse all Better Auth tables (
user,session,account,verification) - Run SQL queries
- Export/import data
- View table structures and relationships
postgres/init.sql: Creates Better Auth schema tables automaticallypostgres/scripts/: Additional SQL scripts run in alphabetical order- One-Time Setup: Initialization only runs when data volume is empty
- 5432: PostgreSQL database server
- 8080: Adminer web interface
The following environment variables are used:
POSTGRES_DB: app_dbPOSTGRES_USER: app_userPOSTGRES_PASSWORD: app_password
These match the configuration in your .env file.
The PostgreSQL container includes a health check that verifies the database is ready before your application connects.
postgres_data: Persistent storage for database data- Init Scripts: Mounted from
./postgres/directory
app_network: Isolated network for the application services