Add support for more environment variables, bump versions and improve several files (#25)
* Add support for more environment variables and improve README.md * Add a new configurable env variable * Bump versions * Fix typos in README * Minor improvements to several files
This commit is contained in:
parent
b017759ce4
commit
4f51b7d157
|
|
@ -3,17 +3,17 @@ FROM gcr.io/stacksmith-images/ubuntu:14.04-r8
|
|||
MAINTAINER Bitnami <containers@bitnami.com>
|
||||
|
||||
ENV BITNAMI_APP_NAME=wordpress \
|
||||
BITNAMI_IMAGE_VERSION=4.6-r0 \
|
||||
BITNAMI_IMAGE_VERSION=4.6-r1 \
|
||||
PATH=/opt/bitnami/php/bin:/opt/bitnami/mysql/bin/:$PATH
|
||||
|
||||
# Additional modules required
|
||||
RUN bitnami-pkg unpack apache-2.4.23-2 --checksum 80605a5b1a3103cefc125cb150cc08a017702d0c1e3ea5f806540ad91c77cf38
|
||||
RUN bitnami-pkg install php-5.6.25-0 --checksum f0e8d07d155abdb5d6843931d3ffbf9b4208fff248c409444fdd5a8e3a3da01d
|
||||
RUN bitnami-pkg unpack apache-2.4.23-1 --checksum c8d14a79313c5e47dbf617e9a55e88ff91d8361357386bab520aabccd35c59d8
|
||||
RUN bitnami-pkg install libphp-5.6.21-2 --checksum 83d19b750b627fa70ed9613504089732897a48e1a7d304d8d73dec61a727b222
|
||||
RUN bitnami-pkg install mysql-client-10.1.13-4 --checksum 14b45c91dd78b37f0f2366712cbe9bfdf2cb674769435611955191a65dbf4976
|
||||
|
||||
# Install wordpress
|
||||
RUN bitnami-pkg unpack wordpress-4.6-0 --checksum a2c4039e0dd22b1bed6947c2e651f11b472c9852de70db38cf66d5cea71da6bf
|
||||
RUN bitnami-pkg unpack wordpress-4.6-1 --checksum 8e809d1719bbef52b89dd909350702f463d2e0c8afc2bb46642f4b0552dc51a2
|
||||
|
||||
COPY rootfs /
|
||||
|
||||
|
|
|
|||
|
|
@ -213,6 +213,9 @@ The WordPress instance can be customized by specifying environment variables on
|
|||
- `WORDPRESS_USERNAME`: WordPress application username. Default: **user**
|
||||
- `WORDPRESS_PASSWORD`: WordPress application password. Default: **bitnami**
|
||||
- `WORDPRESS_EMAIL`: WordPress application email. Default: **user@example.com**
|
||||
- `WORDPRESS_FIRST_NAME`: WordPress user first name. Default: **FirstName**
|
||||
- `WORDPRESS_LAST_NAME`: WordPress user last name. Default: **LastName**
|
||||
- `WORDPRESS_BLOG_NAME`: WordPress blog name. Default: **User's blog**
|
||||
- `MARIADB_USER`: Root user for the MariaDB database. Default: **root**
|
||||
- `MARIADB_PASSWORD`: Root password for the MariaDB.
|
||||
- `MARIADB_HOST`: Hostname for MariaDB server. Default: **mariadb**
|
||||
|
|
@ -261,6 +264,41 @@ $ docker run -d --name wordpress -p 80:80 -p 443:443 \
|
|||
bitnami/wordpress:latest
|
||||
```
|
||||
|
||||
### SMTP Configuration
|
||||
|
||||
To configure WordPress to send email using SMTP you can set the following environment variables:
|
||||
- `SMTP_HOST`: Host for outgoing SMTP email.
|
||||
- `SMTP_PORT`: Port for outgoing SMTP email.
|
||||
- `SMTP_USER`: User of SMTP used for authentication (likely email).
|
||||
- `SMTP_PASSWORD`: Password for SMTP.
|
||||
- `SMTP_USERNAME`: User name for SMTP emails.
|
||||
- `SMTP_PROTOCOL`: Secure connection protocol to use for SMTP [tls, ssl, none].
|
||||
|
||||
This would be an example of SMTP configuration using a GMail account:
|
||||
|
||||
* docker-compose (application part):
|
||||
|
||||
```
|
||||
application:
|
||||
image: bitnami/wordpress:latest
|
||||
ports:
|
||||
- 80:80
|
||||
environment:
|
||||
- SMTP_HOST=smtp.gmail.com
|
||||
- SMTP_PORT=587
|
||||
- SMTP_USER=your_email@gmail.com
|
||||
- SMTP_PASSWORD=your_password
|
||||
- SMTP_PROTOCOL=tls
|
||||
volumes_from:
|
||||
- application_data
|
||||
```
|
||||
|
||||
* For manual execution:
|
||||
|
||||
```
|
||||
$ docker run -d -e SMTP_HOST=smtp.gmail.com -e SMTP_PORT=587 -e SMTP_USER=your_email@gmail.com -e SMTP_PASSWORD=your_password -p 80:80 --name wordpress -v /your/local/path/bitnami/wordpress:/bitnami/wordpress --net=wordpress_network bitnami/wordpress
|
||||
```
|
||||
|
||||
# Backing up your application
|
||||
|
||||
To backup your application data follow these steps:
|
||||
|
|
|
|||
|
|
@ -1,21 +1,19 @@
|
|||
version: '2'
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
image: bitnami/mariadb:latest
|
||||
image: 'bitnami/mariadb:latest'
|
||||
volumes:
|
||||
- mariadb_data:/bitnami/mariadb
|
||||
wordpress:
|
||||
image: bitnami/wordpress:latest
|
||||
depends_on:
|
||||
- mariadb
|
||||
- 'mariadb_data:/bitnami/mariadb'
|
||||
application:
|
||||
image: 'bitnami/wordpress:latest'
|
||||
ports:
|
||||
- '80:80'
|
||||
- '443:443'
|
||||
volumes:
|
||||
- wordpress_data:/bitnami/wordpress
|
||||
- apache_data:/bitnami/apache
|
||||
|
||||
- 'wordpress_data:/bitnami/wordpress'
|
||||
- 'apache_data:/bitnami/apache'
|
||||
depends_on:
|
||||
- mariadb
|
||||
volumes:
|
||||
mariadb_data:
|
||||
driver: local
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"httpPort": "{{$global.env.APACHE_HTTP_PORT}}",
|
||||
"httpsPort": "{{$global.env.APACHE_HTTPS_PORT}}"
|
||||
}
|
||||
|
|
@ -5,6 +5,8 @@ function initialize {
|
|||
# Package can be "installed" or "unpacked"
|
||||
status=`harpoon inspect $1`
|
||||
if [[ "$status" == *'"lifecycle": "unpacked"'* ]]; then
|
||||
# Clean up inputs
|
||||
inputs=""
|
||||
if [[ -f /$1-inputs.json ]]; then
|
||||
inputs=--inputs-file=/$1-inputs.json
|
||||
fi
|
||||
|
|
@ -13,14 +15,21 @@ function initialize {
|
|||
}
|
||||
|
||||
# Set default values
|
||||
export APACHE_HTTP_PORT=${APACHE_HTTP_PORT:-"80"}
|
||||
export APACHE_HTTPS_PORT=${APACHE_HTTPS_PORT:-"443"}
|
||||
export WORDPRESS_USERNAME=${WORDPRESS_USERNAME:-"user"}
|
||||
export WORDPRESS_PASSWORD=${WORDPRESS_PASSWORD:-"bitnami"}
|
||||
export WORDPRESS_EMAIL=${WORDPRESS_EMAIL:-"user@example.com"}
|
||||
export WORDPRESS_FIRST_NAME=${WORDPRESS_FIRST_NAME:-"FirstName"}
|
||||
export WORDPRESS_LAST_NAME=${WORDPRESS_LAST_NAME:-"LastName"}
|
||||
export WORDPRESS_BLOG_NAME=${WORDPRESS_BLOG_NAME:-"User's Blog!"}
|
||||
export MARIADB_USER=${MARIADB_USER:-"root"}
|
||||
export MARIADB_HOST=${MARIADB_HOST:-"mariadb"}
|
||||
export MARIADB_PORT=${MARIADB_PORT:-"3306"}
|
||||
|
||||
if [[ "$1" == "harpoon" && "$2" == "start" ]]; then
|
||||
|
||||
|
||||
if [[ "$1" == "harpoon" && "$2" == "start" ]] || [[ "$1" == "/init.sh" ]]; then
|
||||
for module in apache wordpress; do
|
||||
initialize $module
|
||||
done
|
||||
|
|
|
|||
|
|
@ -2,6 +2,15 @@
|
|||
"username": "{{$global.env.WORDPRESS_USERNAME}}",
|
||||
"password": "{{$global.env.WORDPRESS_PASSWORD}}",
|
||||
"email": "{{$global.env.WORDPRESS_EMAIL}}",
|
||||
"firstName": "{{$global.env.WORDPRESS_FIRST_NAME}}",
|
||||
"lastName": "{{$global.env.WORDPRESS_LAST_NAME}}",
|
||||
"blogName": "{{$global.env.WORDPRESS_BLOG_NAME}}",
|
||||
"smtpHost": "{{$global.env.SMTP_HOST}}",
|
||||
"smtpPort": "{{$global.env.STMP_PORT}}",
|
||||
"smtpUser": "{{$global.env.SMTP_USER}}",
|
||||
"smtpPassword": "{{$global.env.SMTP_PASSWORD}}",
|
||||
"smtpUsername": "{{$global.env.SMTP_USERNAME}}",
|
||||
"smtpProtocol": "{{$global.env.SMTP_PROTOCOL}}",
|
||||
"databaseAdminUser": "{{$global.env.MARIADB_USER}}",
|
||||
"databaseAdminPassword": "{{$global.env.MARIADB_PASSWORD}}",
|
||||
"databaseServerHost": "{{$global.env.MARIADB_HOST}}",
|
||||
|
|
|
|||
Loading…
Reference in New Issue