Skip to content

Alpine based docker image w/ a Nginx/PHP-FPM environment - optimized for Typo3 development.

License

Notifications You must be signed in to change notification settings

ubleipzig/dev-www

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP based development environment dev-www

What is this image intended for?

This image is for all php developers who want a basic development environment setup.

It is out of the box usable on linux hosts with a docker engine version >= 1.3

Includes your app path at a nginx and php-fpm basic setup and provides any special developing features as:

  • xdebug
  • phpinfo

Concerning building your PHP app there are availabel composer as package manager and phing as build tool.

How apply the image?

Download and go to the folder building the images as e.g.

docker build --tag dev-www:latest .

Run the image and include your developing php app folder

docker run --name dev-www -d -v /path/to/my/project:/app -p 127.0.0.1:80:80 dev-www:latest .

A container named dev-www will started mounting your php app at port 80. Call http://127.0.0.1/ at your browser to verify the runtime environment.

How to debug?

By default php is configured up to start a debugging session indicated by request parameters. Therefore, it exists a couple of handy browser-addons (e.g. xdebug-helper for chrome). Please note! The IDE should be configured additionally to accept started debugging sessions by remote.

PHPINFO

Look at the PHP-configuration at http://127.0.0.1/phpinfo

Run an interactive console in the container

There is the possibility to use bash and a few of common used terminal commands for example less, vi and so on.

docker exec -ti dev-www /bin/bash

Advanced configuration

Following environment variables can be set when creating (run) a new container.

The values given here are the default values.

  • APP_HOME=/app
    defines the application folder, normally where your application resides. there are some rare cases where strange software needs to be configured to reside in a special place
  • APP_USER=dev
    defines the user running the app
  • TIME_ZONE=Europe/Berlin defines the timezone php is working in
  • SMTP_HOST
    defines the smtp host that takes mails sent by php. if none is provided the php default values take place
  • SMTP_NAME=www-dev
    defines the host name as which the container sents his emails
  • SMTP_PORT=25
    defines the port on which the container trys to connect to the smtp host

Release management

Releases are orientated on PHP version of based Alpine PHP-FPM image as for example php:7.4-fpm-alpine.

At https://git.sc.uni-leipzig.de exists a Gitlab CI-pipeline building an image and publishing it to a registry.

A release tag is necessary to publish an image to ubleipzig/dev-www Release tags have to be the schema of release/* and to start with prefixed terminus release.

For example if you would push a new tag named release/7.4-0 following set of new images will be created:

  • 7.4-0
  • 7.4
  • 7
  • latest

About

Alpine based docker image w/ a Nginx/PHP-FPM environment - optimized for Typo3 development.

Resources

License

Stars

Watchers

Forks

Packages

No packages published