This commit is contained in:
Roman Kelesidis 2025-08-21 15:24:38 +03:00
commit f8c5c2f43a
No known key found for this signature in database
GPG key ID: D8157C4D4C4C6DB4
4 changed files with 50 additions and 2 deletions

View file

@ -30,7 +30,7 @@ RUN echo "*/10 * * * * php /app/cron.php >> /proc/1/fd/1 2>&1" > /etc/cron.d/app
&& crontab /etc/cron.d/app-cron
COPY install/Caddyfile /etc/caddy/Caddyfile
COPY install/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY install/docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
EXPOSE 80
# EXPOSE 80 443

View file

@ -1,5 +1,4 @@
# Example Caddy configuration for TorrentPier
# Used by default for Docker
{$TP_HOST} { # Set your host manually if you are not using Docker
root * /app # Set your web root manually if you are not using Docker

49
install/docker/Caddyfile Normal file
View file

@ -0,0 +1,49 @@
# Caddy configuration for TorrentPier (Docker)
{
auto_https {$SSL_ENABLED:off}
admin off
}
{$TP_HOST}{$TP_PORT:80} {
root * /app
encode gzip zstd
php {
root /app
}
try_files {path} {path}/ /index.php?{query}
file_server
@blocked {
path /install/* /internal_data/* /library/* /config/*
path /.ht* /.en* /.git* /.docker*
path *.sql *.tpl *.db *.inc *.log *.md
path /docker-compose.yml /Dockerfile /.env*
}
respond @blocked 404
redir /sitemap.xml /sitemap/sitemap.xml 301
@static {
path *.html *.css *.js *.json *.xml *.txt *.ico
path *.png *.jpg *.jpeg *.gif *.svg *.webp
path *.woff *.woff2 *.ttf *.eot
}
header @static {
Content-Type "{mime}; charset=utf-8"
Cache-Control "public, max-age=31536000"
}
header {
X-Frame-Options "SAMEORIGIN"
X-Content-Type-Options "nosniff"
Referrer-Policy "strict-origin-when-cross-origin"
}
}
# HTTPS redirect (only if SSL is enabled)
# http://{$TP_HOST} {
# redir https://{$TP_HOST}{uri} permanent
# }