commit 1b4fb6aaa9594ea474f4015c7bc2682687a1bf77 Author: nihilist Date: Tue May 6 15:26:51 2025 +0200 first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..c4e41d8 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# Why is this important ? +The more people run instances of the Nihilism blog, the more the word will spread, that when employing technology properly, the individual is absolutely free. So by running an instance of the Nihilism blog, you are directly helping me spreading that word out there. + +# Step 1: Deploy the Blog + +```sh +$ apt install tor docker.io docker-compose nginx -y +$ torsocks git clone http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/blog-deploy /srv/blog-deploy +$ cd /srv/blog-deploy +$ docker-compose up -d && docker-compose logs -f +``` + +# Step 2: list your own Blog instance on your own lantern +See [this tutorial](http://blog.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/opsec/darknetlantern/index.html) to know how to setup your own Lantern, and get listed as an official webring participant, so that every other lantern participant automatically list your new blog instance link. + diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..afd1b9f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,28 @@ +services: + blogmk-puller: + image: alpine:latest + container_name: blogmk_puller + environment: + - SITE_URL=http://blog.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion + - BRANCH=main + - REPO_URL=http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/opsec-blog-v2 + - REFRESH_SEC=900 + volumes: + - ./repo:/repo + - ./servable:/servable + - ./entry.sh:/entry.sh:ro + extra_hosts: + - "host.docker.internal:host-gateway" + entrypoint: ["sh", "/entry.sh"] + network_mode: "host" + restart: unless-stopped + + blogmk-server: + image: nginx:alpine + container_name: blogmk_server + volumes: + - ./nginx.conf:/etc/nginx/sites-enabled/default:ro + - ./servable:/usr/share/nginx/html:ro + ports: + - "127.0.0.1:7080:80" + restart: unless-stopped diff --git a/entry.sh b/entry.sh new file mode 100644 index 0000000..dd6f1aa --- /dev/null +++ b/entry.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +apk add --no-cache git wget mkdocs-material py3-regex py3-requests py3-colorama + +mkdir -p /repo +cd /repo +#rm -rf -- /repo/..?* /repo/.[!.]* /repo/* + +while true; do + echo "$(date): Cloning or updating the repository..." + git config --global --add safe.directory /repo + git config --global --add http.proxy socks5h://localhost:9050 + if [ -d "/repo/.git" ]; then + git restore . + git pull origin "${BRANCH}" + else + git clone -b "${BRANCH}" "${REPO_URL}" /repo + fi; + + sed -i "s/^site_url:.*//g" /repo/mkdocs.yml + echo "site_url: ${SITE_URL}" >> /repo/mkdocs.yml + + echo "Building mkdocs site..." + # remove old contents + rm -rf /servable/* + ## do necessarry transition related fixes + #sh blogfix.sh + mkdocs build -d /servable + sleep $REFRESH_SEC +done + diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..724e5fe --- /dev/null +++ b/nginx.conf @@ -0,0 +1,12 @@ +server { + listen 80; + + gzip on; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } +} +