MemoryHole is a database application for tracking arrestees arrested at political actions. It is built using the RedwoodJS framework
Note - the dev setup is not secure and should not be used with actual arrestee data
- Install
docker
+docker compose
- Install nvm
- cd postgres
echo "POSTGRES_PASSWORD=memoryhole" > ./postgres/.env.db
docker compose up -dV
- this will fetch the docker image, create a persistent data volume, and launch the database container
cd ../
nvm install $(cat .nvmrc)
corepack enable
- sets up yarn
yarn install
- install nodejs dependencies
cp .env.dev .env
- edit .env and replace
SEED_USER_NAME
,SEED_USER_PASSWORD
, andSEED_USER_EMAIL
with actual values echo SESSION_SECRET=$(yarn rw g secret --raw) >> .env
yarn rw prisma migrate dev
- initializes the database
yarn rw prisma db seed
- seed the db with the user/password set in the .env file
yarn rw dev
The app will start on http://localhost:8910/
, and you can log in using the email and password you set in .env
make sure you have a deploy.toml
file in the root directory with info about the deploy targets.
Deployments will deploy the code from github in the main
brach, so make sure to push and commit your changes
- to deploy to staging, run
yarn rw deploy baremetal staging
- to deploy to production, run
yarn rw deploy baremetal production
- you can restart deploys by ssh-ing to the server and running
pm2 restart [prod|stage]
(depending on which instance you want to restart) - you can see the current status with
pm2 status
- you can view logs view
pm2 logs [prod|stage]