- Now use rx3/php-apache-mga9:1.3.3 image:

- PHP memory limit increased from 128M to 512M,
  - mpm support,
  - pwauth support,
- Remove now unneeded pwauth install & PHP config.
- Now use rx3/mariadb-mga9:1.0.2
- Variabilization of external server ports in env & compose file,
- Now use docker_tools for .env building,
- local directory normalization,
- fix ampache.cfg.php.dist initialization.
This commit is contained in:
Arnaud G. GIBERT 2024-10-05 18:19:58 +02:00
parent a657d46d27
commit 330badd135
13 changed files with 112 additions and 50 deletions

View File

@ -3,7 +3,7 @@
ARG IMG_URL_PREFIX="rx3" ARG IMG_URL_PREFIX="rx3"
FROM ${IMG_URL_PREFIX}/php-apache-mga9:1.3.2 FROM ${IMG_URL_PREFIX}/php-apache-mga9:1.3.3
ARG IMG_NAME ARG IMG_NAME
ARG IMG_FULL_NAME ARG IMG_FULL_NAME
@ -12,7 +12,7 @@ ARG IMG_MAINTAINER
ARG AMPACHE_VERSION=6.6.0 ARG AMPACHE_VERSION=6.6.0
ENV DISABLE_INOTIFYWAIT_CLEAN 0 ENV DISABLE_INOTIFYWAIT_CLEAN=0
LABEL org.rx3.${IMG_NAME}.name=${IMG_FULL_NAME} LABEL org.rx3.${IMG_NAME}.name=${IMG_FULL_NAME}
LABEL org.rx3.${IMG_NAME}.version=${IMG_VERSION} LABEL org.rx3.${IMG_NAME}.version=${IMG_VERSION}
@ -24,11 +24,9 @@ LABEL maintainer=${IMG_MAINTAINER}
#--------------------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------------------
ARG AMPACHE='#!/bin/bash \n\ ARG AMPACHE='#!/bin/bash \n\
\n\ \n\
cp -f /var/www/config/ampache.cfg.php.dist /var/www/config \n\ cp -f /var/tmp/ampache.cfg.php.dist /var/www/config \n\
\n\ \n\
chown -R apache:apache /var/www/config /var/log/ampache \n\ chown -R apache:apache /var/www/config /var/log/ampache'
chgrp apache /usr/bin/pwauth \n\
chmod u+s /usr/bin/pwauth'
#--------------------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------------------
@ -41,7 +39,7 @@ PATH=/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
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 \ 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 \ && 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 \ && 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 \ && unzip /tmp/ampache.zip -d /var/www \
@ -56,9 +54,7 @@ RUN urpmi --force wget ffmpeg lib64opencl1 flac inotify-tools lame lib64avcodec5
&& chmod -R 775 /var/www \ && chmod -R 775 /var/www \
&& echo -e "${AMPACHE}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/ampache \ && echo -e "${AMPACHE}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/ampache \
&& chmod a+x /etc/init.d/ampache \ && chmod a+x /etc/init.d/ampache \
&& ln -s /etc/init.d/ampache /etc/rcD.d/S40ampache \ && ln -s /etc/init.d/ampache /etc/rcD.d/S40ampache
&& sed -i -e "s/upload_max_filesize = 16M/upload_max_filesize = 32M/" /etc/php.d/01_fileuploads.ini \
&& sed -i -e "s/post_max_size = 8M/post_max_size = 32M/" /etc/php.d/01_datahandling.ini
VOLUME ["/var/www/html/config"] VOLUME ["/var/www/html/config"]

View File

@ -5,7 +5,7 @@ Welcome to Rx3/Ampache-Mga9 docker image!
This is project aims to build a Ampache + Mageia 9 docker image. This is project aims to build a Ampache + Mageia 9 docker image.
Features: Features:
- Based on rx3/php-apache-mga9:1.3.2 & rx3/mariadb-mga9:1.0.1 images, - Based on rx3/php-apache-mga9:1.3.3 & rx3/mariadb-mga9:1.0.2 images,
- Support mysql & external pwauth authentication. - Support mysql & external pwauth authentication.

