Skip to content

Commit

Permalink
Shell alias to check package status
Browse files Browse the repository at this point in the history
  • Loading branch information
tuutti committed Dec 16, 2024
1 parent a87d7f4 commit 9de7b27
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
15 changes: 7 additions & 8 deletions openshift/drupal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,9 @@ RUN set -eux; \
jq \
tini

RUN \
touch /etc/bash/ps1.sh && \
echo 'export PS1="[${APP_ENV:-env}] \[\e[1;31m\][${HOSTNAME:-hostname}] \[\e[1;33m\]\w\[\e[0m\] $ "' | tee /etc/profile /etc/bash/ps1.sh

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/
COPY --from=amazeeio/envplate:v1.0.3 /usr/local/bin/ep /usr/local/bin/ep

ENV PATH=${PATH}:/app/vendor/bin:/var/www/html/vendor/bin
ENV COMPOSER_HOME=/.composer
ENV ENV="/etc/profile"

# Fetch the required certificate for the Azure MySQL flexible server service
ENV AZURE_SQL_SSL_CA_PATH=/usr/local/share/ca-certificates/DigiCertGlobalRootCA.crt.pem
RUN wget https://dl.cacerts.digicert.com/DigiCertGlobalRootCA.crt.pem -O $AZURE_SQL_SSL_CA_PATH
Expand All @@ -53,9 +45,16 @@ EXPOSE 8080

# Copy configuration files and scripts
COPY files/ /
# Copy /etc/profile.d shell scripts to bash equivalent as well.
COPY files/etc/profile.d/ /etc/bash

RUN chmod +x /entrypoints/* && \
chmod +x /usr/local/bin/entrypoint

ENV PATH=${PATH}:/app/vendor/bin:/var/www/html/vendor/bin
ENV COMPOSER_HOME=/.composer
ENV ENV="/etc/profile"

RUN \
# Create missing nginx folder.
mkdir -p /run/nginx && \
Expand Down
1 change: 0 additions & 1 deletion openshift/drupal/files/etc/profile
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ for script in /etc/profile.d/*.sh ; do
fi
done
unset script
export PS1="[${APP_ENV:-env}] \[\e[1;31m\][${HOSTNAME:-hostname}] \[\e[1;33m\]\w\[\e[0m\] $ "
5 changes: 5 additions & 0 deletions openshift/drupal/files/etc/profile.d/aliases.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function helfi_check_packages {
composer show "drupal/helfi_*" $@
composer show "drupal/hdbt*" $@
}
alias helfi_check_package_status='helfi_check_packages --outdated'
1 change: 1 addition & 0 deletions openshift/drupal/files/etc/profile.d/ps1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export PS1="[${APP_ENV:-env}] \[\e[1;31m\][${HOSTNAME:-hostname}] \[\e[1;33m\]\w\[\e[0m\] $ "

0 comments on commit 9de7b27

Please sign in to comment.