This commit is contained in:
Alexandre
2025-01-05 10:57:55 +01:00
parent 9a1e4e8118
commit 3de9696b9c
4 changed files with 135 additions and 115 deletions

View File

@@ -27,15 +27,27 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
S6_SERVICES_GRACETIME=0
ENV APACHE_RUN_USER=www-data \
APACHE_RUN_GROUP=www-data \
APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid \
APACHE_RUN_DIR=/var/run/apache2$SUFFIX \
APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX \
APACHE_LOG_DIR=/var/log/apache2$SUFFIX \
LANG=C \
APACHE_CONFDIR=/etc/apache2 \
APACHE_ENVVARS=/etc/apache2/envvars
# Global variables
ENV WEBTREES_HOME="/data/webtrees"
ENV WEBTREES_HOME="/var2/www/webtrees"
WORKDIR $WEBTREES_HOME
# hadolint ignore=DL4006
RUN \
# Change data location
grep -rl "/var/www/webtrees" /etc | xargs sed -i 's|/var/www/webtrees|/data/webtrees|g' \
&& sed -i 's|/var/www/webtrees|/data/webtrees|g' /docker-entrypoint.py
grep -rl "/var/www/webtrees" /etc | xargs sed -i 's|/var/www/webtrees|/var2/www/webtrees|g' \
&& sed -i 's|/var/www/webtrees|/var2/www/webtrees|g' /docker-entrypoint.py \
&& mkdir -p /var2 \
&& cp -rf /var/* /var2/ \
&& chown -R www-data:www-data /var2/www/webtrees
# Add end script
# && sed -i '$ d' /docker-entrypoint.py
@@ -61,7 +73,7 @@ RUN chmod 744 /ha_automodules.sh && /ha_automodules.sh "$MODULES" && rm /ha_auto
# Manual apps
ENV PACKAGES="jq \
curl \
yamllint"
yamllint nginx"
# Automatic apps & bashio
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_autoapps.sh" "/ha_autoapps.sh"
@@ -79,7 +91,6 @@ ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templat
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint_modif.sh" "/ha_entrypoint_modif.sh"
RUN chmod 777 /ha_entrypoint.sh /ha_entrypoint_modif.sh && /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh
ENTRYPOINT [ "/usr/bin/env" ]
CMD [ "/ha_entrypoint.sh" ]