https://casibase.org/docs/basic/try-with-docker/ #1629
Replies: 3 comments 4 replies
|
I've search in the docs with no luck, i've a simple question, how can i start casibase docker image with cadoor local path reference? Login page always point to https://door.casdoor.com/ . Here a snippet of dev setup app.conf file appname = casibase
httpport = 14000
runmode = dev
SessionOn = true
copyrequestbody = true
driverName = mysql
dataSourceName = root:123456@tcp(db:3306)/
dbName = casibase
redisEndpoint =
guacamoleEndpoint = 127.0.0.1:4822
isDemoMode = false
disablePreviewMode = false
logPostOnly = true
landingFolder =
casdoorEndpoint = http://casdoor:8000
clientId = c7996278a05559751d18
clientSecret = ddf7f830b50d04db9c4359fa4e7d419477bff688
casdoorOrganization = "casibase"
casdoorApplication = "casibase"
redirectPath = /callback
cacheDir = "C:/casibase_cache"
appDir = ""
isLocalIpDb = false
audioStorageProvider = ""
providerDbName = ""
socks5Proxy = "127.0.0.1:10808"
publicDomain = ""
adminDomain = ""
enableExtraPages = false
shortcutPageItems = []
usageEndpoints = []
iframeUrl = ""
forceLanguage = ""
defaultLanguage = "en"
staticBaseUrl = "https://cdn.casibase.org"
htmlTitle = "Casibase"
faviconUrl = "https://cdn.casibase.com/static/favicon.png"
logoUrl = "https://cdn.casibase.org/img/casibase-logo_1200x256.png"
navbarHtml = ""
footerHtml = "Powered by <a target="_blank" href="https://github.com/casibase/casibase" rel="noreferrer"><img style="padding-bottom: 3px;" height="20" alt="Casibase" src="https://cdn.casibase.org/img/casibase-logo_1200x256.png" /></a>"
appUrl = ""
frontendBaseDir = "../casibase"
showGithubCorner = false
defaultThemeType = "default"
defaultColorPrimary = "#5734d3"
defaultBorderRadius = 6
defaultIsCompact = false
avatarErrorUrl = "https://cdn.casibase.org/gravatar/error.png"
logConfig = {"adapter":"file", "filename": "logs/casibase.log", "maxdays":99999, "perm":"0770"}docker file version: "3.8"
services:
db:
image: mysql:8.0
restart: always
environment:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_DATABASE: casdoor
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
networks:
- casibase_network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 20s
retries: 10
casdoor:
image: casbin/casdoor:latest
restart: always
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
environment:
RUNNING_IN_DOCKER: "true"
volumes:
- ./conf:/conf
networks:
- casibase_network
casibase:
image: casbin/casibase-all-in-one:latest
restart: always
ports:
- "14000:14000"
depends_on:
- casdoor
environment:
RUNNING_IN_DOCKER: "true"
volumes:
- ./app.conf:/conf/app.conf
networks:
- casibase_network
volumes:
mysql_data:
networks:
casibase_network:
driver: bridge |
|
I'll reply with a comprensive report here: Docker Setup Issues: All-in-One Image Fails + Documentation Gaps + Casdoor URL Configuration ProblemSummaryThe Docker setup for Casibase has three critical issues that prevent the "quick start" experience advertised in the documentation. These issues make Docker deployment more time-consuming than installing from source, which defeats the purpose of providing Docker images. Issue 1: All-in-One Image Fails to StartSeverity: Critical Actual Behavior: docker run -p 14000:14000 casbin/casibase-all-in-one
Starting MariaDB database server: mariadbd ..
panic: dial tcp 172.17.0.1:3306: connect: connection refused
goroutine 1 [running]:
github.com/casibase/casibase/object.CreateTables()
/go/src/casibase/object/adapter.go:74 +0x47
main.main()
/go/src/casibase/main.go:35 +0x45Root Cause: The container starts the application before MariaDB is fully initialized, and the application attempts to connect to Proposed Solutions:
Impact: Users following the documentation cannot test Casibase using the recommended "quick start" method. Issue 2: Documentation Structure - Casdoor Requirement BuriedSeverity: Major Problem: Users cannot successfully run Casibase (with Docker or otherwise) without Casdoor already deployed, yet this critical dependency is not mentioned upfront. Current Documentation Structure: Proposed Documentation Structure: Rationale:
Proposed Solution:
Issue 3: Casdoor URL Configuration - Internal vs External AccessSeverity: Major
The Problem:
Current Behavior:
Current Workaround: Then configure Casibase with
Proposed Solutions:
Missing Configuration: Environment
Additional ContextThese issues significantly impact the "quick start" experience. A proper Docker setup should be simpler than source installation, but currently it requires:
This defeats the purpose of providing Docker images for easy evaluation. Impact Summary
Related Documentation:
Issue 4: Docker Compose Option Requires Source Code (Defeats "Try with Docker" Purpose)The official build:
context: ./
dockerfile: Dockerfile
target: STANDARDThis means:
This is a fundamental flaw in the documentation. Severity: Critical (Design Flaw) Current Documentation Says:
Critical Problems:
What "Try with Docker" Should Mean:
What It Actually Requires:
Proposed Solution: Option A: Provide a proper docker-compose.yml using pre-built images Create and document a complete version: '3.8'
services:
db:
image: mysql:8.0.25
# ... with health checks and ping waiting timeout
casdoor:
image: casbin/casdoor:latest
# ... properly configured
casibase:
image: casbin/casibase:latest # ← Use pre-built image!
# ... properly configured with Casdoor URLs (see previous issue)Option B: Remove Option-2 entirely If a working docker-compose with pre-built images cannot be provided, remove this option and only keep:
Option C: Rename to "Build from Source with Docker" If the intention is to build from source, rename this section to clarify:
Impact:
Recommendation: |
|
Hello, thank you very much for pointing out this issue. After investigation, I found that the problem with Option-1: Use the toy database occurs because, after adding the Thanks again for your report—I've already submitted a PR#1646 to fix this issue, and the documentation will also be updated as soon as possible. We truly appreciate your contribution! |
Uh oh!
There was an error while loading. Please reload this page.
https://casibase.org/docs/basic/try-with-docker/
Try Casibase with Docker
https://casibase.org/docs/basic/try-with-docker/
All reactions