commit c32d8313eda6c62ffef60a560462b9f611fbafe6 Author: Arnaud G. GIBERT Date: Sun Aug 25 00:03:07 2024 +0200 - Initial release, - Use based on php-apache-mga9:1.2.0 image. diff --git a/.env b/.env new file mode 100644 index 0000000..b2c26c6 --- /dev/null +++ b/.env @@ -0,0 +1,7 @@ +# Rx3 Ampache Mageia-9 Docker Image +#------------------------------------------------------------------------------- + +IMG_NAME="ampache-mga9" +IMG_FULL_NAME="Rx3 Ampache Mageia-9 Docker Image" +IMG_VERSION="1.0.0" +IMG_MAINTAINER='"Arnaud G. GIBERT" ' diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..556bc65 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*~ +*.old diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0ed6861 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,61 @@ +# +#------------------------------------------------------------------------------- + +FROM docker.xor.rx3:5000/rx3/php-apache-mga9:1.2.0 + +ARG IMG_NAME +ARG IMG_FULL_NAME +ARG IMG_VERSION +ARG IMG_MAINTAINER + +ARG AMPACHE_VERSION=6.6.0 + +ENV DISABLE_INOTIFYWAIT_CLEAN 0 + +LABEL org.rx3.${IMG_NAME}.name=${IMG_FULL_NAME} +LABEL org.rx3.${IMG_NAME}.version=${IMG_VERSION} +LABEL org.rx3.${IMG_NAME}.maintainer=${IMG_MAINTAINER} +LABEL maintainer=${IMG_MAINTAINER} + + +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 supervisor vorbis-tools zip unzip pwauth \ + && 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 \ + && 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 '#!/bin/bash\n\ncp -f /var/www/config/ampache.cfg.php.dist /var/www/config\nchown -R ${APACHE_UID}:${APACHE_GID} /var/www/config /var/log/ampache\n/usr/local/sbin/apache_init' > /usr/local/sbin/ampache_init \ + && chmod a+x /usr/local/sbin/ampache_init + + +VOLUME ["/var/www/html/config"] +VOLUME ["/var/log/ampache"] +VOLUME ["/media"] + + +EXPOSE 80 + +ENTRYPOINT ["/usr/local/sbin/ampache_init"] + + + +#COPY data/bin/run.sh data/bin/inotifywait.sh data/bin/cron.sh data/bin/apache2.sh data/bin/mysql.sh data/bin/create_mysql_admin_user.sh data/bin/ampache_cron.sh data/bin/docker-entrypoint.sh /usr/local/bin/ +#COPY data/sites-enabled/001-ampache.conf /etc/apache2/sites-available/ +#COPY data/apache2/php.ini /etc/php/8.2/apache2/ +#COPY data/logrotate.d/* /etc/logrotate.d/ +#COPY data/supervisord/supervisord.conf /etc/supervisor/conf.d/supervisord.conf + +#RUN chown -R www-data:www-data /var/tmp/ampache.cfg.php.dist /var/www/config \ +# && chmod +x /usr/local/bin/*.sh + +#ENTRYPOINT ["docker-entrypoint.sh"] +#CMD ["run.sh"] + +#ENTRYPOINT ["/bin/bash -c sleep 60m"] + diff --git a/ReadMe.txt b/ReadMe.txt new file mode 100644 index 0000000..03067d3 --- /dev/null +++ b/ReadMe.txt @@ -0,0 +1,16 @@ +Welcome to ampache-mga9 docker image! + + + +This is project aims to build a Ampache + Mageia 9 docker image. + +Features: + - ... + +Enjoy it! + +Your Rx3 Team. + +-- +arnaud@rx3.net +https://git.rx3.org/gitea/rx3/ampache-mga9 diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt new file mode 100644 index 0000000..6a9cd0b --- /dev/null +++ b/ReleaseNotes.txt @@ -0,0 +1,6 @@ +------------------------------------------------------------------------------------------------------------------------------------ +PHP-Apache-Mga9 V 1.0.0 - A. GIBERT - 2024/08/25 +------------------------------------------------------------------------------------------------------------------------------------ + +- Initial release, +- Use based on php-apache-mga9:1.2.0 image. diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..6a7a404 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,98 @@ +# Rx3 Ampache Mageia-9 Docker Image +#------------------------------------------------------------------------------- + +name: ${IMG_NAME} + +services: + database: + container_name: ${IMG_NAME}-mysql + + image: mariadb:11.4.3-ubi9 + + environment: + MARIADB_ROOT_PASSWORD: mysqladmin + MARIADB_DATABASE: ampache + MARIADB_USER: ampache + MARIADB_PASSWORD: ampacheadmin + MARIADB_ROOT_HOST: '%' # needs to be enclosed with quotes + + user: "983:981" + + volumes: + - ./mysql:/var/lib/mysql + + networks: + - ampache + + webapp-internal: + container_name: ${IMG_NAME}-internal + + image: docker.xor.rx3:5000/rx3/${IMG_NAME}:${IMG_VERSION} + + build: + context: . + args: + - IMG_NAME=${IMG_NAME} + - IMG_FULL_NAME=${IMG_FULL_NAME} + - IMG_VERSION=${IMG_VERSION} + - IMG_MAINTAINER=${IMG_MAINTAINER} + + restart: unless-stopped + + environment: + - APACHE_UID=980 + - APACHE_GID=977 + - APACHE_DOC_ROOT=/var/www/public + - DISABLE_INOTIFYWAIT_CLEAN=1 + + volumes: + - ./ampache-internal/config:/var/www/config + - ./ampache-internal/log:/var/log/ampache + - ./etc/cron.d/ampache:/etc/cron.d/ampache:ro + - /etc/passwd:/etc/passwd:ro + - /etc/group:/etc/group:ro + - /etc/shadow:/etc/shadow:ro + - ./media/music:/media/music + - ./media/video:/media/video + + networks: + - ampache + ports: + - "127.0.0.1:8085:80" + + webapp-external: + container_name: ${IMG_NAME}-external + + image: docker.xor.rx3:5000/rx3/${IMG_NAME}:${IMG_VERSION} + + restart: unless-stopped + + environment: + - APACHE_UID=980 + - APACHE_GID=977 + - APACHE_DOC_ROOT=/var/www/public + - DISABLE_INOTIFYWAIT_CLEAN=1 + + volumes: + - ./ampache-external/config:/var/www/config + - ./ampache-external/log:/var/log/ampache + - /etc/passwd:/etc/passwd:ro + - /etc/group:/etc/group:ro + - ./media/music:/media/music + - ./media/video:/media/video + + networks: + - ampache + ports: + - "127.0.0.1:8086:80" + +networks: + ampache: + name: ampache + driver: bridge + driver_opts: + com.docker.network.bridge.name: br-ampache + ipam: + config: + - subnet: 10.2.33.0/24 + gateway: 10.2.33.254