Spacewiki

wiki

docker run -d -v $(pwd):/wiki -p 4567:4567 gollumwiki/gollum:master –css

HTTPS Proxy

cd docker docker build -t nginx-proxy:build . docker run -v $(pwd)/letsencrypt:/etc/letsencrypt -d -p 80:80 -p 443:443 nginx-proxy:basic

certbot –nginx -d stubbornspace.com

docker commit * nginx-proxy:certbot

Cron

Install homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

brew install nginx

brew services start nginx

/opt/homebrew/etc/nginx/nginx.conf nginx will load all files in /opt/homebrew/etc/nginx/servers/

server {
    listen       80;
    listen  [::]:80;
    server_name stubbornspace.com;

    #location / {
    #    root   /usr/share/nginx/html;
    #    index  index.html index.htm;
    #}

    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $http_host;
        proxy_pass http://127.0.0.1:4567;

        auth_basic "No no no, you forgot the majic word";
        auth_basic_user_file /etc/nginx/.htpasswd;
    }
    client_max_body_size 10m;

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }
}