3.0.0-debian-9-r0 release

This commit is contained in:
Bitnami Bot
2019-10-29 10:50:54 +00:00
parent 5aecc744cb
commit 215f7d5c93
9 changed files with 176 additions and 3 deletions

View File

@@ -0,0 +1,50 @@
FROM bitnami/minideb-extras:stretch-r493
LABEL maintainer "Bitnami <containers@bitnami.com>"
ENV BITNAMI_PKG_CHMOD="-R g+rwX,o+rw" \
BITNAMI_PKG_EXTRA_DIRS="/.ghost /opt/bitnami/content" \
HOME="/"
# Install required system packages and dependencies
RUN install_packages ghostscript imagemagick libbsd0 libbz2-1.0 libc6 libgcc1 libncurses5 libreadline7 libsqlite3-0 libssl1.0.2 libssl1.1 libstdc++6 libtinfo5 libx11-6 libxau6 libxcb1 libxdmcp6 zlib1g
RUN bitnami-pkg install node-10.17.0-0 --checksum 2da15380ee9ee1dbad9b1118a00096dc3cd6ded524bccaebdc195798f58d6fa1
RUN bitnami-pkg unpack mysql-client-10.3.18-2 --checksum 9ba76d9543cc87642f23cc4987e12750e8690d45274c3701aa429ef19e3b8e08
RUN bitnami-pkg unpack ghost-3.0.0-0 --checksum 40590e7cf49ddf60badc8a7216bc8393d139a95e0420336b46af6ddafcecef29
COPY rootfs /
ENV ALLOW_EMPTY_PASSWORD="no" \
BITNAMI_APP_NAME="ghost" \
BITNAMI_IMAGE_VERSION="3.0.0-debian-9-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="80" \
GHOST_PROTOCOL="http" \
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="" \
NAMI_PREFIX="/.nami" \
PATH="/opt/bitnami/node/bin:/opt/bitnami/mysql/bin:/opt/bitnami/ghost/bin:$PATH" \
SMTP_FROM_ADDRESS="" \
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.3'
environment:
- ALLOW_EMPTY_PASSWORD=yes
- MARIADB_USER=bn_ghost
- MARIADB_DATABASE=bitnami_ghost
volumes:
- 'mariadb_data:/bitnami'
ghost:
image: 'bitnami/ghost:3'
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,20 @@
{
"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}}",
"protocol": "{{$global.env.GHOST_PROTOCOL}}",
"smtpFromAddress": "{{$global.env.SMTP_FROM_ADDRESS}}",
"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,31 @@
#!/bin/bash
##
## @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,17 @@
#!/bin/bash
. /opt/bitnami/base/functions
. /opt/bitnami/base/helpers
USER=ghost
START_COMMAND="ghost start && tail -f /bitnami/ghost/content/logs/*.log"
export NODE_ENV=production
cd /opt/bitnami/ghost || exit 1
# 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

@@ -42,8 +42,8 @@ To run this application you need Docker Engine 1.10.0. Docker Compose is recomen
Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/).
* [`2-ol-7`, `2.37.0-ol-7-r16` (2/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-ghost/blob/2.37.0-ol-7-r16/2/ol-7/Dockerfile)
* [`2-debian-9`, `2.37.0-debian-9-r11`, `2`, `2.37.0`, `2.37.0-r11`, `latest` (2/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-ghost/blob/2.37.0-debian-9-r11/2/debian-9/Dockerfile)
* [`3-debian-9`, `3.0.0-debian-9-r0`, `3`, `3.0.0`, `3.0.0-r0`, `latest` (3/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-ghost/blob/3.0.0-debian-9-r0/3/debian-9/Dockerfile)
* [`3-ol-7`, `0.0.0-ol-7-r0` (3/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-ghost/blob/0.0.0-ol-7-r0/3/ol-7/Dockerfile)
Subscribe to project updates by watching the [bitnami/ghost GitHub repo](https://github.com/bitnami/bitnami-docker-ghost).

View File

@@ -9,7 +9,7 @@ services:
volumes:
- 'mariadb_data:/bitnami'
ghost:
image: 'bitnami/ghost:2'
image: 'bitnami/ghost:3'
environment:
- MARIADB_HOST=mariadb
- MARIADB_PORT_NUMBER=3306