tseho/symfony-api-skeleton

v2.0.0 2021-11-29 22:13 UTC

This package is auto-updated.

Last update: 2024-08-29 05:50:30 UTC


README

如何使用骨架

composer create-project --ignore-platform-reqs tseho/symfony-api-skeleton [directory]

生产环境

构建Docker镜像

DOCKER_IMAGE_NAME=foo DOCKER_IMAGE_VERSION=latest make docker-image

在端口8080上启动apache+php

docker run -d -p 127.0.0.1:8080:8080/tcp $DOCKER_IMAGE_NAME:$DOCKER_IMAGE_VERSION

开发环境

3步启动项目

  1. 创建本地的.env文件
make .env
  1. 如有必要,编辑.env中的值
  2. 启动开发环境
make up

有用的命令

make up # build & start the containers
make down # stop the containers
make destroy # remove all containers, all volumes, all docker images

make tests # launch all the tests

docker-compose run --rm php bin/console [cmd] # execute a symfony command
docker-compose run --rm composer [cmd] # execute a composer command