https://github.com/bytedance/douyincloud-thinkphp-nginx-demo
https://github.com/bytedance/douyincloud-thinkphp-nginx-demo
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (2.6%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: bytedance
- License: other
- Language: PHP
- Default Branch: main
- Size: 1.41 MB
Statistics
- Stars: 1
- Watchers: 2
- Forks: 8
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
douyincloud-thinkphp-nginx-demo
本项目是抖音云平台基于php语言thinkphp框架的开发模版,模版通过使用Redis和MongoDB实现了简单的hello-world功能。\ 抖音云平台支持基于Git代码和Docker镜像部署两种方式。其中,Dockerfile文件可以参考本项目中的Dockerfile文件。\ 部署在抖音云平台的服务日志需要重定向到标准输出,并在抖音云平台日志功能中查看。
目录结构
~~~
.
├── Dockerfile Dockerfile文件
├── LICENSE.txt
├── README.md Readme文件
├── app 应用服务目录
│ ├── AppService.php
│ ├── BaseController.php
│ ├── ExceptionHandle.php
│ ├── Request.php
│ ├── common.php
│ ├── controller 控制器目录
│ │ └── Index.php index控制器
│ ├── event.php
│ ├── middleware.php
│ ├── model 模型目录
│ │ ├── Factory.php 工厂文件
│ │ ├── HelloComponent.php HelloComponent接口文件
│ │ ├── MongoComponent.php Mongo组件
│ │ └── RedisComponent.php Redis组件
│ ├── provider.php
│ └── service.php
├── composer.json composer依赖管理
├── composer.lock composer依赖管理
├── conf 配置文件目录
│ └── nginx.conf nginx配置
├── config thinkphp框架配置目录
│ ├── app.php
│ ├── cache.php 缓存配置目录
│ ├── console.php
│ ├── cookie.php
│ ├── database.php 数据库配置目录
│ ├── filesystem.php
│ ├── lang.php
│ ├── log.php
│ ├── middleware.php
│ ├── route.php
│ ├── session.php
│ ├── trace.php
│ └── view.php
├── extend
├── public
│ ├── favicon.ico 图标
│ ├── index.php thinkphp框架入口文件
│ ├── robots.txt
│ ├── router.php 快速测试
│ └── static 静态资源
├── route thinkphp框架路由目录
│ └── app.php 路由配置文件
├── run.sh 容器启动时运行脚本
├── runtime 运行时目录
│ └── log 日志目录
├── think
├── vendor 第三方类库目录
~~~
请求方法
前往抖音云托管平台「调试」功能界面,进行请求调试。
API说明
GET /api/hello
对组件打招呼
请求参数
target:string组件名:redis,mongodb
响应结果
json
{
"err_no": 0,
"err_msg": "success",
"data": "hello,redis"
}
POST /api/set_name
给组件设置名称
请求参数
target:string组件名:redis,mongodbname:string名称
响应结果
json
{
"err_no": 0,
"err_msg": "success",
"data": ""
}
组件使用注意事项
在抖音云托管平台上启用组件后,抖音云平台会自动将组件的地址,账号,密码以环境变量的方式注入到容器中。\
以Redis为例,在抖音云托管平台启用Redis组件后,平台会生成 REDIS_ADDRESS,REDIS_USERNAME,REDIS_PASSWORD三个环境变量,在业务代码中可以使用如下代码获取相应值。
$redisAddr = getenv("REDIS_ADDRESS");
$redisUserName = getenv("REDIS_USERNAME");
$redisPassword = getenv("REDIS_PASSWORD");
License
This project is licensed under the Apache-2.0 License.
Owner
- Name: Bytedance Inc.
- Login: bytedance
- Kind: organization
- Location: Singapore
- Website: https://opensource.bytedance.com
- Twitter: ByteDanceOSS
- Repositories: 255
- Profile: https://github.com/bytedance
GitHub Events
Total
- Pull request event: 1
- Fork event: 2
Last Year
- Pull request event: 1
- Fork event: 2
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 1
- Total pull requests: 2
- Average time to close issues: 13 days
- Average time to close pull requests: 2 months
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 1.0
- Average comments per pull request: 0.5
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: 2 months
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.5
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- ghost (1)
Pull Request Authors
- yaodong518 (4)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- public-cn-beijing.cr.volces.com/public/base php-7.4-fpm-nginx build
- symfony/var-dumper ^4.2 development
- topthink/think-trace ^1.0 development
- mongodb/mongodb ^1.13
- php >=7.2.5
- topthink/framework ^6.0.0
- topthink/think-orm ^2.0
- symfony/polyfill-mbstring v1.26.0 development
- symfony/polyfill-php72 v1.26.0 development
- symfony/var-dumper v4.4.42 development
- topthink/think-trace v1.4 development
- jean85/pretty-package-versions 2.0.5
- league/flysystem 1.1.9
- league/flysystem-cached-adapter 1.1.0
- league/mime-type-detection 1.11.0
- mongodb/mongodb 1.13.0
- psr/cache 1.0.1
- psr/container 1.1.2
- psr/http-message 1.0.1
- psr/log 1.1.4
- psr/simple-cache 1.0.1
- symfony/polyfill-php80 v1.26.0
- topthink/framework v6.0.13
- topthink/think-helper v3.1.6
- topthink/think-orm v2.0.54