shirtnetwork/designer-backend-skeleton
Composer 安装命令:
composer require shirtnetwork/designer-backend-skeleton
包简介
Project skeleton for shirtnetwork designer backend solution
README 文档
README
This backend will handle configuration files, font management and uploading files for the shirtnetwork designer. This backend is used for all implementations. Feel free to adapt this skeleton to your own needs.
❗ We recommend using the nodejs based version whenever possible
Installation
Use git to clone the repository
git clone https://github.com/aggrosoft/designer-backend-skeleton.git
Then install the dependencies using composer inside the created folder
composer install
Configuration
The repository comes with a config.inc.sample.php file, copy this file to config.inc.php and adjust it to your needs. If you do not copy the file before first request it will be created automatically. Files are stored in the var/ subfolders by default.
Point your webserver to serve the root of the application, it is pre configured to work with apache webserver. We recommend using a subdomain or a separate domain for the app e.g.: https://config.example.org
Usage
Depending on your consuming system you will need to configure upload and config urls. Use as following:
Upload Endpoint
https://config.example.org/files
Config Endpoint
Fire up the settings interface to define fonts:
https://config.example.org/settings/fonts
Security
❗ Be sure to add at least one user in the auth section of the config file, otherwise authentication is skipped and everybody will be able to modify your settings.
Also be sure to set allowed-origins in config.inc.php so only specific endpoints can upload files and configurations.
NGINX
You can use NGINX as a webserver, as the designer backend is a slim application you will have to configure NGINX as following
server {
listen 80;
server_name example.com;
index index.php;
error_log /path/to/example.error.log;
access_log /path/to/example.access.log;
root /path/to/public;
location / {
try_files $uri /index.php$is_args$args;
}
location ~ \.php {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
}
}
❗
Since nginx will not route /config routes using this method you can rename config.inc.php to cfg.inc.php
as a workaround. See the Slim v4 Documentation
for further information.
Contributions to improving the nginx config are very welcome.
Cron
To cleanup old uploaded files including their metadata the server ships with a symfony console command. Execute as following
bin/console uploads:cleanup
This will delete all files older than 30 days, if the file was manifested it is valid 3 years instead.
Updating
Similar to installing, if you did not change the skeleton do the following:
git pull composer update
Omit git pull if you did any changes to the skeleton.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
shirtnetwork/designer-backend-skeleton 适用场景与选型建议
shirtnetwork/designer-backend-skeleton 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 1, 最近一次更新时间为 2020 年 01 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 shirtnetwork/designer-backend-skeleton 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 shirtnetwork/designer-backend-skeleton 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-01-13