Table of contents
foreword
The original link of this article is:
https://blog.csdn.net/freewebsys/article/details/108971807
Not to be reproduced without permission of the blogger.
The blogger’s CSDN address is: https://blog.csdn.net/freewebsys
The blogger’s nugget address is: https://juejin.cn/user/585379920479288
The blogger’s Zhihu address is: https://www.zhihu. com/people/freewebsystem
1. Use github to search for open source go bbs
Found a good organization:
the interface and functions look okay:
https://github.com/mlogclub/bbs-go
Unfortunately, the agreement is GPL-3.0 license, which requires purchasing authorization.
Then casnode is apache protocol:
https://github.com/casbin/casnode
There is also pybbs: open source protocol MIT
https://github.com/atjiu/pybbs-go
There is also go-bbs:
https://github.com/gobbscom/go-bbs
2. Use casnode to make technical calls
Website preview:
https://casnode.org/zh
Original project address:
https://github.com/casbin/casnode
Dependent on casdoor project:
https://github.com/casdoor/casdoor
The relevant information has been sorted out and can be deployed directly using docker:
https://hub.docker.com/u/casbin
The code is almost 1K, please pay more attention to it.
# 下载本项目:
git clone https://gitee.com/study-demo-all/casnode-bbs-docker-compose.git
cd casnode-bbs-docker-compose
# 使用docker-compose 启动
docker-compose up -d
Modified:
docker-compose.yml:
version: '3.1'
services:
casdoor:
restart: always
image: casbin/casdoor-all-in-one:latest
container_name: casdoor
entrypoint: /bin/sh -c './server --createDatabase=true'
ports:
- "8000:8000"
depends_on:
- mysql8
environment:
RUNNING_IN_DOCKER: "true"
volumes:
- ./casdoor-conf:/conf/
casnode:
image: casbin/casnode:latest
container_name: casnode
entrypoint: /bin/sh -c './wait-for-it mysql8:3306 -- ./server'
restart: always
ports:
- "7000:7000"
depends_on:
- mysql8
volumes:
- ./casnode-conf:/conf/
mysql8:
image: mysql:8.0.25
container_name: mysql8
restart: always
# docker安全验证
security_opt:
- seccomp:unconfined
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: mysql123456
TZ: Asia/Shanghai
command: [
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_general_ci',
'--max_connections=3000'
]
volumes:
- ./mysql-data:/var/lib/mysql
The database uses mysql8, and there must be two web services, casdoor and casnode projects.
3. New control with casdoor
You can visit:
System initialization interface:
Account: admin
Secret: 123
There are many functions, still under study:
4. Use casnode for bbs access
BBS access: http://localhost:7000/
Nothing. And I don't know how to configure the login address.
There is also swagger interface. Remember to block it when you go online:
except for some problems with logging in, I don’t know how to configure it, everything else is very easy to use.
5. Use summary
Looking at the project is still good, it is developed using the technology of front-end and back-end separation.
The front end is developed with reactjs, and the back end is developed with golang + beego.
If you haven't looked at the code yet, you can use docker-compse to run the project through mirroring.
Moreover, the open source project of apache2.0, although the forum is not popular now, but there are still many places that need BBS.
And it also supports multiple languages.
The original link of this article is:
https://blog.csdn.net/freewebsys/article/details/108971807