Sign inSign up

80x86/nanoblog

By 80x86

Updated almost 7 years ago

a light weight but effective blog system for amd64/arm64 machine

Image
12

100K+

80x86/nanoblog repository overview

nanoblog for amd64 and arm64 machine

a light weight but effective blog system for amd64/arm64 machine

volume must map

containerdescription
/configdir to save config file, ssl certificate
/storageroot dir for upload files
/theme(optional) for custom theme

env var

namedefault valuedescription
PUID1000run as uid
PGID100run as gid
UMASK_SET000umask for app running user
WEB_PORT8082http or https listen port
SSLoffset to on to startup as https server and use custom certificate under /config/ssl/
AUTOCERTfalseset to true to enable auto acme (this option has higher priority than the SSL option)
AUTOCERT_DOMAINlocalhostset to your ACME domains if AUTOCERT=true, can be multi like foo.com,b.bar.com, can be wildcard like *.foo.com
AUTOCERT_DOMAIN_WHITELISTdomain name allowed, empty means allow all, can be multi like foo.com,b.bar.com
AUTOCERT_DNS_PROVIDERsee available providers below
AUTOCERT_KEYTYPEEC256must be one of RSA2048, RSA4096, RSA8192, EC256, EC384
GO_ACME_STORAGE_DIR/config/sslACME certificate cache dir
SERVER_URLhttp://localhost:8089just an init value for displaying, can be changed by login into admin panel
SESSION_SECRETvFvCBveihT7PKQCsjn8xv8PaVinIen47must be 16,24,32 or 64 bytes long
SESSION_MAX_AGE86400session expiration seconds
DB_SQLITE/config/nanoblog.dbsqlite db file path
DB_MYSQLMySQL DNS string, format see belowonly work if you set DB_SQLITE to empty
MySQL DNS string format

user:password@(localhost:3306)/nanoblog?charset=utf8mb4&parseTime=True&loc=Local

availabel providers

alidns,azure,cloudflare,cloudxns,digitalocean,dnspod,gcloud,linodev4,namecheap,qcloud,rfc2136,vultr

additional env var for dns provider

dnspod:

Environment Variable Namedescription
DNSPOD_API_KEYformat is: id,token

qcloud:

Environment Variable Namedescription
QCLOUD_SECRET_IDThe SecretId
QCLOUD_SECRET_KEYThe SecretKey

alidns:

Environment Variable Namedescription
ALICLOUD_ACCESS_KEYAccess key ID
ALICLOUD_SECRET_KEYAccess Key secret

for other provider please ref to: https://go-acme.github.io/lego/dns/#dns-providers


config file path

containerdescription
/config/nanoblog.tomlconfig file
/config/nanoblog.dbdatabase file path
/config/ssl/ssl.crtSSL cert file path
/config/ssl/ssl.keySSL key file path

run example

quick test run:

docker run --rm -ti --network host 80x86/nanoblog

run as prod:

IMAGE_NAME=80x86/nanoblog

WEB_PORT=8082
SERVER_URL=http://you-domain.com:8082
# you must replace the path 'path-to' to yourself's
mkdir -p /path-to/config /path-to/storage /path-to/theme
docker run -d \
		-e PUID=$UID \
		-e PGID=$GID \
		-e WEB_PORT=$WEB_PORT \
		-e SERVER_URL=$SERVER_URL \
		--network host \
		-v /path-to/config:/config \
		-v /path-to/storage:/storage \
		-v /path-to/theme:/theme \
		--mount type=tmpfs,destination=/tmp \
		${IMAGE_NAME}:latest

Tag summary

Content type

Image

Digest

Size

28.4 MB

Last updated

almost 7 years ago

docker pull 80x86/nanoblog