Skip to content

A docker config to enable me to quickly start a random php project

License

Notifications You must be signed in to change notification settings

thomascrepain/php-development-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Development stack

A docker config to enable me to quickly start a random php project.

Quickstart

0. Prerequisites

1. Download

git clone git@github.com:thomascrepain/php-development-stack.git

2. Set-up the environment variables

cd php-development-stack
cp .env.example .env

3. Start Docker

In the project root folder run:

docker-compose up

The app will be running at http://localhost

Directory structure

.
├── data        # Persistent data (e.g., database)
├── logs        # Logs of the app and all supporting services
├── docs        # Documentation files
├── public      # Public files (webroot)
├── etc         # Supporting services (e.g., Docker containers) and their configs
├── src         # Source files
├── tests       # Automated tests
├── .env        # Environment variables 
├── LICENSE
└── README.md

Supporting services

This repo only uses official Docker images from Docker Hub. Any modifications to these images are available in services/<image-name>/Dockerfile.

Nginx (stable-alpine)

The application is available at http://localhost

PHP-FPM (7-fpm-alpine)

Installed:

* libmcrypt
* lybmcrypt-dev
* mysql-client
* icu-dev
* make
* gcc
* g++
* autoconf
* pdo_mysql
* iconv
* mcrypt
* intl
* opcache
* mbstring

MariaDB (latest)

The MariaDB server is for the host machine available at localhost:3306. This should be turned off in production or blocked by firewall.

When the container runs for the first time it will look in the services/mariadb/initial-data directory for any .sh, .sql and .sql.gz files. These files will be executed in alphabetical order.

Mailcatcher (latest)

An SMTP server is available for the application on port 1025. All emails send through this server are available at http://localhost:1080

Composer (latest)

Composer is available as docker-compose run composer.

Releases

No releases published

Packages

No packages published

Languages