Merge branch 'harpoon-nami'

This commit is contained in:
Sameer Naik
2016-09-07 11:11:17 +05:30
3 changed files with 13 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
FROM gcr.io/stacksmith-images/ubuntu:14.04-r8
FROM gcr.io/stacksmith-images/ubuntu:14.04-r9
MAINTAINER Bitnami <containers@bitnami.com>
@@ -8,8 +8,8 @@ ENV BITNAMI_APP_NAME=drupal \
PATH=/opt/bitnami/php/bin:/opt/bitnami/drush:/opt/bitnami/mysql/bin/:$PATH
# Additional modules required
RUN bitnami-pkg install php-5.6.24-1 --checksum 6cdb5736757bfe0a950034d0dc85a48c3e4ab02bec64c90f0c44454069362e65
RUN bitnami-pkg unpack apache-2.4.23-1 --checksum c8d14a79313c5e47dbf617e9a55e88ff91d8361357386bab520aabccd35c59d8
RUN bitnami-pkg unpack apache-2.4.23-2 --checksum be3c28581f363e240f04c2d32bcf2d4a5ea0926722bb23ab9f5dfb38bde22bac
RUN bitnami-pkg unpack php-5.6.25-0 --checksum f0e8d07d155abdb5d6843931d3ffbf9b4208fff248c409444fdd5a8e3a3da01d
RUN bitnami-pkg install libphp-5.6.21-2 --checksum 83d19b750b627fa70ed9613504089732897a48e1a7d304d8d73dec61a727b222
RUN bitnami-pkg install mysql-client-10.1.13-4 --checksum 14b45c91dd78b37f0f2366712cbe9bfdf2cb674769435611955191a65dbf4976
@@ -18,10 +18,10 @@ RUN bitnami-pkg unpack drupal-8.1.8-0 --checksum 9f9b48d08865779bc3ba785432f823e
COPY rootfs /
VOLUME ["/bitnami/drupal", "/bitnami/apache"]
VOLUME ["/bitnami/drupal", "/bitnami/apache", "/bitnami/php"]
EXPOSE 80 443
ENTRYPOINT ["/app-entrypoint.sh"]
CMD ["harpoon", "start", "--foreground", "apache"]
CMD ["nami", "start", "--foreground", "apache"]

View File

@@ -12,6 +12,7 @@ services:
volumes:
- 'drupal_data:/bitnami/drupal'
- 'apache_data:/bitnami/apache'
- 'php_data:/bitnami/php'
depends_on:
- mariadb
volumes:
@@ -21,3 +22,5 @@ volumes:
driver: local
apache_data:
driver: local
php_data:
driver: local

View File

@@ -3,12 +3,13 @@ set -e
function initialize {
# Package can be "installed" or "unpacked"
status=`harpoon inspect $1`
status=`nami inspect $1`
if [[ "$status" == *'"lifecycle": "unpacked"'* ]]; then
inputs=""
if [[ -f /$1-inputs.json ]]; then
inputs=--inputs-file=/$1-inputs.json
fi
harpoon initialize $1 $inputs
nami initialize $1 $inputs
fi
}
@@ -20,8 +21,8 @@ export MARIADB_USER=${MARIADB_USER:-"root"}
export MARIADB_HOST=${MARIADB_HOST:-"mariadb"}
export MARIADB_PORT=${MARIADB_PORT:-"3306"}
if [[ "$1" == "harpoon" && "$2" == "start" ]]; then
for module in apache drupal; do
if [[ "$1" == "nami" && "$2" == "start" ]]; then
for module in apache php drupal; do
initialize $module
done
echo "Starting application ..."