2024-12-02 16:51:20 +01:00
|
|
|
# Rx3-Docker/Ampache Dockerfile
|
2024-08-25 00:03:07 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2024-12-02 16:51:20 +01:00
|
|
|
ARG IMG_FROM_URL="rx3-docker/php-apache:latest"
|
2024-08-27 00:04:39 +02:00
|
|
|
|
2024-12-02 16:51:20 +01:00
|
|
|
FROM ${IMG_FROM_URL}
|
2024-08-25 00:03:07 +02:00
|
|
|
|
|
|
|
ARG IMG_NAME
|
2024-12-02 16:51:20 +01:00
|
|
|
ARG IMG_NAME_FULL
|
2024-08-25 00:03:07 +02:00
|
|
|
ARG IMG_VERSION
|
|
|
|
ARG IMG_MAINTAINER
|
|
|
|
|
2024-12-02 16:51:20 +01:00
|
|
|
LABEL org.rx3.${IMG_NAME}.name=${IMG_NAME_FULL}
|
2024-08-25 00:03:07 +02:00
|
|
|
LABEL org.rx3.${IMG_NAME}.version=${IMG_VERSION}
|
|
|
|
LABEL org.rx3.${IMG_NAME}.maintainer=${IMG_MAINTAINER}
|
|
|
|
LABEL maintainer=${IMG_MAINTAINER}
|
|
|
|
|
2024-12-02 16:51:20 +01:00
|
|
|
ARG AMPACHE_VERSION=6.6.0
|
|
|
|
|
|
|
|
ENV DISABLE_INOTIFYWAIT_CLEAN=0
|
|
|
|
|
2024-08-25 00:03:07 +02:00
|
|
|
|
2024-08-27 00:04:39 +02:00
|
|
|
|
|
|
|
#---------------------------------------------------------------------------------------------------
|
|
|
|
ARG AMPACHE='#!/bin/bash \n\
|
|
|
|
\n\
|
2024-10-05 18:19:58 +02:00
|
|
|
cp -f /var/tmp/ampache.cfg.php.dist /var/www/config \n\
|
2024-08-27 00:04:39 +02:00
|
|
|
\n\
|
2024-10-05 18:19:58 +02:00
|
|
|
chown -R apache:apache /var/www/config /var/log/ampache'
|
2024-08-28 18:01:42 +02:00
|
|
|
#---------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------------------------------
|
|
|
|
ARG AMPACHE_CRON='# /etc/cron.d/ampache: crontab fragment for ampache server \n\
|
|
|
|
\n\
|
|
|
|
PATH=/bin:/usr/bin:/usr/local/bin:/usr/local/sbin \n\
|
|
|
|
\n\
|
|
|
|
15 3 * * * apache cd /var/www; php bin/cli run:updateCatalog -v -c -e -a -g >/var/log/ampache/catalog_update.log 2>&1'
|
2024-08-27 00:04:39 +02:00
|
|
|
#---------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-10-05 18:19:58 +02:00
|
|
|
RUN urpmi --force wget ffmpeg lib64opencl1 flac inotify-tools lame lib64avcodec59 lib64event7 lib64mp3lame-devel lib64theora-devel lib64vorbis-devel lib64vpx-devel php-iconv php-curl php-gd php-intl php-ldap php-sabre-xml php-zip vorbis-tools zip unzip \
|
|
|
|
&& mkdir -p /var/log/ampache \
|
|
|
|
&& wget -q -O /tmp/ampache.zip https://github.com/ampache/ampache/releases/download/${AMPACHE_VERSION}/ampache-${AMPACHE_VERSION}_all_php8.2.zip \
|
|
|
|
&& unzip /tmp/ampache.zip -d /var/www \
|
|
|
|
&& sed -i -e 's/$transcode_cfg != '"'"'never'"'"'/$transcode_cfg != '"'"'ever'"'"'/' /var/www/src/Module/Util/Waveform.php \
|
|
|
|
&& sed -i -e 's/ || static::getUserRepository()->idByEmail($email) > 0//' /var/www/src/Repository/Model/User.php \
|
|
|
|
&& cp -f /var/www/public/rest/.htaccess.dist /var/www/public/rest/.htaccess \
|
|
|
|
&& cp -f /var/www/public/play/.htaccess.dist /var/www/public/play/.htaccess \
|
|
|
|
&& cp -f /var/www/config/ampache.cfg.php.dist /var/tmp \
|
|
|
|
&& rm -f /tmp/ampache.zip /var/www/public/.php*cs* /var/www/public/.sc /var/www/public/.scrutinizer.yml /var/www/public/.tgitconfig /var/www/public/.travis.yml /var/www/public/*.md \
|
|
|
|
&& find /var/www -type d -name ".git*" -print0 | xargs -0 rm -rf {} \
|
|
|
|
&& chown -R root:root /var/www \
|
|
|
|
&& chmod -R 775 /var/www \
|
|
|
|
&& echo -e "${AMPACHE}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/ampache \
|
|
|
|
&& chmod a+x /etc/init.d/ampache \
|
|
|
|
&& ln -s /etc/init.d/ampache /etc/rcD.d/S40ampache
|
2024-08-25 00:03:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
VOLUME ["/var/www/html/config"]
|
|
|
|
VOLUME ["/var/log/ampache"]
|
|
|
|
VOLUME ["/media"]
|
|
|
|
|