Development configuration of KNIT API written in PHP, deployed using docker.
Requirements to work with project: git, docker, docker-compose
- Clone repository
$ git clone https://github.com/knit-pk/api-v1-php.git knit-api 
- Run project
$ cd knit-api $ docker-compose up
- 
Stop project $ docker-compose stop 
- 
Stop project with destroying all its data $ docker-compose down -v 
- 
Rebuild and run docker images $ docker-compose build --pull $ docker-compose up -d 
- 
Follow log output from containers $ docker-compose logs --follow 
- 
Feed database with default data. $ docker-compose exec api make fixtures-reload
- 
Clean and rebuild application cache. $ docker-compose exec api make cache-warmup-docker
- 
Running feature tests $ docker-compose exec api composer behat
- 
Run swoole sever locally $ bin/console swoole:server:run # or $ bin/console s:s:r
Docker images:
- PHP (php:7.2-cli-alpine3.7)
- Nginx (nginx:4-alpine)
- Redis (redis:4-alpine)
- Varnish - Http Cache (alpine:3.7)
- MySQL (mysql:5.7)
PHP Stack:
- Symfony (v4.1.*)
- Swoole Extension (v4.*)
- API Platform (v2.3.*)
Always for newest version: https://www.getpostman.com/collections/07d9bde930835627078a
