Casvisor
Operations

Configuration

Casvisor reads conf/app.conf from its working directory when it starts. In the Docker images that is /conf/app.conf; mount your own file there. Restart Casvisor after changing it.

appname = casvisor
httpport = 19000
runmode = dev
SessionOn = true
copyrequestbody = true
driverName = mysql
dataSourceName = root:123456@tcp(localhost:3306)/
dbName = casvisor
tableNamePrefix =
isDemoMode = false
logPostOnly = true
redisEndpoint =
guacamoleEndpoint = 127.0.0.1:4822
casdoorEndpoint = https://door.casdoor.com
clientId = b108dacba027db36ec26
clientSecret = 124140638b4f9de7e78e79ba22d451c17bfa9688
casdoorOrganization = "casbin"
casdoorApplication = "app-casvisor"

The Casdoor values in the file as shipped belong to Casbin's public demo and will not sign anyone in to your Casvisor. Replace them; see Connect Casdoor.

Server

KeyDefaultMeaning
httpport19000The port Casvisor listens on, for the web UI, the API and the connection WebSockets.
runmodedevBeego's run mode. prod turns off Beego's development error pages.
appname, SessionOn, copyrequestbodyBeego settings Casvisor relies on. Leave them as they are.

Database

KeyDefaultMeaning
driverNamemysqlMySQL and MariaDB are the supported databases.
dataSourceNameroot:123456@tcp(localhost:3306)/The MySQL DSN up to and including the /, without the database name.
dbNamecasvisorThe database. Casvisor creates it, and its tables, at start if they do not exist.
tableNamePrefixemptyA prefix for the API rule table, for sharing a database.

When the environment variable RUNNING_IN_DOCKER is true, localhost in dataSourceName is replaced by the Docker host's address, so a container can reach a MySQL server running on its host.

Connections

KeyDefaultMeaning
guacamoleEndpoint127.0.0.1:4822Where guacd listens. Used for Telnet only. See Protocols.

Casdoor

KeyMeaning
casdoorEndpointCasdoor's address, reachable from both the browsers and the Casvisor server, without a trailing slash
clientId, clientSecretThe client ID and secret of the Casdoor application
casdoorOrganizationThe organization of the application
casdoorApplicationThe name of the application

The web UI is built with Casbin's demo values and Casvisor replaces them with these when it serves the UI, so the same build works with any Casdoor.

Sessions and logs

KeyDefaultMeaning
redisEndpointemptyEmpty keeps sign-in sessions as files under tmp/. Set it to a Redis address, such as 127.0.0.1:6379, to keep them in Redis instead, so people stay signed in when the container is replaced.
logPostOnlytrueLog only the calls that change something. See Operation logs.
isDemoModefalseNot used by the backend at present.
Edit on GitHub

On this page