Casbin Forum runs on Casnode, the open-source Discourse-style forum. Try the Casnode demo →
Casbin Forum

which Dockerfile i can use after i modify some code and use postgres, the original Dockerfile seems only for MySql.

3views
3users
1 minread

You can write your own and just apply your conf file. What database are you trying to hook up?

Here is an example, you will need to supply your own conf folder with the correct postgres config: ```version: '3.1'
services:
casdoor:
image: casbin/casdoor:v1.874.0
restart: unless-stopped
ports:
- "8000:8000"
entrypoint: /bin/sh -c './server --createDatabase=true'
depends_on:
db:
condition: service_healthy
environment:
RUNNING_IN_DOCKER: "true"
volumes:
- ./conf:/conf/

db:
image: postgres:17
restart: unless-stopped
ports:
- "5432:5432"
volumes:
- postgres-db-data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: ***
POSTGRES_USER: postgres
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 1s
timeout: 5s
retries: 60

sorry, not the docer-compose, i need the Dockerfile for build casdoor image without mysql.

If you use CMD in compose or pass a different cmd to the docker command it wont start the db and basically its installed there silently.

You can also clone the repo and remove those lines and build your own if you want. We just use the docker image and override the command like I did in the compose example above

Got it, thanks! Since you’ve already provided an image for Casdoor only in the doc, would it be possible for you to also publish the Dockerfile used to create that image?

1 / 10
Mar 2025