mirror of
https://github.com/Haxxnet/Compose-Examples.git
synced 2026-04-01 05:25:41 +02:00
12
examples/casdoor/README.md
Normal file
12
examples/casdoor/README.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# References
|
||||
|
||||
- https://github.com/casdoor/casdoor
|
||||
- https://casdoor.org/pl/docs/basic/try-with-docker/
|
||||
|
||||
# Notes
|
||||
|
||||
You have to manually supply an `app.conf` configuration file.
|
||||
|
||||
Within this file, you have to define your postgresql database connection string.
|
||||
|
||||
An example `app.conf` is provided in this repository.
|
||||
18
examples/casdoor/app.conf
Normal file
18
examples/casdoor/app.conf
Normal file
@@ -0,0 +1,18 @@
|
||||
# general
|
||||
appname = casdoor
|
||||
httpport = 8000
|
||||
runmode = prod
|
||||
|
||||
# database
|
||||
driverName = postgres
|
||||
dataSourceName = host=db port=5432 user=casdoor password=Str0ngPassw0rt! dbname=casdoor sslmode=disable
|
||||
|
||||
# logging and debugging
|
||||
showSql = true
|
||||
logPostOnly = true
|
||||
|
||||
# more settings
|
||||
verificationCodeTimeout = 10
|
||||
inactiveTimeoutMinutes = 10
|
||||
staticBaseUrl = "https://cdn.casbin.org"
|
||||
enableGzip = true
|
||||
47
examples/casdoor/docker-compose.yml
Normal file
47
examples/casdoor/docker-compose.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
services:
|
||||
|
||||
casdoor:
|
||||
image: casbin/casdoor:2.353.0
|
||||
container_name: casdoor
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- db
|
||||
ports:
|
||||
- 8000:8000
|
||||
expose:
|
||||
- 8000
|
||||
environment:
|
||||
- GIN_MODE=release
|
||||
- RUNNING_IN_DOCKER=true
|
||||
volumes:
|
||||
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/casdoor/conf:/conf # config file must be created manually with postgres connection
|
||||
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/casdoor/logs:/logs
|
||||
#networks:
|
||||
# - proxy
|
||||
# - casdoor_net
|
||||
#labels:
|
||||
# - traefik.enable=true
|
||||
# - traefik.docker.network=proxy
|
||||
# - traefik.http.routers.casdoor.rule=Host(`casdoor.example.com`)
|
||||
# - traefik.http.services.casdoor.loadbalancer.server.port=8000
|
||||
# # Optional part for traefik middlewares
|
||||
# - traefik.http.routers.casdoor.middlewares=local-ipwhitelist@file,crowdsec@file,limit-CHANGEME
|
||||
|
||||
db:
|
||||
image: postgres:18-alpine
|
||||
container_name: casdoor-db
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- POSTGRES_USER=casdoor
|
||||
- POSTGRES_PASSWORD=pls-changeme-to-strong-pw
|
||||
- POSTGRES_DB=casdoor
|
||||
volumes:
|
||||
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/casdoor/db:/var/lib/postgresql
|
||||
#networks:
|
||||
# - casdoor_net
|
||||
|
||||
#networks:
|
||||
# proxy:
|
||||
# external: true
|
||||
# casdoor_net:
|
||||
# internal: true
|
||||
Reference in New Issue
Block a user