forked from ericfrederich/docker-ampache
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename aio to default and apache to nosql
- Loading branch information
1 parent
cbfb5aa
commit ba929e7
Showing
72 changed files
with
288 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/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<host> -P<port>" | ||
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 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
exec mysqld_safe --syslog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
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} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[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 |
15 changes: 15 additions & 0 deletions
15
6.5.0/default/data/supervisord/supervisord.tpl_apache.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/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<host> -P<port>" | ||
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 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
exec mysqld_safe --syslog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
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} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.