340 lines
7.6 KiB
YAML
340 lines
7.6 KiB
YAML
version: "3.0"
|
|
|
|
#
|
|
# updated: 2023-10-13
|
|
# stack: hyperpiped
|
|
#
|
|
|
|
networks:
|
|
hyperpipe:
|
|
name: hyperpipe
|
|
driver: bridge
|
|
enable_ipv6: true
|
|
traefik:
|
|
external: true
|
|
|
|
services:
|
|
|
|
piped-db:
|
|
extends:
|
|
file: ./_vm/common.yml
|
|
service: x-common
|
|
user: 0:0
|
|
cap_add:
|
|
- DAC_OVERRIDE
|
|
- CHOWN
|
|
- FOWNER
|
|
- FSETID
|
|
- SETGID
|
|
- SETUID
|
|
- NET_BIND_SERVICE
|
|
- MKNOD
|
|
container_name: piped-db
|
|
hostname: piped-db
|
|
image: postgres:16
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${VM_PORT_PIPED_DB}:5432"
|
|
expose:
|
|
- "5432"
|
|
networks:
|
|
- hyperpipe
|
|
- traefik
|
|
healthcheck:
|
|
test: ["CMD", "pg_isready", "-q", "-d", "piped", "-U", "root"]
|
|
environment:
|
|
POSTGRES_DB: piped
|
|
POSTGRES_USER: root
|
|
POSTGRES_PASSWORD: xxx
|
|
labels:
|
|
com.stack.name: "piped"
|
|
com.stack.service.name: "db"
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "8.0"
|
|
memory: 4G
|
|
tmpfs:
|
|
- /tmp:rw,exec,size=1G
|
|
volumes:
|
|
- ./datas/db:/var/lib/postgresql/data:rw
|
|
sysctls:
|
|
net.core.somaxconn: 8192
|
|
net.ipv4.tcp_syncookies: 0
|
|
|
|
piped-proxy:
|
|
extends:
|
|
file: ./_vm/host.yml
|
|
service: x-host
|
|
read_only: true
|
|
container_name: piped-proxy
|
|
hostname: piped-proxy
|
|
image: 1337kavin/piped-proxy:latest
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${VM_PORT_PIPED_PROXY}:80"
|
|
expose:
|
|
- "80"
|
|
networks:
|
|
- hyperpipe
|
|
- traefik
|
|
healthcheck:
|
|
test: uname -a || exit 1
|
|
environment:
|
|
UDS: 1
|
|
labels:
|
|
com.stack.name: "piped"
|
|
com.stack.service.name: "proxy"
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "8.0"
|
|
memory: 4G
|
|
pids: 8192
|
|
tmpfs:
|
|
- /tmp:rw,exec,size=1G
|
|
volumes:
|
|
- ./datas/piped/proxy:/app/socket:rw
|
|
sysctls:
|
|
net.core.somaxconn: 8192
|
|
net.ipv4.tcp_syncookies: 0
|
|
|
|
piped-back:
|
|
extends:
|
|
file: ./_vm/host.yml
|
|
service: x-host
|
|
user: 0:0
|
|
cap_add:
|
|
- DAC_OVERRIDE
|
|
- CHOWN
|
|
- FOWNER
|
|
- FSETID
|
|
- SETGID
|
|
- SETUID
|
|
- NET_BIND_SERVICE
|
|
- MKNOD
|
|
container_name: piped-back
|
|
hostname: piped-back
|
|
image: 1337kavin/piped:latest
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${VM_PORT_PIPED_BACK}:8080"
|
|
expose:
|
|
- "8080"
|
|
networks:
|
|
- hyperpipe
|
|
- traefik
|
|
depends_on:
|
|
piped-db:
|
|
condition: service_healthy
|
|
piped-proxy:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: curl --fail http://localhost:8080/ || exit 1
|
|
environment:
|
|
DSN: ""
|
|
labels:
|
|
com.stack.name: "piped"
|
|
com.stack.service.name: "back"
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "8.0"
|
|
memory: 4G
|
|
pids: 8192
|
|
tmpfs:
|
|
- /tmp:rw,exec,size=1G
|
|
volumes:
|
|
- ./conf/piped/backend.conf:/app/config.properties:ro
|
|
sysctls:
|
|
net.core.somaxconn: 8192
|
|
net.ipv4.tcp_syncookies: 0
|
|
|
|
piped-front:
|
|
extends:
|
|
file: ./_vm/host.yml
|
|
service: x-host
|
|
user: 0:0
|
|
cap_add:
|
|
- DAC_OVERRIDE
|
|
- CHOWN
|
|
- FOWNER
|
|
- FSETID
|
|
- SETGID
|
|
- SETUID
|
|
- NET_BIND_SERVICE
|
|
- MKNOD
|
|
container_name: piped-front
|
|
hostname: piped-front
|
|
image: 1337kavin/piped-frontend:latest
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${VM_PORT_PIPED_FRONT}:80"
|
|
expose:
|
|
- "80"
|
|
networks:
|
|
- hyperpipe
|
|
- traefik
|
|
depends_on:
|
|
piped-back:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: wget --no-verbose --tries=1 --spider http://localhost:80
|
|
entrypoint: ash -c 'sed -i s/pipedapi.kavin.rocks/pipedapi.domain.com/g /usr/share/nginx/html/assets/* && /docker-entrypoint.sh && nginx -g "daemon off;"'
|
|
labels:
|
|
com.stack.name: "piped"
|
|
com.stack.service.name: "front"
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "8.0"
|
|
memory: 4G
|
|
pids: 8192
|
|
tmpfs:
|
|
- /tmp:rw,exec,size=1G
|
|
sysctls:
|
|
net.core.somaxconn: 8192
|
|
net.ipv4.tcp_syncookies: 0
|
|
|
|
hyperpipe-nginx:
|
|
extends:
|
|
file: ./_vm/host.yml
|
|
service: x-host
|
|
user: 0:0
|
|
cap_add:
|
|
- CHOWN
|
|
- DAC_OVERRIDE
|
|
- FOWNER
|
|
- FSETID
|
|
- SETGID
|
|
- SETUID
|
|
- NET_BIND_SERVICE
|
|
- MKNOD
|
|
- SETPCAP
|
|
- SYS_ADMIN
|
|
container_name: hyperpipe-nginx
|
|
hostname: hyperpipe-nginx
|
|
image: registry.domain.com/zogg/nginx:latest
|
|
restart: unless-stopped
|
|
depends_on:
|
|
piped-db:
|
|
condition: service_healthy
|
|
piped-back:
|
|
condition: service_healthy
|
|
piped-front:
|
|
condition: service_healthy
|
|
piped-proxy:
|
|
condition: service_healthy
|
|
ports:
|
|
- "${VM_PORT_HYPERPIPE_NGINX}:80"
|
|
expose:
|
|
- "80"
|
|
networks:
|
|
- hyperpipe
|
|
- traefik
|
|
healthcheck:
|
|
test: curl --fail http://localhost:80/ || exit 1
|
|
start_period: 120s
|
|
labels:
|
|
com.stack.name: "hyperpipe"
|
|
com.stack.service.name: "nginx"
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "8.0"
|
|
memory: 4G
|
|
pids: 8192
|
|
tmpfs:
|
|
- /tmp:rw,exec,size=1G
|
|
volumes:
|
|
- ./conf/hyperpipe/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
- ./conf/piped/api.conf:/etc/nginx/conf.d/pipedapi.conf:ro
|
|
- ./conf/piped/proxy.conf:/etc/nginx/conf.d/pipedproxy.conf:ro
|
|
- ./conf/piped/frontend.conf:/etc/nginx/conf.d/pipedfrontend.conf:ro
|
|
- ./conf/hyperpipe/youtube.conf:/etc/nginx/snippets/ytproxy.conf:ro
|
|
- ./datas/piped/proxy:/var/run/ytproxy:rw
|
|
sysctls:
|
|
net.core.somaxconn: 8192
|
|
net.ipv4.tcp_syncookies: 0
|
|
|
|
hyperpipe-back:
|
|
extends:
|
|
file: ./_vm/host.yml
|
|
service: x-host
|
|
container_name: hyperpipe-back
|
|
hostname: hyperpipe-back
|
|
image: codeberg.org/hyperpipe/hyperpipe-backend:latest
|
|
restart: unless-stopped
|
|
depends_on:
|
|
hyperpipe-nginx:
|
|
condition: service_healthy
|
|
ports:
|
|
- "${VM_PORT_HYPERPIPE_BACK}:3000"
|
|
expose:
|
|
- "3000"
|
|
networks:
|
|
- hyperpipe
|
|
- traefik
|
|
environment:
|
|
HYP_PROXY: "ytproxy.domain.com"
|
|
labels:
|
|
com.stack.name: "hyperpipe"
|
|
com.stack.service.name: "back"
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "8.0"
|
|
memory: 4G
|
|
pids: 8192
|
|
tmpfs:
|
|
- /tmp:rw,exec,size=1G
|
|
sysctls:
|
|
net.core.somaxconn: 8192
|
|
net.ipv4.tcp_syncookies: 0
|
|
|
|
hyperpipe-front:
|
|
extends:
|
|
file: ./_vm/host.yml
|
|
service: x-host
|
|
user: 0:0
|
|
cap_add:
|
|
- DAC_OVERRIDE
|
|
- CHOWN
|
|
- FOWNER
|
|
- FSETID
|
|
- SETGID
|
|
- SETUID
|
|
- NET_BIND_SERVICE
|
|
- MKNOD
|
|
container_name: hyperpipe-front
|
|
hostname: hyperpipe-front
|
|
image: codeberg.org/hyperpipe/hyperpipe:latest
|
|
restart: unless-stopped
|
|
depends_on:
|
|
hyperpipe-back:
|
|
condition: service_started
|
|
ports:
|
|
- "${VM_PORT_HYPERPIPE_FRONT}:80"
|
|
expose:
|
|
- "80"
|
|
networks:
|
|
- hyperpipe
|
|
- traefik
|
|
healthcheck:
|
|
test: wget --no-verbose --tries=1 --spider http://localhost
|
|
entrypoint: sh -c 'find /usr/share/nginx/html -type f -exec sed -i s/pipedapi.kavin.rocks/pipedapi.domain.com/g {} \; -exec sed -i s/hyperpipeapi.onrender.com/hyperpipeapi.domain.com/g {} \; && /docker-entrypoint.sh && nginx -g "daemon off;"'
|
|
labels:
|
|
com.stack.name: "hyperpipe"
|
|
com.stack.service.name: "front"
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "8.0"
|
|
memory: 4G
|
|
pids: 8192
|
|
tmpfs:
|
|
- /tmp:rw,exec,size=1G
|
|
sysctls:
|
|
net.core.somaxconn: 8192
|
|
net.ipv4.tcp_syncookies: 0
|