A blog app written with Golang and based on Mongo
431
First run your mongo image without auth
make a .env file with the following content
PORT=3000
BLOG_USER=someone
BLOG_PASSWORD=somepassword
PORT is the running port
BLOG_USER and BLOG_PASSWORD are used to login.
The login path is https://domain/login
make a dbconfig.toml file in $HOME/.goblog/
the content is
DbHost = "127.0.0.1"
DbPort = "27017"
DbName = "blog"
DbUser = "xxx"
DbPassword = "test"
DbUser and DbPassword are not used ,just for placeholder
Auth function will be added in the future
make a tagconfig.txt file in $HOME/.goblog/
the content is like this:
cate:tag1,tag2
tagconfig.txt save your tags outside the container
imagefolder is outside the container,so you will not lose your pictures,and also you can backup your pictures
docker run --env-file .env --name goblog -v=$HOME/goblog/images:/public/images -v=$HOME/.goblog/tagconfig.txt:/home/zxy/.goblog/tagconfig.txt --network=host lajunta/goblog:latest
Content type
Image
Digest
Size
6.3 MB
Last updated
over 5 years ago
docker pull lajunta/goblog