Skip to content

phpmyadmin for the CloudFoundry platform with automatic service discovery

License

Notifications You must be signed in to change notification settings

BitPatty/cf-phpmyadmin

Repository files navigation

cf-phpmyadmin

An extension to the phpmyadmin docker image targeted at deployments on the Cloud Foundry platform, which auto populates the available servers based on the bound services.

Sample manifest.yml

---
version: 1
applications:
- name: my-app
   memory: 512M
   instances: 1
   routes:
     - route: my-app.com
   docker:
     image: ghcr.io/bitpatty/cf-phpmyadmin:latest
   services:
     - my-mysql-database
     - some-other-database

Environment variables

The following environment variables from the original image will be overriden by the init script:

  • PMA_HOSTS - Automatically pouplated based on bound services
  • PMA_VERBOSES - Automatically pouplated based on bound services
  • PMA_PORTS - Automatically pouplated based on bound services
  • APACHE_PORT - Based on the PORT environment variable, with fallback to 3000
  • PMA_CONTROLHOST - Automatically pouplated if PMA_VCAP_CONFIG_DB_SERVICE_NAME is set
  • PMA_CONTROLPORT - Automatically pouplated if PMA_VCAP_CONFIG_DB_SERVICE_NAME is set
  • PMA_PMADB - Automatically pouplated if PMA_VCAP_CONFIG_DB_SERVICE_NAME is set
  • PMA_CONTROLUSER - Automatically pouplated if PMA_VCAP_CONFIG_DB_SERVICE_NAME is set
  • PMA_CONTROLPASS - Automatically pouplated if PMA_VCAP_CONFIG_DB_SERVICE_NAME is set

The following environment variables are available for configuring the setup script:

  • PMA_VCAP_DB_SERVICE_TAGS - A comma separated list of service tags used by MySQL services, defaults to mysql and mariadb.
  • PMA_VCAP_DB_SERVICE_TAGS_SEPARATOR - If you cannot use a comma for PMA_VCAP_DB_SERVICE_TAGS you can specify the separator in this variable.
  • PMA_VCAP_CONFIG_DB_SERVICE_NAME - The service name that should be used for the phpMyAdmin Configuration Storage database. If set it will override the follwing environment variables:
    • PMA_CONTROLHOST
    • PMA_CONTROLPORT
    • PMA_PMADB
    • PMA_CONTROLUSER
    • PMA_CONTROLPASS

The following environment variables can be used as with the original image:

  • PMA_ARBITRARY - when set to 1 connection to the arbitrary server will be allowed
  • PMA_HOST - define address/host name of the MySQL server
  • PMA_VERBOSE - define verbose name of the MySQL server
  • PMA_PORT - define port of the MySQL server
  • PMA_USER and PMA_PASSWORD - define username and password to use only with the config authentication method
  • PMA_ABSOLUTE_URI - the full URL to phpMyAdmin. Sometimes needed when used in a reverse-proxy configuration. Don't set this unless needed. See documentation.
  • PMA_CONFIG_BASE64 - if set, this option will override the default config.inc.php with the base64 decoded contents of the variable
  • PMA_USER_CONFIG_BASE64 - if set, this option will override the default config.user.inc.php with the base64 decoded contents of the variable
  • PMA_UPLOADDIR - if defined, this option will set the path where files can be saved to be available to import ($cfg['UploadDir'])
  • PMA_SAVEDIR - if defined, this option will set the path where exported files can be saved ($cfg['SaveDir'])
  • PMA_CONTROLHOST - when set, this points to an alternate database host used for storing the phpMyAdmin Configuration Storage database database
  • PMA_CONTROLPORT - if set, will override the default port (3306) for connecting to the control host for storing the phpMyAdmin Configuration Storage database database
  • PMA_PMADB - define the name of the database to be used for the phpMyAdmin Configuration Storage database. When not set, the advanced features are not enabled by default: they can still potentially be enabled by the user when logging in with the zero conf (zero configuration) feature. Suggested values: phpmyadmin or pmadb
  • PMA_CONTROLUSER - define the username for phpMyAdmin to use for advanced features (the controluser)
  • PMA_CONTROLPASS - define the password for phpMyAdmin to use with the controluser
  • PMA_QUERYHISTORYDB - when set to true, enables storing SQL history to the phpMyAdmin Configuration Storage database. When false, history is stored in the browser and is cleared when logging out
  • PMA_QUERYHISTORYMAX - when set to an integer, controls the number of history items. See documentation. Defaults to 25.
  • MAX_EXECUTION_TIME - if set, will override the maximum execution time in seconds (default 600) for phpMyAdmin ($cfg['ExecTimeLimit']) and PHP max_execution_time (format as [0-9+])
  • MEMORY_LIMIT - if set, will override the memory limit (default 512M) for phpMyAdmin ($cfg['MemoryLimit']) and PHP memory_limit (format as [0-9+](K,M,G) where K is for Kilobytes, M for Megabytes, G for Gigabytes and 1K = 1024 bytes)
  • UPLOAD_LIMIT - if set, this option will override the default value for apache and php-fpm (format as [0-9+](K,M,G) default value is 2048K, this will change upload_max_filesize and post_max_size values)
  • TZ - if defined, this option will change the default PHP date.timezone from UTC. See documentation for supported values.
  • HIDE_PHP_VERSION - if defined, this option will hide the PHP version (expose_php = Off). Set to any value (such as HIDE_PHP_VERSION=true).

About

phpmyadmin for the CloudFoundry platform with automatic service discovery

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages