Skip to content

Docker based local development environment

Notifications You must be signed in to change notification settings

jesusoctavioas/development

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Development base

Docker based local development environment. Php and Npm users are synced with the current user, so we will have all the rights to modify and access the content generated by using container commands.

What we have here

For the start:

  • Apache 2.4
  • PHP 7.4 fpm with:
    • xDebug preconfigured with profiler preconfigured
    • remote debuggind preconfigured
    • error reporting enabled
  • MySQL 5.7 with adminer
  • Mailhog preconfigured to catch outgoing emails
  • SPX preconfigured (PHP Simple Profiler - https://github.com/NoiseByNorthwest/php-spx)
  • Npm

Requirements

Quick start

git clone https://github.com/Sieg/development.git myProjectName
cd myProjectName

make setup
make up

Access the website through the http://localhost

  • phpinfo shown on index page
  • example with database connection
  • example with email sending and catching it with mailhog
    • run the composer install on php container first.

Adminer is available via http://localhost:8080

  • Server: mysql
  • Credentials: root/root

Mailhog is available via http://localhost:8025/

SPX preconfigured and UI accessible via http://localhost?SPX_KEY=dev&SPX_UI_URI=/

Running php stuff

Call commands directly on the container:

docker-compose run php php -v

Login to the container, and run the commands from inside:

docker-compose exec php bash
php -v

Alternatively:

make php
php -v

Running npm commands

docker-compose run node npm install bootstrap

Inspired by OXID :)

Contributing

You like to contribute? 🙌 AWESOME 🙌 Throw a pull request, with the description why you/we need it and instructions how to test it out :)

About

Docker based local development environment

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Dockerfile 53.1%
  • PHP 32.6%
  • Makefile 14.3%