1.24.5-ol-7-r0 release

Update ghost to 1.24.5
This commit is contained in:
Bitnami Bot
2018-06-26 09:27:13 +00:00
parent 858654ff64
commit 206b0752c5
8 changed files with 169 additions and 2 deletions

View File

@@ -0,0 +1,47 @@
FROM bitnami/oraclelinux-extras:7-r18
LABEL maintainer "Bitnami <containers@bitnami.com>"
ENV BITNAMI_PKG_CHMOD="-R g+rwX,o+rw" \
BITNAMI_PKG_EXTRA_DIRS="/.ghost /.config /.cache /opt/bitnami/content" \
HOME="/"
# Install required system packages and dependencies
RUN install_packages bzip2-libs glibc keyutils-libs krb5-libs libcom_err libgcc libselinux libstdc++ ncurses-libs nss-softokn-freebl openssl-libs pcre readline sqlite zlib
RUN bitnami-pkg install node-8.11.3-0 --checksum 0f9b299a5add60d28a967ab89a269a7f313f500a26b43ca825c47d878dff137d
RUN bitnami-pkg unpack mysql-client-10.1.34-0 --checksum 012f1f222898565b55f7d4522514c7c130d2bfe4c988754eed658ef6dafa980c
RUN bitnami-pkg unpack ghost-1.24.5-0 --checksum c2784b1e9afb8c2cb74b0d7bcebd641c4a103e52dba3455e00c3ff9d542159e5
COPY rootfs /
ENV ALLOW_EMPTY_PASSWORD="no" \
BITNAMI_APP_NAME="ghost" \
BITNAMI_IMAGE_VERSION="1.24.5-ol-7-r0" \
BLOG_TITLE="User's Blog" \
GHOST_DATABASE_NAME="bitnami_ghost" \
GHOST_DATABASE_PASSWORD="" \
GHOST_DATABASE_USER="bn_ghost" \
GHOST_EMAIL="user@example.com" \
GHOST_HOST="" \
GHOST_PASSWORD="bitnami123" \
GHOST_PORT_NUMBER="" \
GHOST_USERNAME="user" \
MARIADB_HOST="mariadb" \
MARIADB_PORT_NUMBER="3306" \
MARIADB_ROOT_PASSWORD="" \
MARIADB_ROOT_USER="root" \
MYSQL_CLIENT_CREATE_DATABASE_NAME="" \
MYSQL_CLIENT_CREATE_DATABASE_PASSWORD="" \
MYSQL_CLIENT_CREATE_DATABASE_PRIVILEGES="ALL" \
MYSQL_CLIENT_CREATE_DATABASE_USER="" \
PATH="/opt/bitnami/node/bin:/opt/bitnami/mysql/bin:/opt/bitnami/ghost/bin:$PATH" \
SMTP_HOST="" \
SMTP_PASSWORD="" \
SMTP_PORT="" \
SMTP_SERVICE="" \
SMTP_USER=""
EXPOSE 2368
WORKDIR /opt/bitnami/ghost
USER 1001
ENTRYPOINT ["/app-entrypoint.sh"]
CMD ["/run.sh"]

View File

@@ -0,0 +1,30 @@
version: '2'
services:
mariadb:
image: 'bitnami/mariadb:10.1-ol-7'
environment:
- ALLOW_EMPTY_PASSWORD=yes
- MARIADB_USER=bn_ghost
- MARIADB_DATABASE=bitnami_ghost
volumes:
- 'mariadb_data:/bitnami'
ghost:
image: 'bitnami/ghost:1-ol-7'
environment:
- MARIADB_HOST=mariadb
- MARIADB_PORT_NUMBER=3306
- GHOST_DATABASE_USER=bn_ghost
- GHOST_DATABASE_NAME=bitnami_ghost
- ALLOW_EMPTY_PASSWORD=yes
- GHOST_HOST=localhost
ports:
- '80:2368'
volumes:
- 'ghost_data:/bitnami'
depends_on:
- mariadb
volumes:
mariadb_data:
driver: local
ghost_data:
driver: local

View File

@@ -0,0 +1,14 @@
#!/bin/bash -e
. /opt/bitnami/base/functions
. /opt/bitnami/base/helpers
print_welcome_page
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "/run.sh" ]]; then
. /init.sh
nami_initialize mysql-client ghost
info "Starting ghost... "
fi
exec tini -- "$@"

View File

@@ -0,0 +1,18 @@
{
"blogTitle": "{{$global.env.BLOG_TITLE}}",
"databaseName": "{{$global.env.GHOST_DATABASE_NAME}}",
"databasePassword": "{{$global.env.GHOST_DATABASE_PASSWORD}}",
"databaseServerHost": "{{$global.env.MARIADB_HOST}}",
"databaseServerPort": "{{$global.env.MARIADB_PORT_NUMBER}}",
"databaseUser": "{{$global.env.GHOST_DATABASE_USER}}",
"email": "{{$global.env.GHOST_EMAIL}}",
"host": "{{$global.env.GHOST_HOST}}",
"password": "{{$global.env.GHOST_PASSWORD}}",
"port": "{{$global.env.GHOST_PORT_NUMBER}}",
"smtpHost": "{{$global.env.SMTP_HOST}}",
"smtpPassword": "{{$global.env.SMTP_PASSWORD}}",
"smtpPort": "{{$global.env.SMTP_PORT}}",
"smtpService": "{{$global.env.SMTP_SERVICE}}",
"smtpUser": "{{$global.env.SMTP_USER}}",
"username": "{{$global.env.GHOST_USERNAME}}"
}

