Deployed site: https://door.casbin.com/
Run your own casdoor program in a few minutes:smiley:
There are two methods, get code via go subcommand get
:
go get github.com/casbin/casdoor
or git
:
git clone https://github.com/casbin/casdoor
Finally, change directory:
cd casdoor/
We provide two start up methods for all kinds of users.
Edit conf/app.conf
, modify dataSourceName
to correct database info, which follows this format:
username:password@tcp(database_ip:database_port)/
Casdoor provides two run modes, the difference is binary size and user prompt.
Edit conf/app.conf
, set runmode=dev
. Firstly build front-end files:
cd web/ && yarn && yarn run start
❗ A word of caution ❗: Casdoor's front-end is built using yarn. You should use yarn
instead of npm
. It has a potential failure during building the files if you use npm
.
Then build back-end binary file, change directory to root(Relative to casdoor):
go run main.go
That's it! Try to visit http://127.0.0.1:7001/. 🛩️
But make sure you always request the backend port 8000 when you are using SDKs.
Edit conf/app.conf
, set runmode=prod
. Firstly build front-end files:
cd web/ && yarn && yarn run build
Then build back-end binary file, change directory to root(Relative to casdoor):
go build main.go && sudo ./main
Notice, you should visit back-end port, default 8000. Now try to visit http://SERVER_IP:8000/
This method requires docker and docker-compose to be installed first.
Edit conf/app.conf
, modify dataSourceName
to the fixed content:
dataSourceName = root:123456@tcp(db:3306)/
If you need to modify
conf/app.conf
, you need to re-rundocker-compose up
.
docker-compose up
That's it! Try to visit http://localhost:8000/. 🛩️
This method requires docker and docker-compose to be installed first.
docker pull casbin/casdoor
We also provide a complete document as a reference.
These all use casdoor as a centralized authentication platform.
- Casnode: Next-generation forum software based on React + Golang.
- Casbin-OA: A full-featured OA(Office Assistant) system.
- ......
For casdoor, if you have any questions, you can give Issues, and you can also directly Pull Requests(but we recommend give issues first to communicate with the community).
If you are contributing to casdoor, please note that we use Crowdin as translating platform and i18next as translating tool. When you add some words using i18next in the web/
directory, please remember to add what you have added to the web/src/locales/en/data.json
file.