Skip to content
This repository has been archived by the owner on Nov 19, 2019. It is now read-only.

knit-pk/api-v1-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KNIT API (RESTful + GraphQL)

travis Maintainability Test Coverage Slack Status Open Source Love MIT Licence

Development configuration of KNIT API written in PHP, deployed using docker.

Run project

Requirements to work with project: git, docker, docker-compose

Installation

  1. Clone repository
    $ git clone https://github.com/knit-pk/api-v1-php.git knit-api
  2. Run project
    $ cd knit-api
    $ docker-compose up

Useful commands

  • 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

Informations

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.*)

Postman Collection

Always for newest version: https://www.getpostman.com/collections/07d9bde930835627078a