config: move default config var to Dockerfile

This commit is contained in:
Sameer Naik 2017-02-13 17:46:18 +05:30
parent 586d8941b2
commit 0cc225bde8
2 changed files with 9 additions and 10 deletions

View File

@ -18,6 +18,15 @@ RUN bitnami-pkg unpack ghost-0.11.4-0 --checksum 0094a80415a6a58d31fdbf2e8698099
COPY rootfs /
ENV GHOST_PORT="80" \
GHOST_USERNAME="user" \
GHOST_PASSWORD="bitnami1" \
GHOST_EMAIL="user@example.com" \
BLOG_TITLE="User's Blog" \
MARIADB_USER="root" \
MARIADB_HOST="mariadb" \
MARIADB_PORT="3306"
VOLUME ["/bitnami/ghost"]
EXPOSE 2368

View File

@ -13,16 +13,6 @@ function initialize {
fi
}
# Set default values
export GHOST_PORT=${GHOST_PORT:-"80"}
export GHOST_USERNAME=${GHOST_USERNAME:-"user"}
export GHOST_PASSWORD=${GHOST_PASSWORD:-"bitnami1"}
export GHOST_EMAIL=${GHOST_EMAIL:-"user@example.com"}
export BLOG_TITLE=${BLOG_TITLE:-"User's Blog"}
export MARIADB_USER=${MARIADB_USER:-"root"}
export MARIADB_HOST=${MARIADB_HOST:-"mariadb"}
export MARIADB_PORT=${MARIADB_PORT:-"3306"}
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "/init.sh" ]]; then
initialize ghost