mirror of
https://github.com/casjaysdevdocker/ampache
synced 2026-05-19 02:47:55 -04:00
🗃️ Removed the .claude/settings.local.json 🗃️
Some checks failed
ampache / release-ampache (push) Has been cancelled
Some checks failed
ampache / release-ampache (push) Has been cancelled
Dockerfile .env.scripts .gitattributes .gitea/ .gitignore LICENSE.md README.md rootfs/root/docker/setup/04-users.sh rootfs/root/docker/setup/05-custom.sh rootfs/tmp/ rootfs/usr/local/bin/entrypoint.sh rootfs/usr/local/bin/pkmgr rootfs/usr/local/etc/docker/bin/ rootfs/usr/local/etc/docker/init.d/
This commit is contained in:
3
rootfs/tmp/etc/ampache/.gitkeep
Normal file
3
rootfs/tmp/etc/ampache/.gitkeep
Normal file
@@ -0,0 +1,3 @@
|
||||
# Placeholder. /etc/ampache/ exists so the framework can seed /config/ampache/
|
||||
# from /usr/local/share/template-files/config/ampache/ on first run; the real
|
||||
# ampache.cfg.php is generated by install.php after the first web visit.
|
||||
33
rootfs/tmp/etc/apache2/conf.d/ampache.conf
Normal file
33
rootfs/tmp/etc/apache2/conf.d/ampache.conf
Normal file
@@ -0,0 +1,33 @@
|
||||
# casjaysdevdocker/ampache - Apache vhost for Ampache
|
||||
#
|
||||
# DocumentRoot is the upstream-blessed `public/` subfolder of the Ampache
|
||||
# install (see https://ampache.org/docs/installation).
|
||||
|
||||
<VirtualHost *:80>
|
||||
ServerName casjaysdev-ampache
|
||||
DocumentRoot /usr/local/share/ampache/public
|
||||
|
||||
<Directory /usr/local/share/ampache/public>
|
||||
Options FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
|
||||
# Ampache's REST API needs the Authorization header passed through.
|
||||
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
|
||||
</Directory>
|
||||
|
||||
# Block .git and other dotfile dirs.
|
||||
<DirectoryMatch "^/.*/\.(git|svn|hg)/">
|
||||
Require all denied
|
||||
</DirectoryMatch>
|
||||
|
||||
# Hand .php files to php-fpm over its unix socket.
|
||||
<FilesMatch "\.php$">
|
||||
SetHandler "proxy:unix:/run/php-fpm/php-fpm.sock|fcgi://localhost"
|
||||
</FilesMatch>
|
||||
|
||||
DirectoryIndex index.php index.html
|
||||
|
||||
ErrorLog /data/logs/apache2/ampache_error.log
|
||||
CustomLog /data/logs/apache2/ampache_access.log combined
|
||||
</VirtualHost>
|
||||
10
rootfs/tmp/etc/apache2/conf.d/mpm.conf
Normal file
10
rootfs/tmp/etc/apache2/conf.d/mpm.conf
Normal file
@@ -0,0 +1,10 @@
|
||||
# casjaysdevdocker/ampache - MPM event tuning
|
||||
<IfModule mpm_event_module>
|
||||
StartServers 2
|
||||
MinSpareThreads 25
|
||||
MaxSpareThreads 75
|
||||
ThreadLimit 64
|
||||
ThreadsPerChild 25
|
||||
MaxRequestWorkers 150
|
||||
MaxConnectionsPerChild 0
|
||||
</IfModule>
|
||||
83
rootfs/tmp/etc/apache2/httpd.conf
Normal file
83
rootfs/tmp/etc/apache2/httpd.conf
Normal file
@@ -0,0 +1,83 @@
|
||||
# casjaysdevdocker/ampache - Apache httpd 2.4 (Alpine) - main config
|
||||
#
|
||||
# Wipe-and-replace via 05-custom.sh; user edits live at /config/apache2/.
|
||||
|
||||
ServerRoot /var/www
|
||||
PidFile /run/apache2/httpd.pid
|
||||
Mutex file:/run/apache2 default
|
||||
Timeout 60
|
||||
KeepAlive On
|
||||
MaxKeepAliveRequests 100
|
||||
KeepAliveTimeout 5
|
||||
|
||||
User apache
|
||||
Group apache
|
||||
|
||||
ServerAdmin docker-admin@casjaysdev.pro
|
||||
ServerName casjaysdev-ampache:80
|
||||
ServerSignature Off
|
||||
ServerTokens Prod
|
||||
UseCanonicalName Off
|
||||
HostnameLookups Off
|
||||
|
||||
Listen 80
|
||||
|
||||
# Modules - load only what we need.
|
||||
LoadModule mpm_event_module modules/mod_mpm_event.so
|
||||
LoadModule unixd_module modules/mod_unixd.so
|
||||
LoadModule authn_core_module modules/mod_authn_core.so
|
||||
LoadModule authn_file_module modules/mod_authn_file.so
|
||||
LoadModule authz_core_module modules/mod_authz_core.so
|
||||
LoadModule authz_host_module modules/mod_authz_host.so
|
||||
LoadModule authz_user_module modules/mod_authz_user.so
|
||||
LoadModule auth_basic_module modules/mod_auth_basic.so
|
||||
LoadModule access_compat_module modules/mod_access_compat.so
|
||||
LoadModule reqtimeout_module modules/mod_reqtimeout.so
|
||||
LoadModule filter_module modules/mod_filter.so
|
||||
LoadModule mime_module modules/mod_mime.so
|
||||
LoadModule mime_magic_module modules/mod_mime_magic.so
|
||||
LoadModule log_config_module modules/mod_log_config.so
|
||||
LoadModule env_module modules/mod_env.so
|
||||
LoadModule headers_module modules/mod_headers.so
|
||||
LoadModule expires_module modules/mod_expires.so
|
||||
LoadModule deflate_module modules/mod_deflate.so
|
||||
LoadModule brotli_module modules/mod_brotli.so
|
||||
LoadModule setenvif_module modules/mod_setenvif.so
|
||||
LoadModule version_module modules/mod_version.so
|
||||
LoadModule status_module modules/mod_status.so
|
||||
LoadModule autoindex_module modules/mod_autoindex.so
|
||||
LoadModule dir_module modules/mod_dir.so
|
||||
LoadModule alias_module modules/mod_alias.so
|
||||
LoadModule rewrite_module modules/mod_rewrite.so
|
||||
LoadModule negotiation_module modules/mod_negotiation.so
|
||||
LoadModule proxy_module modules/mod_proxy.so
|
||||
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
|
||||
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
|
||||
LoadModule ssl_module modules/mod_ssl.so
|
||||
LoadModule http2_module modules/mod_http2.so
|
||||
|
||||
TypesConfig /etc/apache2/mime.types
|
||||
MimeMagicFile /etc/apache2/magic
|
||||
DirectoryIndex index.php index.html
|
||||
|
||||
# Default deny on filesystem root; vhost re-permits its DocumentRoot.
|
||||
<Directory />
|
||||
AllowOverride None
|
||||
Require all denied
|
||||
</Directory>
|
||||
|
||||
# Hide dotfiles.
|
||||
<FilesMatch "^\.">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
|
||||
# Logs land under /data so they survive container recreation.
|
||||
ErrorLog /data/logs/apache2/error.log
|
||||
LogLevel warn
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
||||
CustomLog /data/logs/apache2/access.log combined
|
||||
|
||||
# Drop in our service vhost(s) and any user-supplied ones.
|
||||
IncludeOptional /etc/apache2/conf.d/*.conf
|
||||
IncludeOptional /config/apache2/vhosts.d/*.conf
|
||||
53
rootfs/tmp/etc/my.cnf.d/mariadb-server.cnf
Normal file
53
rootfs/tmp/etc/my.cnf.d/mariadb-server.cnf
Normal file
@@ -0,0 +1,53 @@
|
||||
# casjaysdevdocker/ampache - MariaDB server config
|
||||
#
|
||||
# Wipe-and-replace via 05-custom.sh; user edits live at /config/my.cnf.d/.
|
||||
|
||||
[client]
|
||||
port = 3306
|
||||
socket = /run/mysqld/mysqld.sock
|
||||
default-character-set = utf8mb4
|
||||
|
||||
[mysql]
|
||||
no_auto_rehash
|
||||
default-character-set = utf8mb4
|
||||
prompt = '\u@\h [\d]> '
|
||||
|
||||
[mysqldump]
|
||||
max_allowed_packet = 64M
|
||||
|
||||
[mysqld_safe]
|
||||
log-error = /data/logs/mariadb/mariadb.err.log
|
||||
pid-file = /run/mysqld/mariadb.pid
|
||||
|
||||
[mysqld]
|
||||
user = mysql
|
||||
datadir = /data/db/mariadb
|
||||
socket = /run/mysqld/mysqld.sock
|
||||
port = 3306
|
||||
bind-address = 127.0.0.1
|
||||
pid-file = /run/mysqld/mariadb.pid
|
||||
log-error = /data/logs/mariadb/mariadb.err.log
|
||||
|
||||
character-set-server = utf8mb4
|
||||
collation-server = utf8mb4_unicode_ci
|
||||
default-storage-engine = InnoDB
|
||||
|
||||
max_allowed_packet = 64M
|
||||
max_connections = 100
|
||||
open_files_limit = 16384
|
||||
key_buffer_size = 32M
|
||||
table_open_cache = 256
|
||||
|
||||
innodb_buffer_pool_size = 256M
|
||||
innodb_log_file_size = 64M
|
||||
innodb_flush_log_at_trx_commit = 2
|
||||
innodb_file_per_table = 1
|
||||
|
||||
slow_query_log = 1
|
||||
slow_query_log_file = /data/logs/mariadb/mariadb-slow.log
|
||||
long_query_time = 2
|
||||
|
||||
skip-name-resolve
|
||||
|
||||
[mariadb]
|
||||
plugin_load_add = auth_socket
|
||||
12
rootfs/tmp/etc/php84/php-fpm.conf
Normal file
12
rootfs/tmp/etc/php84/php-fpm.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
; casjaysdevdocker/ampache - PHP-FPM 8.4 global config
|
||||
|
||||
[global]
|
||||
pid = /run/php-fpm/php-fpm.pid
|
||||
error_log = /data/logs/php-fpm/error.log
|
||||
log_level = notice
|
||||
emergency_restart_threshold = 0
|
||||
emergency_restart_interval = 0
|
||||
process_control_timeout = 0
|
||||
daemonize = no
|
||||
|
||||
include = /etc/php84/php-fpm.d/*.conf
|
||||
39
rootfs/tmp/etc/php84/php-fpm.d/www.conf
Normal file
39
rootfs/tmp/etc/php84/php-fpm.d/www.conf
Normal file
@@ -0,0 +1,39 @@
|
||||
; casjaysdevdocker/ampache - PHP-FPM www pool
|
||||
|
||||
[www]
|
||||
user = apache
|
||||
group = apache
|
||||
|
||||
listen = /run/php-fpm/php-fpm.sock
|
||||
listen.owner = apache
|
||||
listen.group = apache
|
||||
listen.mode = 0660
|
||||
listen.backlog = 511
|
||||
|
||||
pm = dynamic
|
||||
pm.max_children = 20
|
||||
pm.start_servers = 4
|
||||
pm.min_spare_servers = 2
|
||||
pm.max_spare_servers = 8
|
||||
pm.max_requests = 500
|
||||
pm.process_idle_timeout = 30s
|
||||
pm.status_path = /status
|
||||
ping.path = /ping
|
||||
ping.response = pong
|
||||
|
||||
access.log = /data/logs/php-fpm/access.log
|
||||
slowlog = /data/logs/php-fpm/slow.log
|
||||
request_slowlog_timeout = 5s
|
||||
request_terminate_timeout = 300s
|
||||
|
||||
clear_env = no
|
||||
catch_workers_output = yes
|
||||
decorate_workers_output = no
|
||||
|
||||
php_admin_value[error_log] = /data/logs/php-fpm/error.log
|
||||
php_admin_flag[log_errors] = on
|
||||
php_admin_value[memory_limit] = 512M
|
||||
php_admin_value[upload_max_filesize] = 256M
|
||||
php_admin_value[post_max_size] = 256M
|
||||
php_admin_value[max_execution_time] = 300
|
||||
php_admin_value[session.save_path] = /tmp/php-sessions
|
||||
80
rootfs/tmp/etc/php84/php.ini
Normal file
80
rootfs/tmp/etc/php84/php.ini
Normal file
@@ -0,0 +1,80 @@
|
||||
; casjaysdevdocker/ampache - PHP 8.4 production tunings for Ampache
|
||||
|
||||
[PHP]
|
||||
engine = On
|
||||
short_open_tag = Off
|
||||
precision = 14
|
||||
output_buffering = 4096
|
||||
zlib.output_compression = Off
|
||||
implicit_flush = Off
|
||||
serialize_precision = -1
|
||||
disable_functions =
|
||||
disable_classes =
|
||||
zend.enable_gc = On
|
||||
expose_php = Off
|
||||
max_execution_time = 300
|
||||
max_input_time = 300
|
||||
max_input_vars = 5000
|
||||
memory_limit = 512M
|
||||
|
||||
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
|
||||
display_errors = Off
|
||||
display_startup_errors = Off
|
||||
log_errors = On
|
||||
log_errors_max_len = 1024
|
||||
ignore_repeated_errors = Off
|
||||
ignore_repeated_source = Off
|
||||
report_memleaks = On
|
||||
html_errors = On
|
||||
error_log = /data/logs/php-fpm/error.log
|
||||
|
||||
variables_order = "GPCS"
|
||||
request_order = "GP"
|
||||
register_argc_argv = Off
|
||||
auto_globals_jit = On
|
||||
|
||||
post_max_size = 256M
|
||||
upload_max_filesize = 256M
|
||||
max_file_uploads = 20
|
||||
|
||||
default_socket_timeout = 60
|
||||
allow_url_fopen = On
|
||||
allow_url_include = Off
|
||||
|
||||
cgi.fix_pathinfo = 0
|
||||
|
||||
[Date]
|
||||
date.timezone = REPLACE_TZ
|
||||
|
||||
[Session]
|
||||
session.save_handler = files
|
||||
session.save_path = "/tmp/php-sessions"
|
||||
session.use_strict_mode = 0
|
||||
session.use_cookies = 1
|
||||
session.use_only_cookies = 1
|
||||
session.name = AMPACHE_SESSION
|
||||
session.auto_start = 0
|
||||
session.cookie_lifetime = 0
|
||||
session.cookie_path = /
|
||||
session.cookie_secure = Off
|
||||
session.cookie_httponly = On
|
||||
session.cookie_samesite = Lax
|
||||
session.gc_probability = 1
|
||||
session.gc_divisor = 1000
|
||||
session.gc_maxlifetime = 86400
|
||||
|
||||
[opcache]
|
||||
opcache.enable = 1
|
||||
opcache.enable_cli = 0
|
||||
opcache.memory_consumption = 256
|
||||
opcache.interned_strings_buffer = 16
|
||||
opcache.max_accelerated_files = 20000
|
||||
opcache.revalidate_freq = 60
|
||||
opcache.fast_shutdown = 1
|
||||
opcache.validate_timestamps = 1
|
||||
|
||||
[curl]
|
||||
curl.cainfo = /etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
[openssl]
|
||||
openssl.cafile = /etc/ssl/certs/ca-certificates.crt
|
||||
Reference in New Issue
Block a user