View File

@ -1,3 +1,20 @@
------------------------------------------------------------------------------------------------------------------------------------
Rx3/Ampache-Mga9 V 1.2.2 - A. GIBERT - 2024/10/05
------------------------------------------------------------------------------------------------------------------------------------
- Now use rx3/php-apache-mga9:1.3.3 image:
- PHP memory limit increased from 128M to 512M,
- mpm support,
- pwauth support,
- Remove now unneeded pwauth install & PHP config.
- Now use rx3/mariadb-mga9:1.0.2
- Variabilization of external server ports in env & compose file,
- Now use docker_tools for .env building,
- local directory normalization,
- fix ampache.cfg.php.dist initialization.
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------
Rx3/Ampache-Mga9 V 1.2.1 - A. GIBERT - 2024/08/28 Rx3/Ampache-Mga9 V 1.2.1 - A. GIBERT - 2024/08/28
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------

View File

@ -7,7 +7,7 @@ services:
database: database:
container_name: ${IMG_NAME}-mysql container_name: ${IMG_NAME}-mysql
image: ${IMG_URL_PREFIX}/mariadb-mga9:1.0.1 image: ${IMG_URL_PREFIX}/mariadb-mga9:1.0.2
environment: environment:
MARIADB_UID: ${MARIADB_UID} MARIADB_UID: ${MARIADB_UID}
@ -19,14 +19,14 @@ services:
MARIADB_PASSWORD: ${MARIADB_PASSWORD} MARIADB_PASSWORD: ${MARIADB_PASSWORD}
volumes: volumes:
- ./mysql:/var/lib/mysql - ./var/lib/mysql:/var/lib/mysql
networks: networks:
- ampache - ampache
ports: ports:
- "127.0.0.1:9006:9001" - "127.0.0.1:${DATABASE_SV_PORT}:9001"
- "127.0.0.1:8006:3306" - "127.0.0.1:${DATABASE_PORT}:3306"
webapp-internal: webapp-internal:
container_name: ${IMG_NAME}-internal container_name: ${IMG_NAME}-internal
@ -45,26 +45,26 @@ services:
restart: unless-stopped restart: unless-stopped
environment: environment:
- APACHE_UID=980 APACHE_UID: ${APACHE_UID}
- APACHE_GID=977 APACHE_GID: ${APACHE_GID}
- APACHE_DOC_ROOT=/var/www/public APACHE_DOC_ROOT: ${APACHE_DOC_ROOT}
- DISABLE_INOTIFYWAIT_CLEAN=1
volumes: volumes:
- ./ampache-internal/config:/var/www/config - ./etc/ampache-internal:/var/www/config
- ./ampache-internal/log:/var/log/ampache - ./var/log/ampache-internal:/var/log/ampache
- ./etc/cron.d/ampache:/etc/cron.d/ampache:ro - ./etc/cron.d/ampache:/etc/cron.d/ampache:ro
- /etc/passwd:/etc/passwd:ro - /etc/passwd:/etc/passwd:ro
- /etc/group:/etc/group:ro - /etc/group:/etc/group:ro
- /etc/shadow:/etc/shadow:ro - /etc/shadow:/etc/shadow:ro
- ./media/music:/media/music - ./opt/music:/media/music
- ./media/video:/media/video - ./opt/video:/media/video
networks: networks:
- ampache - ampache
ports: ports:
- "127.0.0.1:9085:9001" - "127.0.0.1:${WEBAPP_INT_SV_PORT}:9001"
- "127.0.0.1:8085:80" - "127.0.0.1:${WEBAPP_INT_PORT}:80"
webapp-external: webapp-external:
container_name: ${IMG_NAME}-external container_name: ${IMG_NAME}-external
@ -74,24 +74,25 @@ services:
restart: unless-stopped restart: unless-stopped
environment: environment:
- APACHE_UID=980 APACHE_UID: ${APACHE_UID}
- APACHE_GID=977 APACHE_GID: ${APACHE_GID}
- APACHE_DOC_ROOT=/var/www/public APACHE_DOC_ROOT: ${APACHE_DOC_ROOT}
- DISABLE_INOTIFYWAIT_CLEAN=1
volumes: volumes:
- ./ampache-external/config:/var/www/config - ./etc/ampache-external:/var/www/config
- ./ampache-external/log:/var/log/ampache - ./var/log/ampache-external:/var/log/ampache
- /etc/passwd:/etc/passwd:ro - /etc/passwd:/etc/passwd:ro
- /etc/group:/etc/group:ro - /etc/group:/etc/group:ro
- ./media/music:/media/music - /etc/shadow:/etc/shadow:ro
- ./media/video:/media/video - ./opt/music:/media/music
- ./opt/video:/media/video
networks: networks:
- ampache - ampache
ports: ports:
- "127.0.0.1:9086:9001" - "127.0.0.1:${WEBAPP_EXT_SV_PORT}:9001"
- "127.0.0.1:8086:80" - "127.0.0.1:${WEBAPP_EXT_PORT}:80"
networks: networks:
ampache: ampache:

View File

@ -18,7 +18,7 @@ IMG_URL_PREFIX="${IMG_REGISTRY}/${IMG_ORG}"
IMG_NAME="ampache-mga9" IMG_NAME="ampache-mga9"
IMG_FULL_NAME="Rx3 Ampache Mageia-9 Docker Image" IMG_FULL_NAME="Rx3 Ampache Mageia-9 Docker Image"
IMG_VERSION="1.2.1" IMG_VERSION="1.2.2"
IMG_URL="${IMG_URL_PREFIX}/${IMG_NAME}:${IMG_VERSION}" IMG_URL="${IMG_URL_PREFIX}/${IMG_NAME}:${IMG_VERSION}"
IMG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>' IMG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
@ -28,6 +28,12 @@ IMG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
# User Settings # User Settings
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
ENV_PORT_OFFSET=0
SV_PORT_OFFSET=1000
DATABASE_PORT=$(( 8006 + ${ENV_PORT_OFFSET}))
DATABASE_SV_PORT=$(( ${DATABASE_PORT} + ${SV_PORT_OFFSET}))
MARIADB_UID=983 MARIADB_UID=983
MARIADB_GID=981 MARIADB_GID=981
MARIADB_ROOT_HOST='%' # needs to be enclosed with quotes MARIADB_ROOT_HOST='%' # needs to be enclosed with quotes
@ -35,3 +41,13 @@ MARIADB_ROOT_PASSWORD="mysqladmin"
MARIADB_DATABASE="ampache" MARIADB_DATABASE="ampache"
MARIADB_USER="ampache" MARIADB_USER="ampache"
MARIADB_PASSWORD="ampacheadmin" MARIADB_PASSWORD="ampacheadmin"
WEBAPP_INT_PORT=$(( 8085 + ${ENV_PORT_OFFSET}))
WEBAPP_INT_SV_PORT=$(( ${WEBAPP_INT_PORT} + ${SV_PORT_OFFSET}))
WEBAPP_EXT_PORT=$(( ${WEBAPP_INT_PORT} + 1))
WEBAPP_EXT_SV_PORT=$(( ${WEBAPP_EXT_PORT} + ${SV_PORT_OFFSET}))
APACHE_UID=980
APACHE_GID=977
APACHE_DOC_ROOT=/var/www/public

4
etc/ampache-external/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

4
etc/ampache-internal/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

4
etc/cron.d/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

4
opt/music/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

4
opt/video/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

4
var/lib/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

4
var/log/ampache-external/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

4
var/log/ampache-internal/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore