wesmiler пре 6 година
родитељ
комит
61ef8189a3
10 измењених фајлова са 1509 додато и 0 уклоњено
  1. 2 0
      .dockerignore
  2. 17 0
      .gitignore
  3. 2 0
      CONTRIBUTING.md
  4. 40 0
      Dockerfile
  5. 21 0
      LICENSE
  6. 46 0
      composer.json
  7. 1315 0
      composer.lock
  8. 29 0
      docker-compose.yml
  9. 36 0
      think
  10. 1 0
      version

+ 2 - 0
.dockerignore

@@ -0,0 +1,2 @@
+# Created by .ignore support plugin (hsz.mobi)
+.git*

+ 17 - 0
.gitignore

@@ -0,0 +1,17 @@
+.buildpath
+.DS_Store
+.project
+.settings
+.idea
+.git
+/build
+/public/assets/dist
+/node_modules
+Vagrantfile
+.vagrant
+/nbproject/private/
+/public/themes/default/weixin/index/entry - 副本.html
+/public/themes/default/weixin/public/assets/js/entry - 副本.js
+/public/themes/default/weixin/public/assets/js/entry_back.js
+/data/config/config.php
+/data/config/database.php

+ 2 - 0
CONTRIBUTING.md

@@ -0,0 +1,2 @@
+如何贡献我的源代码
+===

+ 40 - 0
Dockerfile

@@ -0,0 +1,40 @@
+FROM php:7.1-apache
+
+MAINTAINER jayknoxqu@gmail.com
+
+#设置容器时区
+ENV TZ Asia/Shanghai
+
+#设置程序入口
+ENV APACHE_DOCUMENT_ROOT /var/www/html/public
+
+RUN ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime && echo ${TZ} > /etc/timezone \
+    && sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf \
+    && sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \
+    #添加阿里云的镜像源
+    && mv /etc/apt/sources.list /etc/apt/sources.list.bak \
+    && echo "deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib" >/etc/apt/sources.list \
+    && echo "deb http://mirrors.aliyun.com/debian-security stretch/updates main" >>/etc/apt/sources.list \
+    && echo "deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib" >>/etc/apt/sources.list \
+    && echo "deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib" >>/etc/apt/sources.list \
+    #安装程序依赖库
+    && apt-get update && apt-get install -y \
+              libfreetype6-dev \
+              libjpeg62-turbo-dev \
+              libpng-dev \
+    #安装 PHP 依赖
+    && docker-php-ext-install pdo_mysql \
+    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
+    && docker-php-ext-install -j$(nproc) gd \
+    #删除包缓存中的所有包
+    && apt-get clean \
+    && apt-get autoclean \
+    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
+
+#复制代码到PHP容器
+COPY . /var/www/html
+
+# 开启URL重写 并且 添加目录权限
+RUN a2enmod rewrite \
+    && chmod -R 0755 /var/www/html \
+    && chown -R www-data:www-data /var/www/html

+ 21 - 0
LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2013-present ThinkCMF (https://www.thinkcmf.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 46 - 0
composer.json

@@ -0,0 +1,46 @@
+{
+    "name": "thinkcmf/thinkcmf",
+    "description": "ThinkCMF based on ThinkPHP 5.1 , it is a free and open source Content Management Framework(CMF)",
+    "type": "project",
+    "keywords": [
+        "cmf",
+        "thinkcmf",
+        "framework",
+        "thinkphp",
+        "ORM"
+    ],
+    "homepage": "http://www.thinkcmf.com/",
+    "license": "MIT",
+    "authors": [
+        {
+            "name": "thinkcmf",
+            "email": "catman@thinkcmf.com"
+        }
+    ],
+    "require": {
+        "php": ">=5.6.0",
+        "ext-json": "*",
+        "ext-curl": "*",
+        "ext-pdo": "*",
+        "topthink/think-helper": "^1.0",
+        "topthink/think-image": "^1.0",
+        "thinkcmf/cmf-app": "~5.1.0",
+        "thinkcmf/cmf-install": "~5.1.0",
+        "thinkcmf/cmf-api": "~5.1.0",
+        "phpoffice/phpexcel": "^1.8",
+        "alibabacloud/client": "^1.5"
+    },
+    "extra": {
+        "think-path": "vendor/thinkphp",
+        "think-config": "data/config"
+    },
+    "config": {
+        "vendor-dir": "vendor"
+    },
+    "repositories": {
+        "packagist": {
+            "type": "composer",
+            "url": "https://packagist.phpcomposer.com"
+        }
+    }
+}

Разлика између датотеке није приказан због своје велике величине
+ 1315 - 0
composer.lock


+ 29 - 0
docker-compose.yml

@@ -0,0 +1,29 @@
+version: "2"
+
+services:
+  mysql:
+    image: mysql:8.0.13
+    restart: always
+    command: --default-authentication-plugin=mysql_native_password
+    container_name: thinkcmf-db
+    environment:
+      - MYSQL_ROOT_PASSWORD=Root@123
+      - MYSQL_USER=thinkcmf
+      - MYSQL_PASSWORD=Thinkcmf@123
+      - MYSQL_DATABASE=thinkcmf
+      - TZ=Asia/Shanghai
+    volumes:
+      - ./mysql:/var/lib/mysql
+    ports:
+      - "3306:3306"
+      - "80:80"
+    expose:
+      - 80
+
+  thinkcmf:
+    build: .
+    network_mode: service:mysql
+    restart: always
+    container_name: thinkcmf-web
+    depends_on:
+      - mysql

+ 36 - 0
think

@@ -0,0 +1,36 @@
+#!/usr/bin/env php
+<?php
+// +----------------------------------------------------------------------
+// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
+// +----------------------------------------------------------------------
+// | Author: 老猫 <zxxjjforever@163.com>
+// +----------------------------------------------------------------------
+namespace think;
+// 调试模式开关
+define("APP_DEBUG", true);
+
+// 定义CMF根目录,可更改此目录
+define('CMF_ROOT', __DIR__ . '/');
+
+// 定义CMF数据目录,可更改此目录
+define('CMF_DATA', CMF_ROOT . 'data/');
+
+// 定义网站入口目录
+define('WEB_ROOT', __DIR__ . '/public/');
+
+// 定义应用目录
+define('APP_PATH', CMF_ROOT . 'app/');
+
+// 定义缓存目录
+define('RUNTIME_PATH', CMF_ROOT . 'data/runtime_cli/');
+
+// 加载基础文件
+require __DIR__ . '/vendor/thinkphp/base.php';
+
+// 应用初始化
+Container::get('app', [APP_PATH])->initialize();
+
+// 控制台初始化
+Console::init();

+ 1 - 0
version

@@ -0,0 +1 @@
+5.1.3