mirror of
https://github.com/TeamPiped/Piped-Docker.git
synced 2024-08-14 23:56:53 +00:00
Merge branch 'main' into fix_merge_conflict
This commit is contained in:
commit
88893f2325
9 changed files with 42 additions and 81 deletions
|
@ -1,18 +1,4 @@
|
||||||
# Check if Docker-Compose is not installed
|
#!/usr/bin/env bash
|
||||||
if [ -z "$(which docker-compose)" ]; then
|
|
||||||
echo "Docker-Compose is not installed. Please install it first from https://docs.docker.com/compose/install/#install-compose."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Docker-Compose version check, to prevent "Unsupported configuration option"
|
|
||||||
COMPOSE_VERSION=$(docker-compose version --short)
|
|
||||||
REQUIRED_COMPOSE_VERSION="1.28.0"
|
|
||||||
if [[ $(printf '%s\n' "$REQUIRED_COMPOSE_VERSION" "$COMPOSE_VERSION" | sort -V | head -n1) != $REQUIRED_COMPOSE_VERSION ]]; then
|
|
||||||
echo "Your docker-compose version of $COMPOSE_VERSION is too old. Please upgrade to $REQUIRED_COMPOSE_VERSION or higher."
|
|
||||||
echo "See https://docs.docker.com/compose/install/#install-compose for installation instructions."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Enter a hostname for the Frontend (eg: piped.kavin.rocks):" && read -r frontend
|
echo "Enter a hostname for the Frontend (eg: piped.kavin.rocks):" && read -r frontend
|
||||||
echo "Enter a hostname for the Backend (eg: pipedapi.kavin.rocks):" && read -r backend
|
echo "Enter a hostname for the Backend (eg: pipedapi.kavin.rocks):" && read -r backend
|
||||||
echo "Enter a hostname for the Proxy (eg: pipedproxy.kavin.rocks):" && read -r proxy
|
echo "Enter a hostname for the Proxy (eg: pipedproxy.kavin.rocks):" && read -r proxy
|
||||||
|
|
|
@ -1,61 +1,32 @@
|
||||||
{
|
(global) {
|
||||||
servers :443 {
|
header {
|
||||||
protocol {
|
# disable FLoC tracking
|
||||||
experimental_http3
|
Permissions-Policy interest-cohort=()
|
||||||
}
|
|
||||||
|
# enable HSTS
|
||||||
|
Strict-Transport-Security max-age=31536000;
|
||||||
|
|
||||||
|
# keep referrer data off
|
||||||
|
Referrer-Policy no-referrer
|
||||||
|
|
||||||
|
# prevent for appearing in search engine for private instances (option)
|
||||||
|
#X-Robots-Tag noindex
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FRONTEND_HOSTNAME {
|
FRONTEND_HOSTNAME {
|
||||||
reverse_proxy pipedfrontend:80
|
reverse_proxy pipedfrontend:80
|
||||||
header {
|
import global
|
||||||
# disable FLoC tracking
|
|
||||||
Permissions-Policy interest-cohort=()
|
|
||||||
|
|
||||||
# enable HSTS
|
|
||||||
Strict-Transport-Security max-age=31536000;
|
|
||||||
|
|
||||||
# keep referrer data off
|
|
||||||
Referrer-Policy no-referrer
|
|
||||||
|
|
||||||
# prevent for appearing in search engine for private instances (option)
|
|
||||||
#X-Robots-Tag noindex
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BACKEND_HOSTNAME {
|
BACKEND_HOSTNAME {
|
||||||
reverse_proxy varnish:80
|
reverse_proxy varnish:80
|
||||||
header {
|
import global
|
||||||
# disable FLoC tracking
|
|
||||||
Permissions-Policy interest-cohort=()
|
|
||||||
|
|
||||||
# enable HSTS
|
|
||||||
Strict-Transport-Security max-age=31536000;
|
|
||||||
|
|
||||||
# keep referrer data off
|
|
||||||
Referrer-Policy no-referrer
|
|
||||||
|
|
||||||
# prevent for appearing in search engine for private instances (option)
|
|
||||||
#X-Robots-Tag noindex
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PROXY_HOSTNAME {
|
PROXY_HOSTNAME {
|
||||||
@ytproxy path /videoplayback* /api/v4/* /api/manifest/*
|
@ytproxy path /videoplayback* /api/v4/* /api/manifest/*
|
||||||
|
import global
|
||||||
header {
|
|
||||||
# disable FLoC tracking
|
|
||||||
Permissions-Policy interest-cohort=()
|
|
||||||
|
|
||||||
# enable HSTS
|
|
||||||
Strict-Transport-Security max-age=31536000;
|
|
||||||
|
|
||||||
# keep referrer data off
|
|
||||||
Referrer-Policy no-referrer
|
|
||||||
|
|
||||||
# prevent for appearing in search engine for private instances (option)
|
|
||||||
#X-Robots-Tag noindex
|
|
||||||
}
|
|
||||||
|
|
||||||
route {
|
route {
|
||||||
header @ytproxy {
|
header @ytproxy {
|
||||||
|
|
|
@ -20,9 +20,18 @@ API_URL: https://BACKEND_HOSTNAME
|
||||||
# Public Frontend URL
|
# Public Frontend URL
|
||||||
FRONTEND_URL: https://FRONTEND_HOSTNAME
|
FRONTEND_URL: https://FRONTEND_HOSTNAME
|
||||||
|
|
||||||
|
# Enable haveibeenpwned compromised password API
|
||||||
|
COMPROMISED_PASSWORD_CHECK: true
|
||||||
|
|
||||||
|
# Disable Registration
|
||||||
|
DISABLE_REGISTRATION: false
|
||||||
|
|
||||||
|
# Feed Retention Time in Days
|
||||||
|
FEED_RETENTION: 30
|
||||||
|
|
||||||
# Hibernate properties
|
# Hibernate properties
|
||||||
hibernate.connection.url: jdbc:postgresql://postgres:5432/piped
|
hibernate.connection.url: jdbc:postgresql://postgres:5432/piped
|
||||||
hibernate.connection.driver_class: org.postgresql.Driver
|
hibernate.connection.driver_class: org.postgresql.Driver
|
||||||
hibernate.dialect: org.hibernate.dialect.PostgreSQL10Dialect
|
hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect
|
||||||
hibernate.connection.username: piped
|
hibernate.connection.username: piped
|
||||||
hibernate.connection.password: changeme
|
hibernate.connection.password: changeme
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
vcl 4.0;
|
vcl 4.0;
|
||||||
|
|
||||||
backend default {
|
backend default {
|
||||||
.host = "piped:8080";
|
.host = "piped-backend:8080";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
version: "3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
pipedfrontend:
|
pipedfrontend:
|
||||||
image: 1337kavin/piped-frontend:latest
|
image: 1337kavin/piped-frontend:latest
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
version: "3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
pipedfrontend:
|
pipedfrontend:
|
||||||
image: 1337kavin/piped-frontend:latest
|
image: 1337kavin/piped-frontend:latest
|
||||||
|
@ -26,21 +28,6 @@ services:
|
||||||
container_name: piped-backend
|
container_name: piped-backend
|
||||||
labels:
|
labels:
|
||||||
com.centurylinklabs.watchtower.scope: piped
|
com.centurylinklabs.watchtower.scope: piped
|
||||||
varnish:
|
|
||||||
image: varnish:7.0-alpine
|
|
||||||
restart: unless-stopped
|
|
||||||
volumes:
|
|
||||||
- ./config/default.vcl:/etc/varnish/default.vcl:ro
|
|
||||||
container_name: varnish
|
|
||||||
depends_on:
|
|
||||||
- piped
|
|
||||||
healthcheck:
|
|
||||||
test: ash -c "wget --no-verbose --tries=1 --spider 127.0.0.1:80/feed || (varnishreload && exit 1)"
|
|
||||||
interval: 10s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 1
|
|
||||||
labels:
|
|
||||||
com.centurylinklabs.watchtower.scope: piped
|
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx:mainline-alpine
|
image: nginx:mainline-alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
@ -56,7 +43,6 @@ services:
|
||||||
container_name: nginx
|
container_name: nginx
|
||||||
depends_on:
|
depends_on:
|
||||||
- piped
|
- piped
|
||||||
- varnish
|
|
||||||
- ytproxy
|
- ytproxy
|
||||||
- pipedfrontend
|
- pipedfrontend
|
||||||
labels:
|
labels:
|
||||||
|
|
|
@ -25,7 +25,7 @@ http {
|
||||||
|
|
||||||
keepalive_timeout 65;
|
keepalive_timeout 65;
|
||||||
|
|
||||||
gzip on;
|
resolver 127.0.0.11 ipv6=off valid=10s;
|
||||||
|
|
||||||
include /etc/nginx/conf.d/*.conf;
|
include /etc/nginx/conf.d/*.conf;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
|
proxy_cache_path /tmp/pipedapi_cache levels=1:2 keys_zone=pipedapi:4m max_size=2g inactive=60m use_temp_path=off;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name BACKEND_HOSTNAME;
|
server_name BACKEND_HOSTNAME;
|
||||||
|
|
||||||
|
set $backend "http://piped:8080";
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://varnish:80;
|
proxy_cache pipedapi;
|
||||||
|
proxy_pass $backend;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Connection "keep-alive";
|
proxy_set_header Connection "keep-alive";
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,10 @@ server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name FRONTEND_HOSTNAME;
|
server_name FRONTEND_HOSTNAME;
|
||||||
|
|
||||||
|
set $backend "http://pipedfrontend:80";
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://pipedfrontend:80;
|
proxy_pass $backend;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Connection "keep-alive";
|
proxy_set_header Connection "keep-alive";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue