Pārlūkot izejas kodu

修复部分系统出现重复修改密码的问题

kuaifan 4 gadi atpakaļ
vecāks
revīzija
7f21b4ee46
7 mainītis faili ar 17 papildinājumiem un 16 dzēšanām
  1. 2 0
      .gitignore
  2. 2 0
      app/Module/Users.php
  3. 10 6
      docker-compose.yml
  4. 2 7
      docker/php.Dockerfile
  5. 0 1
      install/DOCKER.md
  6. 0 1
      install/en/DOCKER.md
  7. 1 1
      package.json

+ 2 - 0
.gitignore

@@ -9,6 +9,8 @@
 /public/.user.ini
 /public/hot
 /storage/*.key
+/docker/mariadb
+/docker/log
 /vendor
 .env
 .env.backup

+ 2 - 0
app/Module/Users.php

@@ -240,6 +240,8 @@ class Users
             $userinfo['setpass'] = $userinfo['userpass'] ? 1 : 0;
         }
         //
+        $userinfo['id'] = intval($userinfo['id']);
+        $userinfo['changepass'] = intval($userinfo['changepass']);
         $userinfo['setting'] = Base::string2array($userinfo['setting']);
         $userinfo['userimg'] = self::userimg($userinfo['userimg']);
         $userinfo['identity'] = is_array($userinfo['identity']) ? $userinfo['identity'] : explode(",", trim($userinfo['identity'], ","));

+ 10 - 6
docker-compose.yml

@@ -21,6 +21,8 @@ services:
       context: .
       dockerfile: docker/php.Dockerfile
     volumes:
+      - ./docker/wookteam.conf:/etc/supervisor/conf.d/wookteam.conf
+      - ./docker/log/supervisor:/var/log/supervisor
       - ./:/var/www
     environment:
       TZ: "Asia/Shanghai"
@@ -31,11 +33,13 @@ services:
 
   mariadb:
     hostname: mariadb
-    image: mariadb
-    command: --default-authentication-plugin=mysql_native_password
+    image: "bitnami/mariadb"
+    user: root
+    volumes:
+      - ./docker/mariadb:/bitnami/mariadb
     environment:
-      - "MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}"
-      - "MYSQL_DATABASE=${DB_DATABASE}"
-      - "MYSQL_USER=${DB_USERNAME}"
-      - "MYSQL_PASSWORD=${DB_PASSWORD}"
+      - "MARIADB_ROOT_PASSWORD=${DB_ROOT_PASSWORD}"
+      - "MARIADB_DATABASE=${DB_DATABASE}"
+      - "MARIADB_USER=${DB_USERNAME}"
+      - "MARIADB_PASSWORD=${DB_PASSWORD}"
     restart: always

+ 2 - 7
docker/php.Dockerfile

@@ -1,4 +1,4 @@
-FROM phpswoole/swoole:4.5.2-php7.4
+FROM phpswoole/swoole:4.5.9-php7.4
 
 # Installation dependencies and PHP core extensions
 RUN apt-get update \
@@ -21,17 +21,12 @@ RUN apt-get update \
         ca-certificates \
         libjpeg-dev \
         libfreetype6-dev \
+        inotify-tools \
         && curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - \
         && apt-get -y install nodejs \
         && rm -r /var/lib/apt/lists/* \
         && docker-php-ext-configure gd --with-freetype --with-jpeg \
         && docker-php-ext-install pdo_mysql gd pcntl zip
 
-# Copy application file to /var/www
-COPY . /var/www
-
-# Copy scupervisor file conf
-COPY docker/wookteam.conf /etc/supervisor/conf.d/wookteam.conf
-
 # Set the WORKDIR to /var/www so all following commands run in /var/www
 WORKDIR /var/www

+ 0 - 1
install/DOCKER.md

@@ -28,7 +28,6 @@ cp .env.docker .env
 #### 2、构建项目
 
 ```bash
-./cmd build php
 ./cmd composer install
 ./cmd artisan key:generate
 ./cmd artisan migrate --seed

+ 0 - 1
install/en/DOCKER.md

@@ -28,7 +28,6 @@ cp .env.docker .env
 #### 2. Build image & install
 
 ```bash
-./cmd build php
 ./cmd composer install
 ./cmd artisan key:generate
 ./cmd artisan migrate --seed

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
     "name": "wookteam",
-    "version": "1.5.19",
+    "version": "1.5.20",
     "description": "WookTeam是一款轻量级的开源在线团队协作工具,提供各类文档工具、在线思维导图、在线流程图、项目管理、任务分发、即时IM,知识库管理等工具。",
     "scripts": {
         "ide-helper": "php artisan ide-helper:generate",