Public | Automated Build

Last pushed: a year ago
Short Description
Short description is empty for this repo.
Full Description

PHP Development Environment in a docker container

Contents

Container commands & options

  • Commands

    • devenv:help - Display the help message.
    • devenv:run - Run the nginx server on the app folder.
    • devenv:deps - Access to install && clean subcommands for composer/npm dependencies.
    • devenv:tools - Access to gulp, npm & composer sub commands.
  • Environment parameters

    • WITH_PSQL - yes/no Use the built in PSQL server.
      • -e WITH_PSQL=yes
    • VERBOSE - yes/no Additional logging.
      • -e VERBOSE=yes
  • Volumes

    • /home/development/app - (mandatory) Mount the application folder here.
      • -v <path>:/home/development/app
    • /home/development/config/custom/sites-enabled - (mandatory) Mount nginx config files for the application.
    • /home/development/storage/psql - Persistant storage for the PSQL database.
    • /home/development/logs - Access to nginx, php5-fpm & psql logs.
    • /home/development/storage/files - File storage for file cache etc.
    • /home/development/storage/mongo - (todo) Add mongo & persistant storage.
    • /home/development/storage/mysql - (todo) Add mysql & persistant storage.

Usage examples

  1. Display the help message

docker run --rm -it redbuffstudio/docker-php-development:beta

  1. Run a php application
docker run --rm -it -p 80:80 -p 5432:5432 \
-v <path-to-app>:/home/development/app \
-v <path-to-psql-storage>:/home/development/storage/psql \
-v <path-to-logs>:/home/development/logs \
-v <path-to-configs>:/home/development/config/custom/sites-enabled \
-e WITH_PSQL=yes -e VERBOSE=yes \
redbuffstudio/docker-php-development:beta devenv:run
  1. Start the gulp watch process (if setup in the Gulpfile.js)
docker run --rm -it \
-v <path-to-app>:/home/development/app \
redbuffstudio/docker-php-development:beta devenv:tools gulp watch

License

Docker Pull Command
Owner
redbuffstudio
Source Repository

Comments (0)