This commit is contained in:
2023-09-26 18:14:36 -06:00
commit fb5a0fc542
443 changed files with 21892 additions and 0 deletions

110
Piped/.drone.yml Normal file
View File

@@ -0,0 +1,110 @@
---
kind: pipeline
type: docker
name: deploy
environment:
PACKAGE: Piped
URL: piped.alexlebens.net
steps:
- name: Tests
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- /scripts/tests.sh
- name: Nofification > Discord | Tests - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose validation for Piped failed.
when:
status:
- failure
- name: Configuration
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/configuration.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
UPTIMEKUMA_NAME:
from_secret: uptimekuma_name
UPTIMEKUMA_PASSWORD:
from_secret: uptimekuma_password
UPTIMEKUMA_URL:
from_secret: uptimekuma_url
when:
branch:
- main
- name: Nofification > Discord | Configuration - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Configuration for Piped failed.
when:
status:
- failure
- name: Deploy
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/deploy.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
when:
branch:
- main
- name: Nofification > Discord | Deploy - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Piped succeeded
when:
status:
- sucess
- name: Nofification > Discord | Deploy - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Piped failed.
when:
status:
- failure

3
Piped/.pgs.env Normal file
View File

@@ -0,0 +1,3 @@
POSTGRES_DB=piped
POSTGRES_USER=piped
POSTGRES_PASSWORD=13qeadzc24wrsfxv

View File

@@ -0,0 +1,81 @@
# The port to Listen on.
PORT:8080
# The number of workers to use for the server
HTTP_WORKERS:2
# Proxy
PROXY_PART:https://piped.alexlebens.net
# Outgoing HTTP Proxy - eg: 127.0.0.1:8118
#HTTP_PROXY: 127.0.0.1:8118
# Captcha Parameters
CAPTCHA_BASE_URL:https://api.capmonster.cloud/
CAPTCHA_API_KEY:INSERT_HERE
# Public API URL
API_URL:https://piped.alexlebens.net
# Public Frontend URL
FRONTEND_URL:https://piped.alexlebens.net
# Enable haveibeenpwned compromised password API
COMPROMISED_PASSWORD_CHECK:true
# Disable Registration
DISABLE_REGISTRATION:false
# Feed Retention Time in Days
FEED_RETENTION:30
# Disable CPU expensive timers (for nodes with low CPU, at least one node should have this disabled)
DISABLE_TIMERS:false
# RYD Proxy URL (see https://github.com/TeamPiped/RYD-Proxy)
# RYD_PROXY_URL:https://ryd-proxy.kavin.rocks
# SponsorBlock Servers(s)
# Comma separated list of SponsorBlock Servers to use
SPONSORBLOCK_SERVERS:https://sponsor.ajay.app,https://sponsorblock.kavin.rocks
# Disable the usage of RYD
DISABLE_RYD:false
# Disable API server (node just runs timers if enabled)
DISABLE_SERVER:false
# Disable the inclusion of LBRY streams
DISABLE_LBRY:false
# How long should unauthenticated subscriptions last for
SUBSCRIPTIONS_EXPIRY:30
# Sentry DSN
# Use Sentry to log errors and trace performance
#SENTRY_DSN:INSERT_HERE
# Matrix Client Server URL
# MATRIX_SERVER:https://matrix-client.matrix.org
# Matrix Access Token
# If not present, will work in anon mode
#MATRIX_TOKEN:INSERT_HERE
# Geo Restriction Checker for federated bypassing of Geo Restrictions
#GEO_RESTRICTION_CHECKER_URL:INSERT_HERE
# S3 Configuration Data (compatible with any provider that offers an S3 compatible API)
#S3_ENDPOINT:INSERT_HERE
#S3_ACCESS_KEY:INSERT_HERE
#S3_SECRET_KEY:INSERT_HERE
#S3_BUCKET:INSERT_HERE
# Hibernate properties
hibernate.connection.url:jdbc:postgresql://piped_postgres:5432/piped
hibernate.connection.driver_class:org.postgresql.Driver
hibernate.dialect:org.hibernate.dialect.PostgreSQLDialect
hibernate.connection.username:piped
hibernate.connection.password:13qeadzc24wrsfxv
# Frontend configuration
#frontend.statusPageUrl:https://kavin.rocks
#frontend.donationUrl:https://kavin.rocks

3
Piped/README.md Normal file
View File

@@ -0,0 +1,3 @@
# Piped
[![Build Status](https://drone.alexlebens.net/api/badges/alexlebens/Piped/status.svg)](https://drone.alexlebens.net/alexlebens/Piped)

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Piped - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://piped.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "piped",
"docker_host": 1
}

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Piped Postgres - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://piped.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "piped_postgres",
"docker_host": 1
}

View File

@@ -0,0 +1,15 @@
{
"type": "http",
"name": "Piped - Web",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://piped.alexlebens.net",
"accepted_statuscodes": [
"200-299"
]
}

61
Piped/docker-compose.yml Normal file
View File

@@ -0,0 +1,61 @@
services:
postgres:
container_name: piped_postgres
env_file:
- .pgs.env
image: postgres:15-alpine
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik: null
restart: always
privileged: true
volumes:
- data:/var/lib/postgresql/data
piped:
container_name: piped
depends_on:
- postgres
image: 1337kavin/piped:latest
labels:
traefik.docker.network: traefik
traefik.enable: true
traefik.http.routers.piped.entrypoints: websecure
traefik.http.routers.piped.rule: Host(`piped.alexlebens.net`)
traefik.http.routers.piped.service: piped
traefik.http.services.piped.loadbalancer.server.port: 8080
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik: null
restart: always
privileged: true
volumes:
- /var/lib/docker/volumes/partition/piped_config/config.properties:/app/config.properties
networks:
traefik:
name: traefik
external: true
volumes:
data:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/piped_data
config:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/piped_config