2017 © Pedro Peláez
 

library slim-skeleton

A Slim Framework skeleton application for rapid development with Docker And Swoole Using Domain Driven Development DDD

image

dev-pledge/slim-skeleton

A Slim Framework skeleton application for rapid development with Docker And Swoole Using Domain Driven Development DDD

  • Monday, April 2, 2018
  • by JRSaunders
  • Repository
  • 1 Watchers
  • 1 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

Slim Framework 3 Skeleton Application For DevPledge

This is based on slim/slim-skeleton from Josh Lockhart., (*1)

This also has Our Docker Compose and Base Dockerfiles included!, (*2)

Use this skeleton application to quickly setup and start working on a new Slim Framework 3 application. This application uses the latest Slim 3 with the PHP-View template renderer. It also uses the Monolog logger., (*3)

This skeleton application was built for Composer. This makes setting up a new Slim Framework application quick and easy., (*4)

Install the Application

Run this command from the directory in which you want to install your new Slim Framework application., (*5)

composer create-project dev-pledge/slim-skeleton [my-app-name]

Replace [my-app-name] with the desired directory name for your new application. You'll want to:, (*6)

  • Point your virtual host document root to your new application's public/ directory.
  • Ensure logs/ is web writeable.

To set up sentry, (*7)

docker-compose run --rm sentry upgrade

To run the application in development, you can also run either of these command., (*8)

docker-compose up

or, (*9)

composer start-docker

gem install docker-sync

docker-sync up

Run this command to run the test suite, (*10)

composer test

To resolve to the correct domain you want to use, (*11)

change files:, (*12)

vars inside [] are to be changed if needed!, (*13)

config/swoolehost.conf

    server{
        listen 80;
        listen [::]:80;
        listen 443;
        listen [::]:443;

        server_name [api.swoole.co.uk];

        location /
        {
            proxy_pass http://[api:9501];
        }
    }

config/webhost.conf
    server {
        listen 80;
        listen 443;
        index index.php index.html;
        root /var/www/public;

        server_name [api.web.co.uk];

        location / {
            try_files $uri /index.php?$args;
        }

        location ~ \.php$ {
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass [api:9000];
            fastcgi_index index.php;
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param PATH_INFO $fastcgi_path_info;
        }
    }

.developmentenv

    MYSQL_HOST="[mysql-db]"
    MYSQL_DB="devpledge"
    MYSQL_USER="root"
    MYSQL_PASSWORD="test_pass"
    JWT_SECRET="987ytgvbnytfcvbh4g3uwsjdcnfbr"
    SWOOLE_PORT="[9501]"
    API_DOMAIN="[api]"

docker-compose.yml

    version: "3"

    services:
      [api]:
        build:
          context: .
          dockerfile: api.dockerfile
        environment:
          docker: "true"
          production: "false"
        volumes:
          - .:/var/www
          - ./logs:/var/www/logs
        ports:
          - 9000:9000
          - [9501:9501]

      web:
        build:
          context: .
          dockerfile: web.dockerfile
        volumes:
          - ./config:/etc/nginx/conf.d
        ports:
          - 80:80
          - 443:443

      [mysql-db]:
        restart: always
        image: mysql:latest
        environment:
          MYSQL_ROOT_PASSWORD: 'test_pass'
          MYSQL_USER: 'test'
          MYSQL_PASS: 'pass'
        volumes:
         - ./data:/var/lib/mysql
        ports:
          - [3307:3306]

/etc/hosts (access by sudo nano /etc/hosts) 

    #add lines so your broswer resolves to correct domains on your MAC or Dev Machine
    127.0.0.1       [api.web.co.uk]
    127.0.0.1       [api.swoole.co.uk]

That's it! Now go build something cool., (*14)

This needs some work before this could go to PRODUCTION proper - but it will get you developing!, (*15)

The Versions

02/04 2018

dev-master

9999999-dev https://github.com/Dev-Pledge/SlimSkeleton

A Slim Framework skeleton application for rapid development with Docker And Swoole Using Domain Driven Development DDD

  Sources   Download

MIT

The Requires

 

The Development Requires

by John Saunders

rest psr7 docker microframework swoole router domain driven development framework application domain

02/04 2018

v0.0.9

0.0.9.0 https://github.com/Dev-Pledge/SlimSkeleton

A Slim Framework skeleton application for rapid development with Docker And Swoole Using Domain Driven Development DDD

  Sources   Download

MIT

The Requires

 

The Development Requires

by John Saunders

rest psr7 docker microframework swoole router domain driven development framework application domain

24/03 2018

v0.0.8

0.0.8.0 https://github.com/Dev-Pledge/SlimSkeleton

A Slim Framework skeleton application for rapid development with Docker And Swoole Using Domain Driven Development DDD

  Sources   Download

MIT

The Requires

 

The Development Requires

by John Saunders

rest psr7 docker microframework swoole router domain driven development framework application domain

17/02 2018

v0.0.7

0.0.7.0 https://github.com/Dev-Pledge/SlimSkeleton

A Slim Framework skeleton application for rapid development with Docker And Swoole Using Domain Driven Development DDD

  Sources   Download

MIT

The Requires

 

The Development Requires

by John Saunders

rest psr7 docker microframework swoole router domain driven development framework application domain

15/02 2018

v0.0.6

0.0.6.0 https://github.com/Dev-Pledge/SlimSkeleton

A Slim Framework skeleton application for rapid development with Docker And Swoole Using Domain Driven Development DDD

  Sources   Download

MIT

The Requires

 

The Development Requires

by John Saunders

rest psr7 docker microframework swoole router domain driven development framework application domain

15/02 2018

v0.0.5

0.0.5.0 https://github.com/Dev-Pledge/SlimSkeleton

A Slim Framework skeleton application for rapid development with Docker

  Sources   Download

MIT

The Requires

 

The Development Requires

by John Saunders

rest psr7 microframework router

14/02 2018

v0.0.4

0.0.4.0 https://github.com/Dev-Pledge/SlimSkeleton

A Slim Framework skeleton application for rapid development with Docker

  Sources   Download

MIT

The Requires

 

The Development Requires

by John Saunders

rest psr7 microframework router

12/02 2018

v0.0.3

0.0.3.0 https://github.com/Dev-Pledge/SlimSkeleton

A Slim Framework skeleton application for rapid development with Docker

  Sources   Download

MIT

The Requires

 

The Development Requires

by John Saunders

rest psr7 microframework router

12/02 2018

v0.0.2

0.0.2.0 https://github.com/Dev-Pledge/SlimSkeleton

A Slim Framework skeleton application for rapid development with Docker

  Sources   Download

MIT

The Requires

 

The Development Requires

by John Saunders

rest psr7 microframework router

11/02 2018

v0.0.1

0.0.1.0 https://github.com/Dev-Pledge/SlimSkeleton

A Slim Framework skeleton application for rapid development

  Sources   Download

MIT

The Requires

 

The Development Requires

by John Saunders

rest psr7 microframework router