定制 lux1177/api-starter-kit 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lux1177/api-starter-kit

最新稳定版本:1.0.0

Composer 安装命令:

composer create-project lux1177/api-starter-kit

包简介

README 文档

README

Starter kit for API with Symfony, Doctrine, Maker Bundle, Migrations Bundle, VichUploader-bundle, Api-Platform and JWT-auth.

Kit has also already created User and MediaObject entities with all crud routes

Kit has 3 docker containers: php, nginx and mysql

poster

Installation

Download the project
composer create-project lux1177/api-starter-kit --ignore-platform-reqs --no-scripts project-name

Go to the project directory
cd project-name

Run docker containers
docker compose up -d

Install composer scripts:
docker compose exec php composer install

To install project run command:
docker compose exec php bin/console ask:install

Done! You can open http://localhost:8505/api via browser. By the way, you can change this port by changing DOCKER_NGINX_PORT variable in .env file.

Docker

For enter to php container run docker compose exec php bash

For enter to mysql container run docker compose exec mysql bash

For enter to nginx container run docker compose exec nginx bash

You can change containers prefix by changing DOCKER_PROJECT_NAME variable in .env file.

Also, you can change public ports of nginx and mysql by changing DOCKER_NGINX_PORT and DOCKER_DATABASE_PORT

Database allows connections only from localhost. Because of this when you use the project on production and want to connect to database from your computer you should connect via ssh bridge.

Cron

You can use docker/php/cron-file for cron jobs. After you must re-build php container by running command:
docker compose up -d --build

Swagger

You can change project name and description on swagger by editing file config/packages/api_platform.yaml

Git Hook

If you don't use any deploying system you can do
cp docker/other-files/git/hooks/post-merge .git/hooks

In this way git always executes command bin/console ask:deploy. You can change this command in the file src/Command/AskDeployCommand.php. This command will install requirements via composer, clear caches, change owner of ./var and ./public/media folders to www-data, will run migrations.

JWT keys

For use Json Web Token system you must create private and public keys. They are have already created when you install project. You can re-create them with:

bin/console ask:generate:jwtKeys

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2024-08-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固