Skip to content

srdjanmitrovic/phalcon-compose

Repository files navigation

Phalcon 2.1 Docker Edition Build Status phalcon-2.1.x

The unofficial Phalcon Docker Edition – by @sergeyklay

This is an unofficial, open-source and community-driven boilerplate for Phalcon projects that run on Docker. It's an attempt of standardizing and making it easier to bootstrap Phalcon applications ready for development and production environments. The main tools used are Phalcon, Docker and Docker Compose. Other things included are:

  • Nginx 1.9.11
  • MySQL 5.7.11
  • Memcached 1.4
  • PHP 5.6.19 + PHP-FPM
  • Xdebug 2.3.3
  • Opcache 7.0.6-dev
  • Beanstalk 1.10
  • Redis 3.0.7

Get Started

Dependencies

To run this stack on your machine, you need at least:

Installation

First, clone this repository:

$ git clone [email protected]:sergeyklay/phalcon-compose.git

Next, put your Phalcon application into application folder. Then add your_site_name.dev in your /etc/hosts file as follows:

127.0.0.1	your_site_name.dev

Usage

Now you are ready to build, creates, start, and attach to containers for your application, run:

docker-compose up -d

and you can visit your Phalcon application on the following URL: http://your_site_name.dev

Containers Included

Here are the docker & docker-compose built images:

  • application: Phalcon 2.1.x application code container
  • db: MySQL 5.7.11 database container
  • redis: Redis 3.0 database container
  • memcached: Memcached Server 1.4 container
  • queue: Beanstalk 1.10 queue container
  • php: PHP 5.6.19 + PHP-FPM container in which the application volume is mounted
  • nginx: Nginx 1.9.11 webserver container in which application volume is mounted too

This results in the following running containers:

$ docker-compose ps

      Name                   Command              State                        Ports
----------------------------------------------------------------------------------------------------------
beanstalkd_queue   beanstalkd -p 11300 -b /data   Up      0.0.0.0:11300->11300/tcp
core_app           bash                           Up
memcached_db       /entrypoint.sh memcached       Up      0.0.0.0:11211->11211/tcp
mysql_db           /entrypoint.sh mysqld          Up      0.0.0.0:3307->3306/tcp
nginx_web          nginx -g daemon off;           Up      0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp
php_5.6_fpm        /usr/sbin/php5-fpm -F          Up      0.0.0.0:10000->10000/tcp, 0.0.0.0:9000->9000/tcp
redis_db           /entrypoint.sh redis-server    Up      0.0.0.0:6379->6379/tcp

Read logs

You can access logs by using docker logs <container_name> into your host machine.

About

Phalcon 2 ready to go Docker Compose project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages