Alpine Linux 3.18 VM running PostgreSQL 15 via Vagrant + QEMU (Apple Silicon compatible).
- 2 CPU cores, 4 GB RAM
- Alpine Linux 3.18 (ARM64)
- PostgreSQL 15 (SSL enabled, self-signed cert)
vagrant up # Start VM, provision PostgreSQL, open SSH tunnel
vagrant halt # Stop VM (dumps database to ./db/backup.sql first)
vagrant destroy # Delete VM (dumps database first)
vagrant ssh # SSH into the VMAfter vagrant up, an SSH tunnel forwards port 5432 to your localhost.
Host: localhost
Port: 5432
User: staging
Password: 12345678
Database: defaultdb
Connection string:
postgresql://staging:12345678@localhost:5432/defaultdb?sslmode=require
CLI:
psql -h localhost -U staging -d defaultdbIf the tunnel isn't running (check with lsof -i :5432), start it manually:
vagrant ssh -- -f -N -L 5432:localhost:5432The ./db/ directory is used for database backup persistence across VM rebuilds.
- On
vagrant haltorvagrant destroy, the database is automatically dumped to./db/backup.sql - On
vagrant up, if./db/backup.sqlexists, it is restored into the database