knit-pk / api-v1-php

KNIT API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

KNIT API

License:MIT License


Languages

Language:PHP 89.3%Language:HTML 3.7%Language:Dockerfile 1.7%Language:Shell 1.7%Language:Gherkin 1.5%Language:VCL 1.2%Language:Makefile 0.9%