first commit

This commit is contained in:
nihilist 2025-05-06 15:26:51 +02:00
commit 1b4fb6aaa9
4 changed files with 86 additions and 0 deletions

15
README.md Normal file
View file

@ -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.

28
docker-compose.yml Normal file
View file

@ -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

31
entry.sh Normal file
View file

@ -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

12
nginx.conf Normal file
View file

@ -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;
}
}