From d880c9cc40cc86f3a515c979ee07f3d162c2279c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=8C=E6=A3=AE?= Date: Sat, 20 Jul 2024 10:45:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20casdoor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 萌森 --- apps/casdoor/1.645.0/docker-compose.yml | 9 ++------- apps/casdoor/1.645.0/scripts/init.sh | 8 ++++---- envs/casdoor/casdoor.env | 10 +++++----- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/apps/casdoor/1.645.0/docker-compose.yml b/apps/casdoor/1.645.0/docker-compose.yml index 80297eae..7e0ec08a 100644 --- a/apps/casdoor/1.645.0/docker-compose.yml +++ b/apps/casdoor/1.645.0/docker-compose.yml @@ -15,11 +15,6 @@ services: - 1panel-network ports: - ${PANEL_APP_PORT_HTTP}:8000 - build: - context: ./ - dockerfile: Dockerfile - target: STANDARD - entrypoint: /bin/sh -c './server --createDatabase=true' env_file: - /etc/1panel/envs/global.env - /etc/1panel/envs/casdoor/casdoor.env @@ -31,5 +26,5 @@ services: - dbName=${DB_NAME} - redisEndpoint=${REDIS_HOSTNAME}:${REDIS_PORT} - verificationCodeTimeout=10 - - appname="casdoor" - - authState="casdoor" + - appname=casdoor + - authState=casdoor diff --git a/apps/casdoor/1.645.0/scripts/init.sh b/apps/casdoor/1.645.0/scripts/init.sh index ca375e4a..687fe1ac 100644 --- a/apps/casdoor/1.645.0/scripts/init.sh +++ b/apps/casdoor/1.645.0/scripts/init.sh @@ -8,17 +8,17 @@ if [ -f .env ]; then echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env if [ "$DB_TYPE" == "mysql" ]; then - echo "dataSourceName=\"$DB_USER:$DB_PASSWD@tcp($DB_HOSTNAME:$DB_PORT)/\"" >> .env + echo "dataSourceName=$DB_USER:$DB_PASSWD@tcp($DB_HOSTNAME:$DB_PORT)/" >> .env fi if [ "$DB_TYPE" == "postgres" ]; then - echo "dataSourceName=\"user=$DB_USER password=$DB_PASSWD host=$DB_HOSTNAME port=$DB_PORT sslmode=disable dbname=$DB_NAME\"" >> .env + echo "dataSourceName=user=$DB_USER password=$DB_PASSWD host=$DB_HOSTNAME port=$DB_PORT sslmode=disable dbname=$DB_NAME" >> .env fi if [ -n "$REDIS_PASSWORD" ]; then - echo "redisEndpoint=\"$REDIS_HOSTNAME:$REDIS_PORT,$REDIS_DBINDEX,$REDIS_PASSWORD\"" >> .env + echo "redisEndpoint=$REDIS_HOSTNAME:$REDIS_PORT,$REDIS_DBINDEX,$REDIS_PASSWORD" >> .env else - echo "redisEndpoint=\"$REDIS_HOSTNAME:$REDIS_PORT,$REDIS_DBINDEX\"" >> .env + echo "redisEndpoint=$REDIS_HOSTNAME:$REDIS_PORT,$REDIS_DBINDEX" >> .env fi echo "Check Finish." diff --git a/envs/casdoor/casdoor.env b/envs/casdoor/casdoor.env index e446a4e8..d8a24c8a 100644 --- a/envs/casdoor/casdoor.env +++ b/envs/casdoor/casdoor.env @@ -1,10 +1,10 @@ -appname="casdoor" +appname=casdoor httpport=8000 -runmode="prod" +runmode=prod copyrequestbody=true -driverName="mysql" -dataSourceName="root:123456@tcp(localhost:3306)/" -dbName="casdoor" +driverName=mysql +dataSourceName= +dbName=casdoor tableNamePrefix= showSql=false redisEndpoint=