Sign inSign up

lajunta/goblog

By lajunta

•Updated over 5 years ago

A blog app written with Golang and based on Mongo

Image
0

438

lajunta/goblog repository overview

⁠Run

First run your mongo image without auth

⁠ENV configure

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⁠

⁠DB connect configure

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

⁠Tags configure

make a tagconfig.txt file in $HOME/.goblog/

the content is like this:

cate:tag1,tag2
⁠The docker run command

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

Tag summary

Content type

Image

Digest

Size

6.3 MB

Last updated

over 5 years ago

docker pull lajunta/goblog