View File

@@ -0,0 +1,29 @@
##
## @brief Helper function to show an error when a password is empty and exit
## param $1 Input name
##
empty_password_error() {
error "The $1 environment variable is empty or not set. Set the environment variable ALLOW_EMPTY_PASSWORD=yes to allow the container to be started with blank passwords. This is recommended only for development."
exit 1
}
##
## @brief Helper function to show a warning when the ALLOW_EMPTY_PASSWORD flag is enabled
##
empty_password_enabled_warn() {
warn "You set the environment variable ALLOW_EMPTY_PASSWORD=${ALLOW_EMPTY_PASSWORD}. For safety reasons, do not use this flag in a production environment."
}
# Validate passwords
if [[ "$ALLOW_EMPTY_PASSWORD" =~ ^(yes|Yes|YES)$ ]]; then
empty_password_enabled_warn
else
# Database creation by MySQL client
if [[ -n "$MYSQL_CLIENT_CREATE_DATABASE_USER" && -z "$MYSQL_CLIENT_CREATE_DATABASE_PASSWORD" ]]; then
empty_password_error MYSQL_CLIENT_CREATE_DATABASE_PASSWORD
fi
# Ghost database
if [[ -z "$GHOST_DATABASE_PASSWORD" ]]; then
empty_password_error GHOST_DATABASE_PASSWORD
fi
fi

View File

@@ -0,0 +1,11 @@
{
"allowEmptyPassword": "{{$global.env.ALLOW_EMPTY_PASSWORD}}",
"createDatabaseName": "{{$global.env.MYSQL_CLIENT_CREATE_DATABASE_NAME}}",
"createDatabasePassword": "{{$global.env.MYSQL_CLIENT_CREATE_DATABASE_PASSWORD}}",
"createDatabasePrivileges": "{{$global.env.MYSQL_CLIENT_CREATE_DATABASE_PRIVILEGES}}",
"createDatabaseUser": "{{$global.env.MYSQL_CLIENT_CREATE_DATABASE_USER}}",
"host": "{{$global.env.MARIADB_HOST}}",
"port": "{{$global.env.MARIADB_PORT_NUMBER}}",
"rootPassword": "{{$global.env.MARIADB_ROOT_PASSWORD}}",
"rootUser": "{{$global.env.MARIADB_ROOT_USER}}"
}

View File

@@ -0,0 +1,18 @@
#!/bin/bash
. /opt/bitnami/base/functions
. /opt/bitnami/base/helpers
USER=ghost
# The reason to use the pipe is that currently there is no way to start ghost in unattended mode
# as it will ask you to update ghost-cli or continue without doing it:
# https://github.com/TryGhost/Ghost-CLI/issues/563
START_COMMAND="echo y | ghost start && tail -f /opt/bitnami/ghost/logs/ghost.log"
export NODE_ENV=production
# If container is started as `root` user
if [ $EUID -eq 0 ]; then
exec gosu ${USER} bash -c "${START_COMMAND}"
else
exec bash -c "$START_COMMAND"
fi

View File

@@ -26,7 +26,7 @@ $ docker-compose up -d
# Supported tags and respective `Dockerfile` links
* [`1`, `1.24.5-r6`, `latest` (1/Dockerfile)](https://github.com/bitnami/bitnami-docker-ghost/blob/1.24.5-r6/1/Dockerfile)
* [`1-ol-7`, `1.03.1-ol-7-r0` (1/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-ghost/blob/1.03.1-ol-7-r0/1/ol-7/Dockerfile)
* [`1-ol-7`, `1.24.5-ol-7-r0` (1/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-ghost/blob/1.24.5-ol-7-r0/1/ol-7/Dockerfile)
Subscribe to project updates by watching the [bitnami/codiad GitHub repo](https://github.com/bitnami/bitnami-docker-ghost).
@@ -37,7 +37,7 @@ To run this application you need Docker Engine 1.10.0. Docker Compose is recomen
# Supported tags and respective `Dockerfile` links
* [`1`, `1.24.5-r6`, `latest` (1/Dockerfile)](https://github.com/bitnami/bitnami-docker-ghost/blob/1.24.5-r6/1/Dockerfile)
* [`1-ol-7`, `1.03.1-ol-7-r0` (1/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-ghost/blob/1.03.1-ol-7-r0/1/ol-7/Dockerfile)
* [`1-ol-7`, `1.24.5-ol-7-r0` (1/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-ghost/blob/1.24.5-ol-7-r0/1/ol-7/Dockerfile)
Subscribe to project updates by watching the [bitnami/ghost GitHub repo](https://github.com/bitnami/bitnami-docker-ghost).