Wordpress-alpine-php Docker Image
This is a WordPress Docker image which can run on both Azure Web App on Linux and your Docker engines's host.
Components
This docker image currently contains the following components:
- WordPress (4.9.1)
- Alpine
- PHP
- Phpmyadmin ( if using Local Database )
How to configure to use Azure Database for MySQL with web app
- Create a Web App for Containers
- Update App Setting
WEBSITES_ENABLE_APP_SERVICE_STORAGE
= true
- Browse your site
- Complete WordPress install and Enter the Credentials for Azure database for MySQL
How to configure to use Local Database with web app
- Create a Web App for Containers
- Update App Setting
WEBSITES_ENABLE_APP_SERVICE_STORAGE
= true
- Add new App Settings
Name |
Default Value |
DATABASE_TYPE |
local |
DATABASE_USERNAME |
wordpress |
DATABASE_PASSWORD |
some-string |
Note: We create a database "azurelocaldb" when using local mysql . Hence use this name when setting up the app
- Browse your site
- Complete WordPress install
Note: Do not use the app setting DATABASE_TYPE=local if using Azure database for MySQL
Limitations
- Some unexpected issues may happen after you scale out your site to multiple instances, if you deploy a WordPress site on Azure with this docker image and use the MariaDB built in this docker image as the database.
- The phpMyAdmin built in this docker image is available only when you use the MariaDB built in this docker image as the database.
- Must include App Setting
WEBSITES_ENABLE_APP_SERVICE_STORAGE
= true since we need files to be persisted. Do not use local storage for WordPress. You can use local storage for transient data or cached data say /tmp folder.