* first pass of hashing user emails
* use salt
* add a salt to .env.development (prod salt needs to be kept a secret)
* move `hashEmail` util to a new util module
* trigger a one-time job to migrate existing emails via the worker
so we can use the salt from an env var
* move newsletter signup
move newsletter signup to prisma adapter create user with email code path
so we can still auto-enroll email accounts without having to persist the email address
in plaintext
* remove `email` from api key session lookup query
* drop user email index before dropping column
* restore email column, just null values instead
* fix function name
* fix salt and hash raw sql statement
* update auth methods email type in typedefs from str to bool
* remove todo comment
* lowercase email before hashing during migration
* check for emailHash and email to accommodate migration window
update our lookups to check for a matching emailHash, and then a matching
email, in that order, to accommodate the case that a user tries to login
via email while the migration is running, and their account has not yet been migrated
also update sndev to have a command `./sndev email` to launch the mailhog inbox in your browser
also update `./sndev login` to hash the generated email address and insert it into the db record
* update sndev help
* update awards.csv
* update the hack in next-auth to re-use the email supplied on input to `getUserByEmail`
* consolidate console.error logs
* create generic open command
---------
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
Arrays for env_file are only supported in Docker Compose >=v2.24 which is too new (from January 2024). Most distros distribute older packages.
Since --env-file as defined in the sndev script acts as an override for env_file anyway, we can safely remove it here.
Co-authored-by: ekzyis <ekzyis@ekzy.is>
* Modified docker-compose.yml to include capture from /capture
Signed-off-by: Anis Khalfallah <khafallah.anis@hotmail.com>
* Update capture's container to include health checks via /health api
* refine capure docker service
---------
Signed-off-by: Anis Khalfallah <khafallah.anis@hotmail.com>
Co-authored-by: Anis Khalfallah <khafallah.anis@hotmail.com>
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
This makes it possible to continue to use lncli without --rpcserver inside the docker container even if the GRPC port exposed on the host machine is different.
This is the case on my machine since I am running a mainnet LND node on my machine so port 10009 is already used.
I could change the port to 20009 via LND_GRPC_PORT and STACKER_LND_GRPC_PORT (they can even have the same port) but then lncli inside the container needs to be aware of that which means that the sndev script would need to parse .env.development (or some other "magic") to know the GRPC port inside the container.
However, I decided that using standard ports inside the container is better to keep the sndev script simple at the cost of having to think about host vs container ports since they are different now.
One reason for that is that I think one even does not need to think about the host ports since they aren't even needed? But that's another topic.
* add containers for OpenSearch
* switch OpenSearch Dashboards to http
* add script to take care of index/mapping on first run
* limit mount in opensearch container to only the necessary scope
* handle both docker and non-docker dev setups
* cleanup
* make opensearch work in docker dev
---------
Co-authored-by: rleed <rleed1@pm.me>
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
* Parse image links during markdown rendering
* Use imgproxy to replace links
* Add healthcheck
See https://docs.imgproxy.net/healthcheck
* Enable WebP and animation support
* Only replace image URLs
* Replace all occurrences
* Fix creating posts with no text
* Embed image on link posts where link is image
---------
Co-authored-by: ekzyis <ek@stacker.news>