Why Nostr? What is Njump?
2024-05-30 22:36:05
in reply to

Merlin on Nostr: Also found a new one: ...

Also found a new one:

One other day on Nostr, one other app!

Today I’ll present you a new self-hosted Nostr blog web application recently released on github by dtonon), Oracolo:

https://github.com/dtonon/oracolo

Oracolo is a minimalist blog powered by Nostr, that consists of a single html file, weighing only ~140Kb. You can use whatever Nostr client that supports long format (habla.news, yakihonne, highlighter.com, etc ) to write your posts, and your personal blog is automatically updated.
It works also without a web server; for example you can send it via email as a business card.

Oracolo fetches Nostr data, builds the page, execute the JavaScript code and displays article on clean and sobr blog (a Dark theme would be awesome 👀).

Blog articles are nostr events you published or will publish on Nostr relays through long notes applications like the ones quoted above.

Don’t forget to use a NIP07 web browser extensions to login on those websites. Old time where we were forced to fill our nsec key is nearly over!

For the hurry ones of you, you can find here the Oracolo demo with my Nostr long notes article. It will include this one when I’ll publish it on Nostr!

https://oracolo.fractalized.net/

How to self-host Oracolo?

You can build the application locally or use a docker compose stack to run it (or any other method). I just build a docker compose stack with Traefik and an Oracolo docker image to let you quickly run it.

The oracolo-docker github repo is available here:

https://github.com/PastaGringo/oracolo-docker

PS: don’t freak out about the commits number, oracolo has been the lucky one to let me practrice docker image CI/CD build/push with Forgejo, that went well but it took me a while before finding how to make Forgejo runner dood work 😆). Please ping me on Nostr if you are interested by an article on this topic!

This repo is a mirror from my new Forgejo git instance where the code has been originaly published and will be updated if needed (I think it will):

https://git.fractalized.net/PastaGringo/oracolo-docker

Here is how to do it.

  1. First, you need to create an A DNS record into your domain.tld zone. You can create a A with “oracolo” .domain.tld or “*” .domain.tld. The second one will allow traefik to generate all the future subdomain.domain.tld without having to create them in advance. You can verify DNS records with the website https://dnschecker.org.

  2. Clone the oracolo-docker repository:

git clone https://git.fractalized.net/PastaGringo/oracolo-docker.git
cd oracolo-docker
  1. Rename the .env.example file:
mv .env.example .env
  1. Modify and update your .env file with your own infos:
# Let's Encrypt email used to generate the SSL certificate 
LETSENCRYPT_EMAIL= 
# domain for oracolo. Ex: oracolo.fractalized.net
ORACOLO_DOMAIN= 
# Npub author at "npub" format, not HEX.
NPUB= 
# Relays where Oracolo will retrieve the Nostr events. 
# Ex: "wss://nostr.fractalized.net, wss://rnostr.fractalized.net" 
RELAYS= 
# Number of blog article with an thumbnail. Ex: 4 
TOP_NOTES_NB=
  1. Compose Oracolo:
docker compose up -d && docker compose logs -f oracolo traefik
[+] Running 2/0
 ✔ Container traefik  Running                                                                                                                                                        0.0s 
 ✔ Container oracolo  Running                                                                                                                                                        0.0s 
WARN[0000] /home/pastadmin/DEV/FORGEJO/PLAY/oracolo-docker/docker-compose.yml: `version` is obsolete 
traefik  | 2024-05-28T19:24:18Z INF Traefik version 3.0.0 built on 2024-04-29T14:25:59Z version=3.0.0
oracolo  | 
oracolo  |   ___   ____    ____    __   ___   _       ___  
oracolo  |  /   \ |    \  /    |  /  ] /   \ | |     /   \ 
oracolo  | |     ||  D  )|  o  | /  / |     || |    |     |
oracolo  | |  O  ||    / |     |/  /  |  O  || |___ |  O  |
oracolo  | |     ||    \ |  _  /   \_ |     ||     ||     |
oracolo  | |     ||  .  \|  |  \     ||     ||     ||     |
oracolo  |  \___/ |__|\_||__|__|\____| \___/ |_____| \___/ 
oracolo  |                                                 
oracolo  | Oracolo dtonon's repo: https://github.com/dtonon/oracolo
oracolo  | 
oracolo  | ╭────────────────────────────╮
oracolo  | │ Docker Compose Env Vars ⤵️  │
oracolo  | ╰────────────────────────────╯
oracolo  | 
oracolo  | NPUB            : npub1ky4kxtyg0uxgw8g5p5mmedh8c8s6sqny6zmaaqj44gv4rk0plaus3m4fd2
oracolo  | RELAYS          : wss://nostr.fractalized.net, wss://rnostr.fractalized.net
oracolo  | TOP_NOTES_NB    : 4
oracolo  | 
oracolo  | ╭───────────────────────────╮
oracolo  | │ Configuring Oracolo... ⤵️  │
oracolo  | ╰───────────────────────────╯
oracolo  | 
oracolo  | > Updating npub key with npub1ky4kxtyg0uxgw8g5p5mmedh8c8s6sqny6zmaaqj44gv4rk0plaus3m4fd2... ✅
oracolo  | > Updating nostr relays with wss://nostr.fractalized.net, wss://rnostr.fractalized.net... ✅
oracolo  | > Updating TOP_NOTE with value 4... ✅
oracolo  | 
oracolo  | ╭───────────────────────╮
oracolo  | │ Installing Oracolo ⤵️  │
oracolo  | ╰───────────────────────╯
oracolo  | 
oracolo  | added 122 packages, and audited 123 packages in 8s
oracolo  | 
oracolo  | 20 packages are looking for funding
oracolo  |   run `npm fund` for details
oracolo  | 
oracolo  | found 0 vulnerabilities
oracolo  | npm notice
oracolo  | npm notice New minor version of npm available! 10.7.0 -> 10.8.0
oracolo  | npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.0
oracolo  | npm notice To update run: npm install -g [email protected]
oracolo  | npm notice
oracolo  | 
oracolo  | >>> done ✅
oracolo  | 
oracolo  | ╭─────────────────────╮
oracolo  | │ Building Oracolo ⤵️  │
oracolo  | ╰─────────────────────╯
oracolo  | 
oracolo  | > [email protected] build
oracolo  | > vite build
oracolo  | 
oracolo  | 7:32:49 PM [vite-plugin-svelte] WARNING: The following packages have a svelte field in their package.json but no exports condition for svelte.
oracolo  | 
oracolo  | @splidejs/[email protected]
oracolo  | @splidejs/[email protected]
oracolo  | 
oracolo  | Please see https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#missing-exports-condition for details.
oracolo  | vite v5.2.11 building for production...
oracolo  | transforming...
oracolo  | ✓ 84 modules transformed.
oracolo  | rendering chunks...
oracolo  | 
oracolo  | 
oracolo  | Inlining: index-C6McxHm7.js
oracolo  | Inlining: style-DubfL5gy.css
oracolo  | computing gzip size...
oracolo  | dist/index.html  233.15 kB │ gzip: 82.41 kB
oracolo  | ✓ built in 7.08s
oracolo  | 
oracolo  | >>> done ✅
oracolo  | 
oracolo  | > Copying Oracolo built index.html to nginx usr/share/nginx/html... ✅
oracolo  | 
oracolo  | ╭────────────────────────╮
oracolo  | │ Configuring Nginx... ⤵️ │
oracolo  | ╰────────────────────────╯
oracolo  | 
oracolo  | > Copying default nginx.conf file... ✅
oracolo  | 
oracolo  | ╭──────────────────────╮
oracolo  | │ Starting Nginx... 🚀 │
oracolo  | ╰──────────────────────╯
oracolo  |

If you don’t have any issue with the Traefik container, Oracolo should be live! 🔥

You can now access it by going to the ORACOLO_DOMAIN URL configured into the .env file.

Have a good day!

Don’t hesisate to follow dtonon) on Nostr to follow-up the future updates ⚡🔥

See you soon in another Fractalized story!
PastaGringo 🤖⚡

Author Public Key
npub1wmwn9uckrxuwxh5lxtsp2gjtvvaqm79734tp8sjm3qu2xuzqw6vq30ny4j