Sophistree is a Chrome extension for mapping arguments.
This repository is a monorepo containing code for the Sophistree browser extension and the
tapestry-highlights
npm package which Sophistree uses.
See the READMEs in the respective subdirectories under packages
for details:
npm run check-all
: run all checks except for snapshot tests.npm run test-snapshots --workspace=packages/tapestry-highlights
: run snapshot tests.
npm install
npm run watch-all
Then load the extension unpacked from the packages/browser-extension/dist/dev/ folder.
cd infrastructure
aws-vault exec <profile> -- tofu apply
If you made changes to Terraform code and want to modify the dev env only first for testing:
aws-vault exec <profile> -- tofu apply -target=module.sophistree_dev[0]
ssh dev.sophistree.app
# Check the user-data.sh logs
less /var/log/cloud-init-output.log
# Check a docker container's logs
sudo docker logs sophistree-web-app
Before pushing, you must authenticate.
docker login -u sophistree
To deploy to dev environment (includes building and pushing images):
# Build/push the images and deploy them to dev using current package version
npm run build-and-deploy-dev
To deploy to production:
# Create a release and deploy the current package versions to prod
npm run release
The production deployment will:
- Create a GitHub release for the specified version
- Deploy the specified version to sophistree.app
sudo docker compose -f docker-compose.yml -f docker-compose.prod.yml run migrator npx prisma migrate reset
aws-vault exec <profile> -- aws s3 rm s3://sophistree-postgres-backups-dev --recursive
aws-vault exec <profile> -- aws s3 rb s3://sophistree-postgres-backups-dev
ssh-keygen -t ed25519 -m PEM -f ~/.ssh/sophistree-env