Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
b23prodtm committed Feb 21, 2021
1 parent e600df1 commit 4b3bcee
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 21 deletions.
6 changes: 3 additions & 3 deletions Dockerfile.armhf
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ ARG HTTPD_LISTEN
ENV HTTPD_LISTEN ${HTTPD_LISTEN:-'*:80'}
# Enable migrate-database.sh options
ARG MIGRATE_OPTION
ENV MIGRATE_OPTION ${MIGRATE_OPTION:-'--enable-ed25519-plugin'}
ENV MIGRATE_OPTION ${MIGRATE_OPTION:-'-v'}

# Use the default production configuration
#COPY $PHP_INI_DIR/php.ini-production $PHP_INI_DIR/php.ini
# RUN [ "cross-build-start" ]
RUN [ "cross-build-start" ]
RUN install_packages \
git \
openssh-client \
Expand Down Expand Up @@ -126,7 +126,7 @@ RUN ./deploy.sh ${DKR_ARCH} --nobuild --exit \
# just containers configuration
COPY etc /etc

# RUN [ "cross-build-end" ]
RUN [ "cross-build-end" ]

ENTRYPOINT ./migrate-database.sh -o -u -i ${MIGRATE_OPTION} \
&& ./migrate-database.sh -o -u ${MIGRATE_OPTION} --connection=test && /init
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ ARG HTTPD_LISTEN
ENV HTTPD_LISTEN ${HTTPD_LISTEN:-'*:80'}
# Enable migrate-database.sh options
ARG MIGRATE_OPTION
ENV MIGRATE_OPTION ${MIGRATE_OPTION:-'--enable-ed25519-plugin'}
ENV MIGRATE_OPTION ${MIGRATE_OPTION:-'-v'}

# Use the default production configuration
#COPY $PHP_INI_DIR/php.ini-production $PHP_INI_DIR/php.ini
Expand Down
17 changes: 7 additions & 10 deletions Dockerfile.x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ ENV PGID ${PGID:-0}
# Must own the ip address
ARG HTTPD_LISTEN
ENV HTTPD_LISTEN ${HTTPD_LISTEN:-'*:80'}
# Enable migrate-database.sh options
ARG MIGRATE_OPTION
ENV MIGRATE_OPTION ${MIGRATE_OPTION:-'-v'}

# Use the default production configuration
#COPY $PHP_INI_DIR/php.ini-production $PHP_INI_DIR/php.ini
Expand All @@ -75,7 +78,8 @@ RUN install_packages \

RUN install_packages \
memcached \
libmemcached-dev
libmemcached-dev \
php7-pecl-xdebug
# libicu libicu-dev

WORKDIR /usr/src/
Expand All @@ -97,14 +101,6 @@ COPY package-lock.json .
# Helper packages (just a long node process...)
RUN npm install --no-optional && npm link balena-cloud

# Create tmp directory and make it writable by the web server
RUN mkdir -p \
app/tmp/cache/models \
app/tmp/cache/persistent \
app/tmp/cache/long \
app/tmp/logs \
&& chmod -R 1777 app/tmp

# Add cake and composer command to system path
COPY composer.json .
COPY composer.lock .
Expand Down Expand Up @@ -132,5 +128,6 @@ COPY etc /etc

# RUN [ "cross-build-end" ]

ENTRYPOINT ./migrate-database.sh -o -u -i --enable-authentication-plugin && /init
ENTRYPOINT ./migrate-database.sh -o -u -i ${MIGRATE_OPTION} \
&& ./migrate-database.sh -o -u ${MIGRATE_OPTION} --connection=test && /init
EXPOSE 80 443
3 changes: 2 additions & 1 deletion Scripts/configure_tmp.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env bash
TOPDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
mkdir -p "$TOPDIR/app/tmp/cache/long"
mkdir -p "$TOPDIR/app/tmp/cache/persistent"
mkdir -p "$TOPDIR/app/tmp/cache/models"
mkdir -p "$TOPDIR/app/tmp/tests"
mkdir -p "$TOPDIR/app/tmp/logs"
touch "$TOPDIR/app/tmp/logs/error.log"
chmod -Rv 1775 "$TOPDIR/app/tmp"
chmod -Rv 1776 "$TOPDIR/app/tmp"
6 changes: 3 additions & 3 deletions Scripts/lib/shell_prompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ TOPDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)
. init_functions .
shell_prompt() {
[ $# -lt 2 ] && printf "Usage: %s <file> <name> [-y|n]" "${FUNCNAME[0]}" && exit 1
script=$1
title=$2
script="$1"
title="$2"
while true; do
# (1) prompt user, and read command line argument if no 3rd arg
# shellcheck disable=SC2154
Expand All @@ -24,7 +24,7 @@ shell_prompt() {
[yY]* ) echo -e "Yes."
# FIXME: bash -c might mask shell syntax errors (e.g. long filenames)
# shellcheck disable=SC1090
bash -c "$script" || log_failure_msg "FAILED $script"
bash -c "$script || log_failure_msg \"FAILED\""
break;;
[nN]* ) echo -e "No.\n"
break;;
Expand Down
4 changes: 2 additions & 2 deletions deployment/images/apache-php7/Dockerfile.armhf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# S6 Overlay: https://github.com/smebberson/docker-alpine/blob/master/alpine-apache/Dockerfile
#
FROM balenalib/raspberrypi3-alpine-node:run
# RUN [ "cross-build-start" ]
RUN [ "cross-build-start" ]
ARG PHP_LIB
ENV PHP_LIB ${PHP_LIB:-7}

Expand Down Expand Up @@ -103,4 +103,4 @@ RUN chmod g+xs /bin/systemctl

ENTRYPOINT /init
RUN node -v && npm -v
# RUN [ "cross-build-end" ]
RUN [ "cross-build-end" ]
1 change: 1 addition & 0 deletions deployment/images/apache-php7/Dockerfile.x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,5 @@ ADD "https://raw.githubusercontent.com/b23prodtm/docker-systemctl-replacement/ma
RUN chmod g+xs /bin/systemctl

ENTRYPOINT /init
RUN node -v && npm -v
# RUN [ "cross-build-end" ]
1 change: 1 addition & 0 deletions deployment/images/node-php7/Dockerfile.x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ RUN apk update \
# RUN rc-update add php-fpm7 default
# RUN rc-service php-fpm7 start
WORKDIR /var/www/html/
RUN node -v && npm -v
3 changes: 2 additions & 1 deletion migrate-database.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ test_args="app Controller/PagesController --stderr >> $LOG"
MARIADB_SHORT_NAME=$(docker_name "$SECONDARY_HUB")
while [ "$#" -gt 0 ]; do case "$1" in
--enable-ed25519-plugin*)
slogger -st "$0" "Enabled auth_ed25519 plugin..."
slogger -st "$0" "Enabled auth_ed25519 plugin for passwords..."
log_warning_msg "Plugin Not available from PHP PDO connect (you should avoid using it)"
authentication_plugin="ed25519";;
--docker )
bash -c "./Scripts/start_daemon.sh ${docker}"
Expand Down

0 comments on commit 4b3bcee

Please sign in to comment.