Skip to content

rrgarciach/php-docker-compose-poc

Repository files navigation

PHP application with Docker Compose P.O.C

This is a deployeable PHP application contained with Docker Compose.

TODO:

  • Implement CRUD operations with ActiveRecord.
  • Implement Redis with refresh token strategy.
  • Add unit test.
  • Include API documentation.

Getting Started

Prerequisites

Installing

Running with Docker (recommended)

  • Clone this repo on local machine and navigate into directory.
  • Build and run application: docker-compose up
  • App will be served at http://localhost:8080

Debugging

Current container is provisioned with Xdebug ready to use. The only local setup needed is the port's binding and interfaces. In order to do it only run this command as follows depending on your local OS:

Mac OSX:

sudo ifconfig en0 alias 10.254.254.254 255.255.255.0

Linux OS:

sudo ip addr add 10.254.254.254/24 brd + dev eth0 label eth0:1

Additional hints

To get access to container's internal bash terminal simply run:

docker exec -it users-service /bin/bash

Built With

  • Silex - PHP micro-framework.
  • PHP ActiveRecord - Open source ORM library based on ActiveRecord pattern.
  • Docker - Used to build and run application container and its services.
  • MySQL - Open source relational DBMS.
  • Redis - Open source in-memory data structure store.

Versioning

This project uses SemVer for versioning.

About

Proof of concept of a PHP application with Docker Compose

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors