Skip to content

Commit

Permalink
build: casdoor
Browse files Browse the repository at this point in the history
Signed-off-by: 117503445 <[email protected]>
  • Loading branch information
117503445 committed Nov 14, 2023
1 parent 6b14bdd commit 7590366
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 1 deletion.
49 changes: 48 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,51 @@ services:

- '/var/run/docker.sock:/var/run/docker.sock:ro'
stdin_open: true
tty: true
tty: true
casdoor:
image: registry.cn-hangzhou.aliyuncs.com/117503445-mirror/casdoor
# image: casbin/casdoor@sha256:466a495dd6bfee08caf3d42249722139f41ac4bee9ef708b9294bfab4e0e7f69
ports:
- 18001:18001
volumes:
- ./src/casdoor/app.conf:/conf/app.conf
depends_on:
- db
deploy:
restart_policy:
condition: on-failure

db:
image: mysql
environment:
- MYSQL_ROOT_PASSWORD=123456
- MYSQL_ROOT_HOST=%
- MYSQL_DATABASE=casdoor
volumes:
- ./data/mysql:/var/lib/mysql
cap_add:
- SYS_NICE # CAP_SYS_NICE to avoid 'mbind: Operation not permitted'
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-uroot", "-ppass"]
interval: 5s
timeout: 5s
retries: 20
ports:
- 3306:3306
dbgate:
image: dbgate/dbgate
ports:
- 18002:3000
# volumes:
# - dbgate-data:/root/.dbgate
environment:
CONNECTIONS: con1

LABEL_con1: MySql
SERVER_con1: db
USER_con1: root
PASSWORD_con1: 123456
PORT_con1: 3306
ENGINE_con1: mysql@dbgate-plugin-mysql
depends_on:
- db
30 changes: 30 additions & 0 deletions src/casdoor/app.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
appname = casdoor
httpport = 18001
runmode = dev
copyrequestbody = true
driverName = mysql
dataSourceName = root:123456@tcp(db:3306)/
dbName = casdoor
tableNamePrefix =
showSql = true
redisEndpoint =
defaultStorageProvider =
isCloudIntranet = false
authState = "casdoor"
socks5Proxy = "127.0.0.1:10808"
verificationCodeTimeout = 10
initScore = 0
logPostOnly = true
origin =
originFrontend =
staticBaseUrl = "https://cdn.casbin.org"
isDemoMode = false
batchSize = 100
enableGzip = true
ldapServerPort = 389
radiusServerPort = 1812
radiusSecret = "secret"
quota = {"organization": -1, "user": -1, "application": -1, "provider": -1}
logConfig = {"filename": "logs/casdoor.log", "maxdays":99999, "perm":"0770"}
initDataFile = "./init_data.json"
frontendBaseDir = "../casdoor"

0 comments on commit 7590366

Please sign in to comment.