This is an opensource SAAS licensing system.
This project uses Tern to migrate database schemas.
To install tern:
- git clone https://github.com/jackc/tern
- Then build tern and move it into
/usr/local/bin
or the mac equivilent. - Once installed you can run tern from the migrations directory, preferably one of the sub folders.
- Run
docker-compose up -d
- To login
psql -U postgres -h localhost -p 5432 postgres
use the username as the password. - In the PSQL command line run
CREATE DATABASE licensor_db;
- set the following environment variables (use the username as the password, replacing "CHANGEME" below):
export DB_HOST="localhost"
export DB_PASSWORD="CHANGEME"
export DB_USER="postgres"
export DB_PORT="5432"
export DB_DATABASE="licensor_db"
export MIGRATOR_USER="postgres"
export MIGRATOR_PASSWORD="CHANGEME"
cd migrations/licensor_db && tern migrate