Skip to content

🖖🏻 A self-hosted Quora like web application written in Go 基于 Golang 类似知乎的私有部署问答应用 包含问答、评论、点赞、管理后台等功能

License

Notifications You must be signed in to change notification settings

mousepotato/guora

 
 

Repository files navigation

ui

Guora

go-report codecov go-mod license

🖖🏻 A self-hosted Quora like web application written in Go

基于 Golang 类似知乎的私有部署问答应用 包含问答、评论、点赞、管理后台等功能

Quick Start (Docker Deploy)

$ docker-compose up --build

Development (Non-Dockerized Deploy)

1.Clone Source Code

$ git clone https://github.com/mousepotato/guora.git

$ cd guora

2.Download Requirements

  • install go
sudo apt install snapd
sudo snap install go --classic
sudo apt install build-essential
$ go mod download
$ go mod tidy

3.Create Configuration

$ sudo mkdir -p /etc/guora/
$ sudo cp configuration.example.yaml /etc/guora/configuration.yaml
# configuration for dev
db:
  driver: sqlite3
  addr: ./guora.db
  # driver: mysql
  # addr: user:password@/dbname?charset=utf8&parseTime=True&loc=Local
  # addr: user:password@tcp(xxxx.rds.amazonaws.com:3306)/guora?charset=utf8&parseTime=True
  # driver: postgres
  # addr: host=myhost user=gorm dbname=gorm sslmode=disable password=mypassword
redis:
  addr: localhost:6379
  password:
  db: 0
admin:
  name: Development (开发账号)
  mail: mymail
  password: mypassword
secretkey: JustWriteSomethingWhatYouLike
lang: en
#lang: zh
address: :8080
Param Description 备注
db Database configure, supports sqlite3, mysql, postgres 数据库配置: 驱动支持 sqlite3, mysql, postgres
redis Redis configure Redis 配置
admin Administrator info 管理员信息
secretkey Secret string for token signature Token 密钥
lang Languages, such as en, zh 语言: en 为英文; zh 为简体中文
address Listen address 服务监听地址

4.Init and Run

  • 第一次启动 create DB: guora then
$ (sudo) go run ./cmd/guora -init
  • 之后启动
$ (sudo) go run ./cmd/guora &

5. Visit Website

visit localhost:8080 and log in as admin

mail (默认邮箱) mymail
password (默认密码) mypassword

Run Test

$ (sudo) go test ./cmd/guora

Source

Repository: guora

Author: meloalright

Contributors: contributors

ChangeLog

Documented in Releases

License

MIT

About

🖖🏻 A self-hosted Quora like web application written in Go 基于 Golang 类似知乎的私有部署问答应用 包含问答、评论、点赞、管理后台等功能

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 94.8%
  • HTML 4.7%
  • Dockerfile 0.5%