One-time startup:
docker run -d --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=pass postgres
echo 'localhost:5432:postgres:postgres:pass' >> ~/.pgpass
chmod go-rwx ~/.pgpass
pip install psycopg2
After this you just have to run docker start postgres
to start it (e.g. after rebooting your laptop).
The SQLAlchemy URL in conf/development.ini
should be:
sqlalchemy.url: postgresql://postgres:pass@localhost/postgres
To connect to the PostgreSQL database with psql:
sudo apt-get install postgresql-client
psql -h localhost -d postgres -U postgres