Files
wikipedia-mirror/.env
2019-09-08 14:06:48 -04:00

30 lines
1.4 KiB
Bash

PROJECT_DIR="/opt/wiki" # folder for all project state
CONFIG_DIR="$PROJECT_DIR/etc/nginx"
CACHE_DIR="$PROJECT_DIR/data/cache"
CERTS_DIR="$PROJECT_DIR/data/certs"
LOGS_DIR="$PROJECT_DIR/data/logs"
LANG="en" # Wikipedia language to mirror
LISTEN_PORT_HTTP="80" # public-facing HTTP port to bind
LISTEN_PORT_HTTPS="443" # public-facing HTTPS port to bind
LISTEN_HOST="wiki.example.com" # root domain to listen on
LISTEN_WIKI="$LANG.$LISTEN_HOST" # wiki domain to listen on
LISTEN_MEDIA="upload.$LISTEN_HOST" # uploads domain to listen on
UPSTREAM_HOST="wikipedia.org" # main upstream domain
UPSTREAM_WIKI="$LANG.$UPSTREAM_HOST" # upstream domain for wiki
UPSTREAM_MEDIA="upload.wikimedia.org" # upstream domain for uploads
# Only needed if using an nginx reverse proxy:
SSL_CRT="$CERTS_DIR/$LISTEN_HOST.crt"
SSL_KEY="$CERTS_DIR/$LISTEN_HOST.key"
SSL_DH="$CERTS_DIR/$LISTEN_HOST.dh"
CACHE_SIZE="100G" # or "500GB", "1GB", "200MB", etc.
CACHE_REQUESTS="GET HEAD POST" # or "GET HEAD", "any", etc.
CACHE_RESPONSES="200 206 302" # or "200 302 404", "any", etc.
CACHE_DURATION="max" # or "1d", "30m", "12h", etc.
ACCESS_LOG="'$LOGS_DIR/nginx.out' trace" # or "off", etc.
ERROR_LOG="'$LOGS_DIR/nginx.err' warn" # or "off", etc.