mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
Updated
This commit is contained in:
parent
f7c65a24b0
commit
f8c5c2f43a
4 changed files with 50 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
49
install/docker/Caddyfile
Normal 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
|
||||
# }
|
Loading…
Add table
Add a link
Reference in a new issue