Docker container informations

July 4, 2016 ยท View on GitHub

<-- Back to main section

Docker container informations

Docker layout

ContainerDescription
appPHP application container with nginx/apache and PHP-FPM and tools (your entrypoint for bash, php and other stuff)
storageStorage container, eg. for Solr data
mysqlMySQL database
postgres (optional)PostgreSQL database
solr (optional)Apache Solr server
elasticsearch (optional)Elasticsearch server
memcached (optional)Memcached server
redis (optional)Redis server
ftps (optional)FTP server (vsftpd)
mailcatcher (optional)Mailserver with easy web and REST interface for mailing
phpmyadmin (optional)Tool written in PHP, intended to handle the administration of MySQL over the Web

The app/ directory will be mounted under /app inside app container.

Docker images

ContainerSource
appWebDevOps Images
storageUbuntu official
mysqlMySQL official
postgresPostgreSQL official
solr (optional)Solr from guywithnose
elasticsearch (optional)Elasticsearch official
memcached (optional)Memcached official
redis (optional)Redis official
ftp (optional)Ubuntu official
mailcatcher (optional)Mailcatcher from schickling
phpmyadmin (optional)PhpMyAdmin official

Makefile

Customize the Makefile for your needs.

CommandDescription
make bashEnter main container with bash (user application)
make rootEnter main container with bash (user root)

make backupGeneral backup (run all backup tasks)
make restoreGeneral restore (run all restore tasks)

make mysql-backupBackup MySQL databases
make mysql-restoreRestore MySQL databases

make solr-backupBackup Solr cores
make solr-restoreRestore Solr cores

make buildRun building (composer, gulp, bower)

Environment settings

EnvironmentDescription
DOCUMENT_ROOTDocument root for Nginx and Apache HTTPD, can be absolute or relative (to /docker inside the container).
DOCUMENT_INDEXDefault document index file for Nginx and Apache HTTPd
CLI_SCRIPTTarget for "cli" command of main container
CLI_USERUser which should be used to run CLI scripts (normally www-data, equals php-fpm user)

TYPO3_CONTEXTContext for TYPO3, can be used for TypoScript conditions and AdditionalConfiguration
FLOW_CONTEXTContext for FLOW and NEOS

MAIL_GATEWAYUpstream server for sending mails (ssmtp)
DNS_DOMAINList of wildcard domains pointing to webserver (eg. for local content fetching)

MYSQL_ROOT_PASSWORDPassword for MySQL user "root"
MYSQL_USERInitial created MySQL user
MYSQL_PASSWORDPassword for initial MySQL user
MYSQL_DATABASEInitial created MySQL database
MYSQL_HOSTMySQL Hostname
MYSQL_PORTPort that the MySQL instance is using

PHP_TIMEZONETimezone (date.timezone) setting for PHP (cli and fpm)
EFFECTIVE_UIDEffective UID for php, fpm und webserver
EFFECTIVE_GIDEffective GID for php, fpm und webserver

Xdebug Remote debugger (PhpStorm)

1.) Add a server (Preferences -> Languages & Frameworks -> PHP -> Servers).

SettingValue
HostnameIP or Hostname of VM
Port8000
DebuggerXdebug
Use path mappingsCheck
Path mapping of folder 'app'/app/

2.) Add a debug connection (Run -> Edit Configurations... -> Connections) and create a new configuration (PHP Web Application).

SettingValue
ServerServer you created before
Start URL/
BrowserChoose one

Save, set a break point and test the debugger.

Application cache

Symlink your application cache (eg. typo3temp/) to /storage/cache/ and it will be stored inside the storage container so it will be accessible within all containers (eg. web or main).