mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Update docker handling
This commit is contained in:
+11
-2
@@ -26,6 +26,9 @@ RUN apt-get update \
|
||||
&& echo "deb [signed-by=/etc/apt/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
|
||||
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/keyrings/pgdg.gpg >/dev/null \
|
||||
&& echo "deb [signed-by=/etc/apt/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt noble-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
|
||||
&& curl -fsSL https://extras.getpagespeed.com/deb-archive-keyring.gpg -o /etc/apt/keyrings/getpagespeed.gpg \
|
||||
&& echo "deb [signed-by=/etc/apt/keyrings/getpagespeed.gpg] https://extras.getpagespeed.com/ubuntu noble main" > /etc/apt/sources.list.d/getpagespeed.list \
|
||||
&& printf 'Package: *\nPin: origin extras.getpagespeed.com\nPin-Priority: 1001\n' > /etc/apt/preferences.d/getpagespeed-nginx.pref \
|
||||
&& apt-get update
|
||||
|
||||
# Install core PHP packages
|
||||
@@ -48,7 +51,12 @@ RUN apt-get install -y --no-install-recommends \
|
||||
RUN apt-get install -y \
|
||||
tmux iputils-ping net-tools ffmpeg \
|
||||
sudo jq htop fonts-powerline nano bash-completion time wget cron \
|
||||
nginx jpegoptim webp optipng pngquant libavif-bin
|
||||
jpegoptim webp optipng pngquant libavif-bin
|
||||
|
||||
# Install nginx + brotli module from GetPageSpeed (apt-pinned, stable branch)
|
||||
RUN apt-get install -y nginx nginx-module-brotli \
|
||||
&& rm -f /etc/nginx/conf.d/default.conf \
|
||||
&& nginx -t
|
||||
|
||||
# Install mediainfo
|
||||
RUN wget https://mediaarea.net/repo/deb/repo-mediaarea_1.0-25_all.deb \
|
||||
@@ -90,7 +98,8 @@ COPY nginx.conf /etc/nginx/sites-available/default
|
||||
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
||||
COPY php.ini /etc/php/8.5/cli/conf.d/99-sail.ini
|
||||
|
||||
RUN chmod +x /usr/local/bin/start-container
|
||||
RUN chmod +x /usr/local/bin/start-container \
|
||||
&& nginx -t
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
||||
+9
-10
@@ -12,16 +12,15 @@ server {
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 6;
|
||||
|
||||
# Brotli compression (requires libnginx-mod-http-brotli-filter and libnginx-mod-http-brotli-static)
|
||||
# Uncomment these lines after installing the brotli module
|
||||
#brotli on;
|
||||
#brotli_comp_level 6;
|
||||
#brotli_static on;
|
||||
#brotli_types application/atom+xml application/javascript application/json application/rss+xml
|
||||
#application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype
|
||||
#application/x-font-ttf application/x-javascript application/xhtml+xml application/xml
|
||||
#font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon
|
||||
#image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml text/html;
|
||||
# Brotli compression (provided by GetPageSpeed nginx-module-brotli package)
|
||||
brotli on;
|
||||
brotli_comp_level 6;
|
||||
brotli_static on;
|
||||
brotli_types application/atom+xml application/javascript application/json application/rss+xml
|
||||
application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype
|
||||
application/x-font-ttf application/x-javascript application/xhtml+xml application/xml
|
||||
font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon
|
||||
image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml text/html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
|
||||
@@ -12,6 +12,21 @@ chmod -R ugo+rw /.composer
|
||||
addgroup supervisor > /dev/null 2>&1
|
||||
usermod -a -G supervisor sail > /dev/null 2>&1
|
||||
|
||||
# Run PHP-FPM as `sail` so its uid/gid match files written via the bind mount
|
||||
# (host user = sail's primary group). Avoids "chmod(): Operation not permitted"
|
||||
# on storage/logs when files were created by the host user or other processes.
|
||||
# The FPM unix socket stays owned by www-data so nginx (running as www-data)
|
||||
# can connect to it.
|
||||
SAIL_GROUP="$(id -gn sail)"
|
||||
cat > /etc/php/8.5/fpm/pool.d/zz-sail.conf <<EOF
|
||||
[www]
|
||||
user = sail
|
||||
group = ${SAIL_GROUP}
|
||||
listen.owner = www-data
|
||||
listen.group = www-data
|
||||
listen.mode = 0660
|
||||
EOF
|
||||
|
||||
# Set timezone
|
||||
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
|
||||
Reference in New Issue
Block a user