merged
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-04-21 17:02:48 +02:00
parent 7da16def78
commit 4b2f5d8c9f
67 changed files with 7 additions and 176 deletions

41
_apps/rompr/Dockerfile Normal file
View File

@@ -0,0 +1,41 @@
FROM cr.wks/debian-stable-php-fpm
ARG ROMPR_VERSION=2.14
# Install packages
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get -y install \
nginx \
curl \
unzip
# CLeanup
RUN apt-get autoremove --purge -y && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/apt/* /tmp/* /var/tmp/* /var/log/*
RUN curl -k -L -o rompr.zip https://github.com/fatg3erman/RompR/releases/download/${ROMPR_VERSION}/rompr-${ROMPR_VERSION}.zip
RUN mkdir -p /app /rompr
RUN unzip -d /app rompr.zip && rm rompr.zip
RUN ln -sf /rompr/prefs /app/rompr/prefs; ln -sf /rompr/albumart /app/rompr/albumart;
RUN chown -R www-data:www-data /app/rompr /rompr
RUN pwd; ls -la .;ls -la /etc/php/*/fpm
ADD files/nginx_default /etc/nginx/sites-available/default
RUN mkdir -p /run/php/
#Environment variables to configure php
RUN sed -ri -e 's/^allow_url_fopen =.*/allow_url_fopen = On/g' /etc/php/8.2/fpm/php.ini && \
sed -ri -e 's/^memory_limit =.*/memory_limit = 128M/g' /etc/php/8.2/fpm/php.ini && \
sed -ri -e 's/^max_execution_time =.*/max_execution_time = 1800/g' /etc/php/8.2/fpm/php.ini && \
sed -ri -e 's/^post_max_size =.*/post_max_size = 256M/g' /etc/php/8.2/fpm/php.ini && \
sed -ri -e 's/^upload_max_filesize =.*/upload_max_filesize = 8M/g' /etc/php/8.2/fpm/php.ini && \
sed -ri -e 's/^max_file_uploads =.*/max_file_uploads = 50/g' /etc/php/8.2/fpm/php.ini && \
sed -ri -e 's/^display_errors =.*/display_errors = On/g' /etc/php/8.2/fpm/php.ini && \
sed -ri -e 's/^display_startup_errors =.*/display_startup_errors = On/g' /etc/php/8.2/fpm/php.ini
RUN echo "<?php phpinfo(); ?>" > /app/rompr/phpinfo.php
RUN update-rc.d php8.2-fpm defaults
ADD files/run-httpd /usr/local/bin/
RUN chmod 755 /usr/local/bin/run-httpd
EXPOSE 80
VOLUME ["/rompr"]
CMD ["/usr/local/bin/run-httpd"]

5
_apps/rompr/README.md Normal file
View File

@@ -0,0 +1,5 @@
Run with:
```podman run --pull=always -d --replace -p 127.0.0.1:8081:80 \
--mount=type=bind,source=/var/lib/rompr,destination=/rompr \
--tz=Europe/Berlin --name=rompr cr.wks/rompr:latest```

View File

@@ -0,0 +1,36 @@
# Default server configuration
#
server {
listen 80;
listen [::]:80;
root /app/rompr;
# Add index.php to the list if you are using PHP
index index.php index.html index.htm;
server_name _;
client_max_body_size 256M;
# This section can be copied into an existing default setup
location / {
allow all;
access_log off;
index index.php;
location ~ \.php {
try_files $uri index.php =404;
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include /etc/nginx/fastcgi_params;
fastcgi_read_timeout 1800;
}
error_page 404 = /rompr/404.php;
try_files $uri $uri/ =404;
location ~ /albumart/* {
expires -1s;
}
}
}

View File

@@ -0,0 +1,8 @@
#!/bin/sh
rm -f /var/run/nginx.pid
mkdir -p /var/log/nginx
set -e
mkdir -p /rompr/albumart /rompr/prefs
chown www-data:www-data -R /rompr/albumart /rompr/prefs
/etc/init.d/php8.2-fpm restart
exec /usr/sbin/nginx -g 'daemon off;'