Fork me on GitHub
Ivar Refsdal07:09:35

TIL that you can instruct docker-compose to fail if there are undefined or empty environment variables: ${VARIABLE:?err} exits with an error message containing err if VARIABLE is unset or empty in the environment. ${VARIABLE:err} exits with an error message containing err if VARIABLE is unset in the environment. Example:

    container_name: postgres
    image: postgres:13.2
The console output will be something like the following if the variable is not set or empty:
invalid interpolation format for services.postgres.environment.POSTGRES_PASSWORD.
You may need to escape any $ with another $.
required variable POSTGRES_PASSWORD is missing a value: Please set POSTGRES_PASSWORD
There are no complaints about interpolation if the value is set.

👀 5

Just wanted to show off a bit what I made 😉 maybe it'll give someone some interesting ideas. This is the internal dashboard I use to curate my newsletter. Articles on the left feed in from my feed aggregator, the content gets scraped for salient information using, unwanted articles are filtered (currently just based on length), keywords are extracted using, articles are saved and then loaded into the dash which is made using svelte ( I can also generate summaries on demand using OpenAI's GPT-3. Everything is glued together using clojure. PS. picking the first article takes a while because I got distracted.

clojure-spin 4

Wow, looks neat, congrats! Is GPT-3 available for download or are you using the API?


Just using the API. I haven't seen it available for download yet.

👍 2
Cora (she/her)15:09:53

ooooh is this going to be open sourced?


Hmm... I wasn't really considering it, since it's two separate projects (one for the dash, one for doing all of the cool backend stuff) that share the same DB. It would need a bit of a rework to make it into one open source project. I'm not opposed to it, just have different priorities currently.


Also trying to spin part of it (plug in url -> get summary) into a paid product. Not sure how popular it'll be though. Although to do that, I'd probably need to make that part into a separate thing, so I could open source that.

Cora (she/her)16:09:19

I ran clojure morsels and this is essentially what I had in mind to build to make it easier to put together

Cora (she/her)16:09:25

which is why I ask

Cora (she/her)16:09:36

I totally understand not wanting to open source it, though


Yeh it would be pretty handy for you in that case (with some tweaking to match your process flow). I'll let you know if I ever do