From 5742def1ce15cc0684cd50f9ec794bb73d7bfbe5 Mon Sep 17 00:00:00 2001 From: lachlan Date: Thu, 18 Jul 2024 20:36:33 +1000 Subject: [PATCH] rename the files corectly --- .../04_nginx_ampache_reverse.conf | 0 .../docker-compose.yml | 0 .../supervisord.conf | 0 6.4.0/default/Dockerfile | 2 +- ....tpl_aio.sh => create_mysql_admin_user.sh} | 0 .../data/bin/{mysql.tpl_aio.sh => mysql.sh} | 0 .../data/bin/{run.tpl_aio.sh => run.sh} | 0 ...compose.tpl_aio.yml => docker-compose.yml} | 0 ...isord.tpl_apache.conf => supervisord.conf} | 0 6.4.0/nosql/Dockerfile | 2 +- .../data/bin/run.sh} | 0 .../data/docker-compose.yml} | 0 .../data/supervisord/supervisord.conf} | 0 6.5.0/default/Dockerfile | 2 +- .../data/bin/create_mysql_admin_user.sh | 0 .../default/data/bin/mysql.sh | 0 .../default/data/bin/run.sh | 0 .../default/data/docker-compose.yml | 0 .../default/data/supervisord/supervisord.conf | 0 6.5.0/nosql/Dockerfile | 2 +- .../bin/create_mysql_admin_user.tpl_aio.sh | 36 ------------------- 6.5.0/nosql/data/bin/mysql.tpl_aio.sh | 3 -- .../nosql/data/bin/run.sh | 0 6.5.0/nosql/data/bin/run.tpl_aio.sh | 17 --------- 6.5.0/nosql/data/bin/run.tpl_apache.sh | 7 ---- 6.5.0/nosql/data/docker-compose.tpl_aio.yml | 16 --------- .../nosql/data/docker-compose.tpl_apache.yml | 15 -------- .../nosql/data/docker-compose.yml | 0 .../nosql/data/supervisord/supervisord.conf | 0 .../data/supervisord/supervisord.tpl_aio.conf | 21 ----------- .../supervisord/supervisord.tpl_apache.conf | 15 -------- data/bin/create_mysql_admin_user.tpl_aio.sh | 36 ------------------- .../create_mysql_admin_user.tpl_default.sh | 0 data/bin/mysql.tpl_aio.sh | 3 -- .../bin/mysql.tpl_default.sh | 0 data/bin/run.tpl_aio.sh | 17 --------- data/bin/run.tpl_apache.sh | 7 ---- .../bin/run.tpl_default.sh | 0 .../bin/run.tpl_nosql.sh | 0 data/docker-compose.tpl_aio.yml | 16 --------- data/docker-compose.tpl_apache.yml | 15 -------- .../docker-compose.tpl_default.yml | 0 .../docker-compose.tpl_nosql.yml | 0 data/supervisord/supervisord.tpl_aio.conf | 21 ----------- data/supervisord/supervisord.tpl_apache.conf | 15 -------- .../supervisord/supervisord.tpl_default.conf | 0 .../supervisord/supervisord.tpl_nosql.conf | 0 47 files changed, 4 insertions(+), 264 deletions(-) rename .examples/{aio-reverse-nginx => default-reverse-nginx}/04_nginx_ampache_reverse.conf (100%) rename .examples/{aio-reverse-nginx => default-reverse-nginx}/docker-compose.yml (100%) rename .examples/{aio-reverse-nginx => default-reverse-nginx}/supervisord.conf (100%) rename 6.4.0/default/data/bin/{create_mysql_admin_user.tpl_aio.sh => create_mysql_admin_user.sh} (100%) rename 6.4.0/default/data/bin/{mysql.tpl_aio.sh => mysql.sh} (100%) rename 6.4.0/default/data/bin/{run.tpl_aio.sh => run.sh} (100%) rename 6.4.0/default/data/{docker-compose.tpl_aio.yml => docker-compose.yml} (100%) rename 6.4.0/default/data/supervisord/{supervisord.tpl_apache.conf => supervisord.conf} (100%) rename 6.4.0/{default/data/bin/run.tpl_apache.sh => nosql/data/bin/run.sh} (100%) rename 6.4.0/{default/data/docker-compose.tpl_apache.yml => nosql/data/docker-compose.yml} (100%) rename 6.4.0/{default/data/supervisord/supervisord.tpl_aio.conf => nosql/data/supervisord/supervisord.conf} (100%) rename 6.4.0/nosql/data/bin/create_mysql_admin_user.tpl_aio.sh => 6.5.0/default/data/bin/create_mysql_admin_user.sh (100%) rename 6.4.0/nosql/data/bin/mysql.tpl_aio.sh => 6.5.0/default/data/bin/mysql.sh (100%) rename 6.4.0/nosql/data/bin/run.tpl_aio.sh => 6.5.0/default/data/bin/run.sh (100%) rename 6.4.0/nosql/data/docker-compose.tpl_aio.yml => 6.5.0/default/data/docker-compose.yml (100%) rename 6.4.0/nosql/data/supervisord/supervisord.tpl_apache.conf => 6.5.0/default/data/supervisord/supervisord.conf (100%) delete mode 100755 6.5.0/nosql/data/bin/create_mysql_admin_user.tpl_aio.sh delete mode 100755 6.5.0/nosql/data/bin/mysql.tpl_aio.sh rename 6.4.0/nosql/data/bin/run.tpl_apache.sh => 6.5.0/nosql/data/bin/run.sh (100%) delete mode 100755 6.5.0/nosql/data/bin/run.tpl_aio.sh delete mode 100644 6.5.0/nosql/data/bin/run.tpl_apache.sh delete mode 100644 6.5.0/nosql/data/docker-compose.tpl_aio.yml delete mode 100644 6.5.0/nosql/data/docker-compose.tpl_apache.yml rename 6.4.0/nosql/data/docker-compose.tpl_apache.yml => 6.5.0/nosql/data/docker-compose.yml (100%) rename 6.4.0/nosql/data/supervisord/supervisord.tpl_aio.conf => 6.5.0/nosql/data/supervisord/supervisord.conf (100%) delete mode 100644 6.5.0/nosql/data/supervisord/supervisord.tpl_aio.conf delete mode 100644 6.5.0/nosql/data/supervisord/supervisord.tpl_apache.conf delete mode 100755 data/bin/create_mysql_admin_user.tpl_aio.sh rename 6.5.0/default/data/bin/create_mysql_admin_user.tpl_aio.sh => data/bin/create_mysql_admin_user.tpl_default.sh (100%) delete mode 100755 data/bin/mysql.tpl_aio.sh rename 6.5.0/default/data/bin/mysql.tpl_aio.sh => data/bin/mysql.tpl_default.sh (100%) delete mode 100755 data/bin/run.tpl_aio.sh delete mode 100644 data/bin/run.tpl_apache.sh rename 6.5.0/default/data/bin/run.tpl_aio.sh => data/bin/run.tpl_default.sh (100%) rename 6.5.0/default/data/bin/run.tpl_apache.sh => data/bin/run.tpl_nosql.sh (100%) delete mode 100644 data/docker-compose.tpl_aio.yml delete mode 100644 data/docker-compose.tpl_apache.yml rename 6.5.0/default/data/docker-compose.tpl_aio.yml => data/docker-compose.tpl_default.yml (100%) rename 6.5.0/default/data/docker-compose.tpl_apache.yml => data/docker-compose.tpl_nosql.yml (100%) delete mode 100644 data/supervisord/supervisord.tpl_aio.conf delete mode 100644 data/supervisord/supervisord.tpl_apache.conf rename 6.5.0/default/data/supervisord/supervisord.tpl_apache.conf => data/supervisord/supervisord.tpl_default.conf (100%) rename 6.5.0/default/data/supervisord/supervisord.tpl_aio.conf => data/supervisord/supervisord.tpl_nosql.conf (100%) diff --git a/.examples/aio-reverse-nginx/04_nginx_ampache_reverse.conf b/.examples/default-reverse-nginx/04_nginx_ampache_reverse.conf similarity index 100% rename from .examples/aio-reverse-nginx/04_nginx_ampache_reverse.conf rename to .examples/default-reverse-nginx/04_nginx_ampache_reverse.conf diff --git a/.examples/aio-reverse-nginx/docker-compose.yml b/.examples/default-reverse-nginx/docker-compose.yml similarity index 100% rename from .examples/aio-reverse-nginx/docker-compose.yml rename to .examples/default-reverse-nginx/docker-compose.yml diff --git a/.examples/aio-reverse-nginx/supervisord.conf b/.examples/default-reverse-nginx/supervisord.conf similarity index 100% rename from .examples/aio-reverse-nginx/supervisord.conf rename to .examples/default-reverse-nginx/supervisord.conf diff --git a/6.4.0/default/Dockerfile b/6.4.0/default/Dockerfile index 3a3a9a0..da53884 100644 --- a/6.4.0/default/Dockerfile +++ b/6.4.0/default/Dockerfile @@ -5,7 +5,7 @@ LABEL maintainer="lachlan-00" ENV DEBIAN_FRONTEND=noninteractive ENV MYSQL_PASS **Random** ENV DISABLE_INOTIFYWAIT_CLEAN 0 -ARG VERSION=bookworm +ARG VERSION= RUN sh -c 'echo "Types: deb\n# http://snapshot.debian.org/archive/debian/20230612T000000Z\nURIs: http://deb.debian.org/debian\nSuites: stable stable-updates\nComponents: main contrib non-free\nSigned-By: /usr/share/keyrings/debian-archive-keyring.gpg\n\nTypes: deb\n# http://snapshot.debian.org/archive/debian-security/20230612T000000Z\nURIs: http://deb.debian.org/debian-security\nSuites: stable-security\nComponents: main\nSigned-By: /usr/share/keyrings/debian-archive-keyring.gpg\n" > /etc/apt/sources.list.d/debian.sources' \ && apt-get -q -q update \ diff --git a/6.4.0/default/data/bin/create_mysql_admin_user.tpl_aio.sh b/6.4.0/default/data/bin/create_mysql_admin_user.sh similarity index 100% rename from 6.4.0/default/data/bin/create_mysql_admin_user.tpl_aio.sh rename to 6.4.0/default/data/bin/create_mysql_admin_user.sh diff --git a/6.4.0/default/data/bin/mysql.tpl_aio.sh b/6.4.0/default/data/bin/mysql.sh similarity index 100% rename from 6.4.0/default/data/bin/mysql.tpl_aio.sh rename to 6.4.0/default/data/bin/mysql.sh diff --git a/6.4.0/default/data/bin/run.tpl_aio.sh b/6.4.0/default/data/bin/run.sh similarity index 100% rename from 6.4.0/default/data/bin/run.tpl_aio.sh rename to 6.4.0/default/data/bin/run.sh diff --git a/6.4.0/default/data/docker-compose.tpl_aio.yml b/6.4.0/default/data/docker-compose.yml similarity index 100% rename from 6.4.0/default/data/docker-compose.tpl_aio.yml rename to 6.4.0/default/data/docker-compose.yml diff --git a/6.4.0/default/data/supervisord/supervisord.tpl_apache.conf b/6.4.0/default/data/supervisord/supervisord.conf similarity index 100% rename from 6.4.0/default/data/supervisord/supervisord.tpl_apache.conf rename to 6.4.0/default/data/supervisord/supervisord.conf diff --git a/6.4.0/nosql/Dockerfile b/6.4.0/nosql/Dockerfile index 3fa1a55..7e6a441 100644 --- a/6.4.0/nosql/Dockerfile +++ b/6.4.0/nosql/Dockerfile @@ -4,7 +4,7 @@ LABEL maintainer="lachlan-00" ENV DEBIAN_FRONTEND=noninteractive ENV DISABLE_INOTIFYWAIT_CLEAN 0 -ARG VERSION=5.6.1 +ARG VERSION= RUN sh -c 'echo "Types: deb\n# http://snapshot.debian.org/archive/debian/20230612T000000Z\nURIs: http://deb.debian.org/debian\nSuites: stable stable-updates\nComponents: main contrib non-free\nSigned-By: /usr/share/keyrings/debian-archive-keyring.gpg\n\nTypes: deb\n# http://snapshot.debian.org/archive/debian-security/20230612T000000Z\nURIs: http://deb.debian.org/debian-security\nSuites: stable-security\nComponents: main\nSigned-By: /usr/share/keyrings/debian-archive-keyring.gpg\n" > /etc/apt/sources.list.d/debian.sources' \ && apt-get -q -q update \ diff --git a/6.4.0/default/data/bin/run.tpl_apache.sh b/6.4.0/nosql/data/bin/run.sh similarity index 100% rename from 6.4.0/default/data/bin/run.tpl_apache.sh rename to 6.4.0/nosql/data/bin/run.sh diff --git a/6.4.0/default/data/docker-compose.tpl_apache.yml b/6.4.0/nosql/data/docker-compose.yml similarity index 100% rename from 6.4.0/default/data/docker-compose.tpl_apache.yml rename to 6.4.0/nosql/data/docker-compose.yml diff --git a/6.4.0/default/data/supervisord/supervisord.tpl_aio.conf b/6.4.0/nosql/data/supervisord/supervisord.conf similarity index 100% rename from 6.4.0/default/data/supervisord/supervisord.tpl_aio.conf rename to 6.4.0/nosql/data/supervisord/supervisord.conf diff --git a/6.5.0/default/Dockerfile b/6.5.0/default/Dockerfile index 5435c89..126ef90 100644 --- a/6.5.0/default/Dockerfile +++ b/6.5.0/default/Dockerfile @@ -5,7 +5,7 @@ LABEL maintainer="lachlan-00" ENV DEBIAN_FRONTEND=noninteractive ENV MYSQL_PASS **Random** ENV DISABLE_INOTIFYWAIT_CLEAN 0 -ARG VERSION=bookworm +ARG VERSION= RUN sh -c 'echo "Types: deb\n# http://snapshot.debian.org/archive/debian/20230612T000000Z\nURIs: http://deb.debian.org/debian\nSuites: stable stable-updates\nComponents: main contrib non-free\nSigned-By: /usr/share/keyrings/debian-archive-keyring.gpg\n\nTypes: deb\n# http://snapshot.debian.org/archive/debian-security/20230612T000000Z\nURIs: http://deb.debian.org/debian-security\nSuites: stable-security\nComponents: main\nSigned-By: /usr/share/keyrings/debian-archive-keyring.gpg\n" > /etc/apt/sources.list.d/debian.sources' \ && apt-get -q -q update \ diff --git a/6.4.0/nosql/data/bin/create_mysql_admin_user.tpl_aio.sh b/6.5.0/default/data/bin/create_mysql_admin_user.sh similarity index 100% rename from 6.4.0/nosql/data/bin/create_mysql_admin_user.tpl_aio.sh rename to 6.5.0/default/data/bin/create_mysql_admin_user.sh diff --git a/6.4.0/nosql/data/bin/mysql.tpl_aio.sh b/6.5.0/default/data/bin/mysql.sh similarity index 100% rename from 6.4.0/nosql/data/bin/mysql.tpl_aio.sh rename to 6.5.0/default/data/bin/mysql.sh diff --git a/6.4.0/nosql/data/bin/run.tpl_aio.sh b/6.5.0/default/data/bin/run.sh similarity index 100% rename from 6.4.0/nosql/data/bin/run.tpl_aio.sh rename to 6.5.0/default/data/bin/run.sh diff --git a/6.4.0/nosql/data/docker-compose.tpl_aio.yml b/6.5.0/default/data/docker-compose.yml similarity index 100% rename from 6.4.0/nosql/data/docker-compose.tpl_aio.yml rename to 6.5.0/default/data/docker-compose.yml diff --git a/6.4.0/nosql/data/supervisord/supervisord.tpl_apache.conf b/6.5.0/default/data/supervisord/supervisord.conf similarity index 100% rename from 6.4.0/nosql/data/supervisord/supervisord.tpl_apache.conf rename to 6.5.0/default/data/supervisord/supervisord.conf diff --git a/6.5.0/nosql/Dockerfile b/6.5.0/nosql/Dockerfile index 6fe691a..b4ae295 100644 --- a/6.5.0/nosql/Dockerfile +++ b/6.5.0/nosql/Dockerfile @@ -4,7 +4,7 @@ LABEL maintainer="lachlan-00" ENV DEBIAN_FRONTEND=noninteractive ENV DISABLE_INOTIFYWAIT_CLEAN 0 -ARG VERSION=5.6.1 +ARG VERSION= RUN sh -c 'echo "Types: deb\n# http://snapshot.debian.org/archive/debian/20230612T000000Z\nURIs: http://deb.debian.org/debian\nSuites: stable stable-updates\nComponents: main contrib non-free\nSigned-By: /usr/share/keyrings/debian-archive-keyring.gpg\n\nTypes: deb\n# http://snapshot.debian.org/archive/debian-security/20230612T000000Z\nURIs: http://deb.debian.org/debian-security\nSuites: stable-security\nComponents: main\nSigned-By: /usr/share/keyrings/debian-archive-keyring.gpg\n" > /etc/apt/sources.list.d/debian.sources' \ && apt-get -q -q update \ diff --git a/6.5.0/nosql/data/bin/create_mysql_admin_user.tpl_aio.sh b/6.5.0/nosql/data/bin/create_mysql_admin_user.tpl_aio.sh deleted file mode 100755 index 82270ed..0000000 --- a/6.5.0/nosql/data/bin/create_mysql_admin_user.tpl_aio.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -mysqld_safe & -sleep 5 - -RET=1 -while [ $RET -ne 0 ]; do - echo "=> Waiting for confirmation of MySQL service startup" - sleep 5 - mysql -uroot -e "status" > /dev/null 2>&1 - RET=$? -done - -if [ "$MYSQL_PASS" = "**Random**" ]; then - unset MYSQL_PASS -fi - -PASS=${MYSQL_PASS:-$(pwgen -s 12 1)} -_word=$( [ ${MYSQL_PASS} ] && echo "preset" || echo "random" ) -echo "=> Creating MySQL admin user with ${_word} password" - -mysql -uroot -e "CREATE USER 'admin'@'localhost' IDENTIFIED BY '$PASS'" -mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION" - - -echo "=> Done!" -echo "========================================================================" -echo "You can now connect to this MySQL Server using:" -echo "" -echo " mysql -uadmin -p$PASS -h -P" -echo "" -echo "Please remember to change the above password as soon as possible!" -echo "MySQL user 'root' has no password but only allows local connections" -echo "========================================================================" - -mysqladmin -uroot shutdown diff --git a/6.5.0/nosql/data/bin/mysql.tpl_aio.sh b/6.5.0/nosql/data/bin/mysql.tpl_aio.sh deleted file mode 100755 index 7a64628..0000000 --- a/6.5.0/nosql/data/bin/mysql.tpl_aio.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -exec mysqld_safe --syslog diff --git a/6.4.0/nosql/data/bin/run.tpl_apache.sh b/6.5.0/nosql/data/bin/run.sh similarity index 100% rename from 6.4.0/nosql/data/bin/run.tpl_apache.sh rename to 6.5.0/nosql/data/bin/run.sh diff --git a/6.5.0/nosql/data/bin/run.tpl_aio.sh b/6.5.0/nosql/data/bin/run.tpl_aio.sh deleted file mode 100755 index fdf3052..0000000 --- a/6.5.0/nosql/data/bin/run.tpl_aio.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -if [[ ! -d /var/lib/mysql/mysql ]]; then - echo "=> An empty or uninitialized MySQL volume is detected in $VOLUME_HOME" - echo "=> Installing MySQL ..." - mysql_install_db --auth-root-authentication-method=normal --user=mysql - echo "=> Done!" - create_mysql_admin_user.sh -else - echo "=> Using an existing volume of MySQL" -fi - -# Copy Ampache config .dist files -cp -p /var/tmp/*.dist /var/www/config/ - -# Start Supervisor to manage all the processes -exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf diff --git a/6.5.0/nosql/data/bin/run.tpl_apache.sh b/6.5.0/nosql/data/bin/run.tpl_apache.sh deleted file mode 100644 index 15f9a95..0000000 --- a/6.5.0/nosql/data/bin/run.tpl_apache.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# Copy Ampache config .dist files -cp -p /var/tmp/*.dist /var/www/config/ - -# Start Supervisor to manage all the processes -exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf diff --git a/6.5.0/nosql/data/docker-compose.tpl_aio.yml b/6.5.0/nosql/data/docker-compose.tpl_aio.yml deleted file mode 100644 index 4dabe87..0000000 --- a/6.5.0/nosql/data/docker-compose.tpl_aio.yml +++ /dev/null @@ -1,16 +0,0 @@ -version: '3' - -services: - ampache: - image: ampache/ampache:latest - container_name: ampache - restart: unless-stopped - ports: - - 80:80 - volumes: - - ./data/config:/var/www/config - - ./data/log:/var/log/ampache - - ./data/media:/media - - ./data/mysql:/var/lib/mysql - environment: - DISABLE_INOTIFYWAIT_CLEAN: ${DISABLE_INOTIFYWAIT_CLEAN-0} diff --git a/6.5.0/nosql/data/docker-compose.tpl_apache.yml b/6.5.0/nosql/data/docker-compose.tpl_apache.yml deleted file mode 100644 index 5ed8029..0000000 --- a/6.5.0/nosql/data/docker-compose.tpl_apache.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: '3' - -services: - ampache: - image: ampache/ampache:nosql - container_name: ampache - restart: unless-stopped - ports: - - 80:80 - volumes: - - ./data/config:/var/www/config - - ./data/log:/var/log/ampache - - ./data/media:/media - environment: - DISABLE_INOTIFYWAIT_CLEAN: ${DISABLE_INOTIFYWAIT_CLEAN-0} diff --git a/6.4.0/nosql/data/docker-compose.tpl_apache.yml b/6.5.0/nosql/data/docker-compose.yml similarity index 100% rename from 6.4.0/nosql/data/docker-compose.tpl_apache.yml rename to 6.5.0/nosql/data/docker-compose.yml diff --git a/6.4.0/nosql/data/supervisord/supervisord.tpl_aio.conf b/6.5.0/nosql/data/supervisord/supervisord.conf similarity index 100% rename from 6.4.0/nosql/data/supervisord/supervisord.tpl_aio.conf rename to 6.5.0/nosql/data/supervisord/supervisord.conf diff --git a/6.5.0/nosql/data/supervisord/supervisord.tpl_aio.conf b/6.5.0/nosql/data/supervisord/supervisord.tpl_aio.conf deleted file mode 100644 index d757d65..0000000 --- a/6.5.0/nosql/data/supervisord/supervisord.tpl_aio.conf +++ /dev/null @@ -1,21 +0,0 @@ -[supervisord] -nodaemon=true -user=root -loglevel=info -logfile=/var/log/supervisor/supervisord.log -pidfile=/tmp/supervisord.pid - -[program:cron] -command=cron.sh - -[program:mysql] -command=mysql.sh -stopwaitsecs=120 -stopasgroup=true -killasgroup=true - -[program:apache2] -command=apache2.sh - -[program:inotifywait] -command=inotifywait.sh diff --git a/6.5.0/nosql/data/supervisord/supervisord.tpl_apache.conf b/6.5.0/nosql/data/supervisord/supervisord.tpl_apache.conf deleted file mode 100644 index 36f1720..0000000 --- a/6.5.0/nosql/data/supervisord/supervisord.tpl_apache.conf +++ /dev/null @@ -1,15 +0,0 @@ -[supervisord] -nodaemon=true -user=root -loglevel=info -logfile=/var/log/supervisor/supervisord.log -pidfile=/tmp/supervisord.pid - -[program:cron] -command=cron.sh - -[program:apache2] -command=apache2.sh - -[program:inotifywait] -command=inotifywait.sh diff --git a/data/bin/create_mysql_admin_user.tpl_aio.sh b/data/bin/create_mysql_admin_user.tpl_aio.sh deleted file mode 100755 index 82270ed..0000000 --- a/data/bin/create_mysql_admin_user.tpl_aio.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -mysqld_safe & -sleep 5 - -RET=1 -while [ $RET -ne 0 ]; do - echo "=> Waiting for confirmation of MySQL service startup" - sleep 5 - mysql -uroot -e "status" > /dev/null 2>&1 - RET=$? -done - -if [ "$MYSQL_PASS" = "**Random**" ]; then - unset MYSQL_PASS -fi - -PASS=${MYSQL_PASS:-$(pwgen -s 12 1)} -_word=$( [ ${MYSQL_PASS} ] && echo "preset" || echo "random" ) -echo "=> Creating MySQL admin user with ${_word} password" - -mysql -uroot -e "CREATE USER 'admin'@'localhost' IDENTIFIED BY '$PASS'" -mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION" - - -echo "=> Done!" -echo "========================================================================" -echo "You can now connect to this MySQL Server using:" -echo "" -echo " mysql -uadmin -p$PASS -h -P" -echo "" -echo "Please remember to change the above password as soon as possible!" -echo "MySQL user 'root' has no password but only allows local connections" -echo "========================================================================" - -mysqladmin -uroot shutdown diff --git a/6.5.0/default/data/bin/create_mysql_admin_user.tpl_aio.sh b/data/bin/create_mysql_admin_user.tpl_default.sh similarity index 100% rename from 6.5.0/default/data/bin/create_mysql_admin_user.tpl_aio.sh rename to data/bin/create_mysql_admin_user.tpl_default.sh diff --git a/data/bin/mysql.tpl_aio.sh b/data/bin/mysql.tpl_aio.sh deleted file mode 100755 index 7a64628..0000000 --- a/data/bin/mysql.tpl_aio.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -exec mysqld_safe --syslog diff --git a/6.5.0/default/data/bin/mysql.tpl_aio.sh b/data/bin/mysql.tpl_default.sh similarity index 100% rename from 6.5.0/default/data/bin/mysql.tpl_aio.sh rename to data/bin/mysql.tpl_default.sh diff --git a/data/bin/run.tpl_aio.sh b/data/bin/run.tpl_aio.sh deleted file mode 100755 index fdf3052..0000000 --- a/data/bin/run.tpl_aio.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -if [[ ! -d /var/lib/mysql/mysql ]]; then - echo "=> An empty or uninitialized MySQL volume is detected in $VOLUME_HOME" - echo "=> Installing MySQL ..." - mysql_install_db --auth-root-authentication-method=normal --user=mysql - echo "=> Done!" - create_mysql_admin_user.sh -else - echo "=> Using an existing volume of MySQL" -fi - -# Copy Ampache config .dist files -cp -p /var/tmp/*.dist /var/www/config/ - -# Start Supervisor to manage all the processes -exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf diff --git a/data/bin/run.tpl_apache.sh b/data/bin/run.tpl_apache.sh deleted file mode 100644 index 15f9a95..0000000 --- a/data/bin/run.tpl_apache.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# Copy Ampache config .dist files -cp -p /var/tmp/*.dist /var/www/config/ - -# Start Supervisor to manage all the processes -exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf diff --git a/6.5.0/default/data/bin/run.tpl_aio.sh b/data/bin/run.tpl_default.sh similarity index 100% rename from 6.5.0/default/data/bin/run.tpl_aio.sh rename to data/bin/run.tpl_default.sh diff --git a/6.5.0/default/data/bin/run.tpl_apache.sh b/data/bin/run.tpl_nosql.sh similarity index 100% rename from 6.5.0/default/data/bin/run.tpl_apache.sh rename to data/bin/run.tpl_nosql.sh diff --git a/data/docker-compose.tpl_aio.yml b/data/docker-compose.tpl_aio.yml deleted file mode 100644 index 4dabe87..0000000 --- a/data/docker-compose.tpl_aio.yml +++ /dev/null @@ -1,16 +0,0 @@ -version: '3' - -services: - ampache: - image: ampache/ampache:latest - container_name: ampache - restart: unless-stopped - ports: - - 80:80 - volumes: - - ./data/config:/var/www/config - - ./data/log:/var/log/ampache - - ./data/media:/media - - ./data/mysql:/var/lib/mysql - environment: - DISABLE_INOTIFYWAIT_CLEAN: ${DISABLE_INOTIFYWAIT_CLEAN-0} diff --git a/data/docker-compose.tpl_apache.yml b/data/docker-compose.tpl_apache.yml deleted file mode 100644 index 5ed8029..0000000 --- a/data/docker-compose.tpl_apache.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: '3' - -services: - ampache: - image: ampache/ampache:nosql - container_name: ampache - restart: unless-stopped - ports: - - 80:80 - volumes: - - ./data/config:/var/www/config - - ./data/log:/var/log/ampache - - ./data/media:/media - environment: - DISABLE_INOTIFYWAIT_CLEAN: ${DISABLE_INOTIFYWAIT_CLEAN-0} diff --git a/6.5.0/default/data/docker-compose.tpl_aio.yml b/data/docker-compose.tpl_default.yml similarity index 100% rename from 6.5.0/default/data/docker-compose.tpl_aio.yml rename to data/docker-compose.tpl_default.yml diff --git a/6.5.0/default/data/docker-compose.tpl_apache.yml b/data/docker-compose.tpl_nosql.yml similarity index 100% rename from 6.5.0/default/data/docker-compose.tpl_apache.yml rename to data/docker-compose.tpl_nosql.yml diff --git a/data/supervisord/supervisord.tpl_aio.conf b/data/supervisord/supervisord.tpl_aio.conf deleted file mode 100644 index d757d65..0000000 --- a/data/supervisord/supervisord.tpl_aio.conf +++ /dev/null @@ -1,21 +0,0 @@ -[supervisord] -nodaemon=true -user=root -loglevel=info -logfile=/var/log/supervisor/supervisord.log -pidfile=/tmp/supervisord.pid - -[program:cron] -command=cron.sh - -[program:mysql] -command=mysql.sh -stopwaitsecs=120 -stopasgroup=true -killasgroup=true - -[program:apache2] -command=apache2.sh - -[program:inotifywait] -command=inotifywait.sh diff --git a/data/supervisord/supervisord.tpl_apache.conf b/data/supervisord/supervisord.tpl_apache.conf deleted file mode 100644 index 36f1720..0000000 --- a/data/supervisord/supervisord.tpl_apache.conf +++ /dev/null @@ -1,15 +0,0 @@ -[supervisord] -nodaemon=true -user=root -loglevel=info -logfile=/var/log/supervisor/supervisord.log -pidfile=/tmp/supervisord.pid - -[program:cron] -command=cron.sh - -[program:apache2] -command=apache2.sh - -[program:inotifywait] -command=inotifywait.sh diff --git a/6.5.0/default/data/supervisord/supervisord.tpl_apache.conf b/data/supervisord/supervisord.tpl_default.conf similarity index 100% rename from 6.5.0/default/data/supervisord/supervisord.tpl_apache.conf rename to data/supervisord/supervisord.tpl_default.conf diff --git a/6.5.0/default/data/supervisord/supervisord.tpl_aio.conf b/data/supervisord/supervisord.tpl_nosql.conf similarity index 100% rename from 6.5.0/default/data/supervisord/supervisord.tpl_aio.conf rename to data/supervisord/supervisord.tpl_nosql.conf