diff --git a/src/pages/blog/content.rs b/src/pages/blog/content.rs
index 3063948..49cdf1d 100644
--- a/src/pages/blog/content.rs
+++ b/src/pages/blog/content.rs
@@ -70,7 +70,7 @@ pub trait BlogEntry: Sized {
"certified catgirl™",
"software engineer",
"professional yapper",
- "neurospicy and disabled"
+ "neurospicy and disabled",
],
about: "",
},
@@ -83,17 +83,122 @@ pub trait BlogEntry: Sized {
},
];
- const POSTS: [&'static Post; 1] = [
- /*&Post {
+ const POSTS: [&'static Post; 2] = [
+ &Post {
id: 0,
authors: &[0],
- title: "sweet little poison",
- utcdate: "1970-01-01",
+ title: "haj, world!",
+ utcdate: "2025-08-24",
content: r#"
-### this will be a future write-up how i set up iocaine with caddy and docker.
-### here's my docker-compose.yml:
+### my first blogpost
+haj! and welcome to my first blogpost.
+this blogpost won't have that much content.
+fun fact: this post becomes html from markdown :3
+pretty cool, ain't it? we think so too.
+it's for including images, formatted text, code and content much easier.
+i also added a too overcomplicated blog backend that allows authors and posts by u8::MAX, cause why not.
+won't post that much either way, so why bother with higher values.
+nonetheless... have a great day, evening, whatever daytime it's for you rn and stay safe. ♡
+you may take a look at my other blogposts. this one was basically practially just a test.
+"#,
+ },
+ &Post {
+ id: 1,
+ authors: &[0],
+ title: "sweet little poison",
+ utcdate: "2025-08-25",
+ content: r#"
+### > setting up iocaine with docker and caddy. ~
+sup, today we're going to give ya a crash course on how to homebrew poison for ai. ^.^
+we'll be utilizing docker for containerization and caddy as a reverse-proxy.
-```yml
+#### > preparing docker and files ~
+first, we're going to create a new external network and recreate our file struct.
+in this example we're going to name it "caddy". very creative, i know.
+we achieve this by running following pile of commands:
+```sh
+docker network create caddy && \
+mkdir -p ./caddy/pages/example.com ./iocaine ./socks && \
+touch ./docker-compose.yml ./caddy/proxy ./iocaine/config.toml && \
+touch ./caddy/pages/example.com/index.html && \
+printf '
hellow body consisting of blood and flesh
' \
+ > ./caddy/pages/example.com/index.html
+```
+
+after running that we should be set and ready for the next few steps.
+if you're curious, this is how it should look like right now:
+```sh
+Documents/example » tree .
+.
+├── caddy
+│ ├── pages
+│ │ └── example.com
+│ │ └── index.html
+│ └── proxy
+├── docker-compose.yml
+├── iocaine
+│ └── config.toml
+└── socks
+```
+
+#### > downloading data and configuring iocaine ~
+
+next things next: we're going to download a robots.json, some markov-chain-stuffies and a words.txt.
+for now, we will be using the default stuff from the official docs cause why not:
+```sh
+curl --proto '=https' --tlsv1.3 \
+ -L https://archive.org/download/GeorgeOrwells1984/1984_djvu.txt \
+ -o ./iocaine/1984.txt && \
+curl --proto '=https' --tlsv1.3 \
+ -L https://archive.org/download/ost-english-brave_new_world_aldous_huxley/Brave_New_World_Aldous_Huxley_djvu.txt \
+ -o ./iocaine/brave-new-world.txt && \
+curl --proto '=https' --tlsv1.2 \
+ -L https://git.savannah.gnu.org/cgit/miscfiles.git/plain/web2 \
+ -o ./iocaine/words.txt && \
+curl --proto '=https' --tlsv1.3 \
+ -L https://github.com/ai-robots-txt/ai.robots.txt/raw/refs/heads/main/robots.json \
+ -o ./iocaine/robots.json
+```
+
+most importantly, we have to scrape nam-shub-of-enki from gergely's git.
+here's a way to curl and extract it automatically in the correct folder:
+```sh
+curl --proto '=https' --tlsv1.3 \
+ -L https://git.madhouse-project.org/api/packages/iocaine/generic/nam-shub-of-enki/20250711.0/nam-shub-of-enki-20250711.0.tar.zst \
+ -o ./iocaine/nam-shub-of-enki.tar.zst && \
+sudo tar -xvf ./iocaine/nam-shub-of-enki.tar.zst -C ./iocaine
+```
+
+now, we're going to prepare our iocaine/config.toml like this:
+```sh
+cat > ./iocaine/config.toml <<'YAML'
+[server]
+bind = "/run/iocaine/waow.socket"
+unix_listen_access = "everybody"
+
+[server.control]
+bind = "/run/iocaine/listen.socket"
+unix_listen_access = "owner"
+
+[server.request-handler]
+path = "/data"
+language = "roto"
+
+[sources]
+words = "/data/words.txt"
+markov = [ "/data/1984.txt", "/data/brave-new-world.txt" ]
+
+[metrics]
+enable = false
+YAML
+```
+
+#### > cooking up our docker compose file for deployment ~
+
+i have fucked around with docker a little while to make this somehow work.
+here's a command which will insert needed content into our docker-compose.yml:
+```sh
+cat > ./docker-compose.yml <<'YAML'
services:
caddy:
image: caddy:alpine
@@ -107,10 +212,10 @@ services:
- "443:443"
- "443:443/udp"
networks:
- - nginx
+ - caddy
volumes:
- ./socks:/run/iocaine:ro
- - ./nginx/pages:/var/www/html
+ - ./caddy/pages:/var/www/html
- ./caddy/data:/data
- ./caddy/config:/config
- ./caddy/proxy:/etc/caddy/Caddyfile:ro
@@ -122,15 +227,13 @@ services:
hostname: proxy.iocaine
restart: unless-stopped
ports:
- - "42069:42069"
+ - "127.0.0.1:42069:42069"
networks:
- - nginx
+ - caddy
volumes:
- - ./iocaine:/data
- ./socks:/run/iocaine:rw
- # - iocainesocket:/run/iocaine/waow.socket:rw
+ - ./iocaine:/data
environment:
- # - IOCAINE__SERVER__BIND="0.0.0.0:42069"
- IOCAINE__SERVER__BIND="/run/iocaine/waow.socket"
- IOCAINE__SERVER__UNIX_LISTEN_ACCESS="everybody"
- IOCAINE__SERVER__REQUEST_HANDLER__PATH="/data"
@@ -140,39 +243,19 @@ services:
- IOCAINE__SOURCES__WORDS="/data/words.txt"
- IOCAINE__SOURCES__MARKOV=["/data/1984.txt", "/data/brave-new-world.txt"]
- IOCAINE__METRICS__ENABLE=false
- command: --config-file /data/config.toml
+ - NSOE__AI_ROBOTS_TXT_PATH=/data/robots.json
+ command: --config-file /data/config.toml start
networks:
- nginx:
+ caddy:
external: true
+YAML
```
-### my file-tree:
-
+#### > finishing up with caddy and deploying ~
+our caddyfile needs some love to work.
+here's what i ripped from the official docs:
```sh
-services/proxy » tree iocaine
-iocaine
-├── 1984.txt
-├── brave-new-world.txt
-├── nam_shub_of_enki
-│ ├── classify
-│ │ └── mod.roto
-│ ├── config.roto
-│ ├── detect
-│ │ └── mod.roto
-│ ├── mod.roto
-│ └── tests
-│ └── mod.roto
-├── nam-shub-of-enki-20250711.0.tar.zst
-├── nam-shub-of-enki-latest.tar.zst
-├── pkg.roto
-├── robots.json
-└── words.txt
-```
-
-### and my caddy-snippet with example:
-
-
-```txt
+cat > ./iocaine/proxy <<'TXT'
(iocaine) {
@read method GET HEAD
@not-read not {
@@ -196,29 +279,21 @@ example.com {
reverse_proxy http://example:8080
}
default {
- respond 405
+ # this is the behaviour if neither a GET nor HEAD request comes in
+ reverse_proxy http://example:8080
}
}
}
-
+TXT
```
+now the last thing that's left is a plain and simple:
+`docker compose up -d`
+and we should be good to go!
+
+i hope this post made it easier/helped you with setting up iocaine on your own server. ♡
+it's good to have this set up just to fuck around with fucking parisitic generative ai stealing your things.
+gatekeep your stuff from big corpos that are trying to make their business from your experience and skills.
"#,
},
- */&Post {
- id: 0,
- authors: &[0],
- title: "haj, world!",
- utcdate: "2025-08-24",
- content: r#"
-### my first blogpost
-haj! and welcome to my first blogpost.
-this blogpost won't have that much content.
-fun fact: this post generates html from markdown :3
-so i can include images, formatted text, code and content much easier.
-i also added a too overcomplicated blog backend that allows authors and posts by u8::MAX, cause why not.
-won't post that much either way, so why bother with higher values. /srs
-nonetheless... have a great day, evening, whatever daytime it's for you rn and stay safe. ♡s
-"#,
- },
];
}