POSTGRES_PASSWORD=change_this
POSTGRES_USER=change_this
POSTGRES_DB=change_this
IP_ADDRESS="http://localhost"
- Download Docker Desktop
- Run
docker compose up -dordocker-compose up -dfrom the root directory to start the server, database, and interface. - To use the terminal for the server, run
docker exec -it server sh. - Inside the server terminal, run
npx prisma studioto view the database studio ornpx prisma db push --force-reset && npx prisma db seed src/sample.txtto import the sample file.
- All commands to interact with the database should be run inside the docker server terminal
docker exec -it server sh
- To quickly reset and update the database with a new file:
- Run
npx prisma db push --force-reset && npx prisma db seed [filename]with [filename] being the path to the file containing the new firewall rule configs.
- Run
- To update the database with a valid file (More resource intensive when running on AWS. Higher chance of overloading the EC2 instance.):
- Run
npx ts-node src/processConfig.ts -o src/owners.csv -f [filename]with [filename] being the path to the file containing the updated firewall rule configs.
- Run
- To view the database:
- Run
npx prisma studioand navigate to [host]:5555
- Run