Skip to content

Basic development environment for PHP and MySQL/MariaDB, Memcached, Redis

License

Notifications You must be signed in to change notification settings

aboglioli/phpdock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nginx + MariaDB/MySQL + PHP-FPM + PHP 7.0 + phpMyAdmin + Redis

Based on laradock.

It's made for having a PHP + DB environment quickly through docker-compose configuration. You can use any library or framework.

The workspace container gives you a basic Bash + PHP (with Composer) installation.

How to use

Install docker-compose.

You can create the environment cloning this repository inside your main repository:

# Cloning repository
git clone https://github.com/aboglioli/phpdock.git
cd phpdock

# Building the environment and setting it up.
# You can write mariadb instead of mysql if you want to use this.
# It can take a while (some minutes).
docker-compose up -d nginx mysql

# And access the workspace to install libraries or frameworks with composer
docker-compose exec workspace bash

Public folder

/var/www points to your root directory. It needs a public folder where Nginx looks at.

Nginx and php-fpm WORKDIR is /var/www/public and your root directory (where your application will be) outside phpdock is referenced with /var/www inside application container (application code container).

You have to make a directory called public/ inside the root directory. It will have the root directory of your application. By this way, you can include PHP files from the parent directory (../) to your code and that files can't be accessed directly from the browser.

Help & Questions

If you have problems, contact me: alan.boglioli@gmail.com If you improve this and you want to share it, send a Pull Request.

License

MIT License (MIT)

About

Basic development environment for PHP and MySQL/MariaDB, Memcached, Redis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages