compose: rewrite master and worker compose files
Drop deprecated version key, add SELinux volume labels, SIGTERM handling with 30s grace period, configurable master URL via PPF_MASTER_URL env var, and usage documentation in headers.
This commit was merged in pull request #1.
This commit is contained in:
@@ -1,4 +1,17 @@
|
|||||||
version: "3"
|
# PPF master node (odin)
|
||||||
|
#
|
||||||
|
# Scrapes proxy sources, runs verification, serves API/dashboard.
|
||||||
|
# No routine proxy testing -- workers handle that.
|
||||||
|
#
|
||||||
|
# Prerequisites:
|
||||||
|
# - config.ini (not tracked, host-specific)
|
||||||
|
# - data/ (created automatically)
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# podman-compose -f compose.master.yml up -d
|
||||||
|
# podman-compose -f compose.master.yml logs -f
|
||||||
|
# podman-compose -f compose.master.yml down
|
||||||
|
|
||||||
services:
|
services:
|
||||||
ppf:
|
ppf:
|
||||||
container_name: ppf
|
container_name: ppf
|
||||||
@@ -6,10 +19,12 @@ services:
|
|||||||
build: .
|
build: .
|
||||||
network_mode: host
|
network_mode: host
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
stop_signal: SIGTERM
|
||||||
|
stop_grace_period: 30s
|
||||||
environment:
|
environment:
|
||||||
PYTHONUNBUFFERED: "1"
|
PYTHONUNBUFFERED: "1"
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app:ro
|
- .:/app:ro,Z
|
||||||
- ./data:/app/data
|
- ./data:/app/data:Z
|
||||||
- ./config.ini:/app/config.ini:ro
|
- ./config.ini:/app/config.ini:ro,Z
|
||||||
command: python2 -u ppf.py
|
command: python -u ppf.py
|
||||||
|
|||||||
@@ -1,4 +1,22 @@
|
|||||||
version: "3"
|
# PPF worker node (cassius, edge, sentinel, ...)
|
||||||
|
#
|
||||||
|
# Tests proxies and reports results to master via WireGuard.
|
||||||
|
# Each worker uses only local Tor (127.0.0.1:9050).
|
||||||
|
#
|
||||||
|
# Prerequisites:
|
||||||
|
# - config.ini (not tracked, host-specific)
|
||||||
|
# - servers.txt (deploy from repo)
|
||||||
|
# - src/ (deploy *.py from repo root into src/)
|
||||||
|
# - data/ (created automatically)
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# PPF_MASTER_URL=http://10.200.1.250:8081 podman-compose -f compose.worker.yml up -d
|
||||||
|
# podman-compose -f compose.worker.yml logs -f
|
||||||
|
# podman-compose -f compose.worker.yml down
|
||||||
|
#
|
||||||
|
# The master URL defaults to http://10.200.1.250:8081 (odin via WireGuard).
|
||||||
|
# Override with PPF_MASTER_URL env var or edit .env file.
|
||||||
|
|
||||||
services:
|
services:
|
||||||
ppf-worker:
|
ppf-worker:
|
||||||
container_name: ppf-worker
|
container_name: ppf-worker
|
||||||
@@ -6,13 +24,15 @@ services:
|
|||||||
build: .
|
build: .
|
||||||
network_mode: host
|
network_mode: host
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
stop_signal: SIGTERM
|
||||||
|
stop_grace_period: 30s
|
||||||
logging:
|
logging:
|
||||||
driver: k8s-file
|
driver: k8s-file
|
||||||
environment:
|
environment:
|
||||||
PYTHONUNBUFFERED: "1"
|
PYTHONUNBUFFERED: "1"
|
||||||
volumes:
|
volumes:
|
||||||
- ./src:/app:ro
|
- ./src:/app:ro,Z
|
||||||
- ./data:/app/data
|
- ./data:/app/data:Z
|
||||||
- ./config.ini:/app/config.ini:ro
|
- ./config.ini:/app/config.ini:ro,Z
|
||||||
- ./servers.txt:/app/servers.txt:ro
|
- ./servers.txt:/app/servers.txt:ro,Z
|
||||||
command: python -u ppf.py --worker-v2 --server http://10.200.1.250:8081
|
command: python -u ppf.py --worker-v2 --server ${PPF_MASTER_URL:-http://10.200.1.250:8081}
|
||||||
|
|||||||
Reference in New Issue
Block a user