feat(deploy): define isolated managed test target
Co-authored-by: GPT-6 <gpt-6@openai.com>
This commit is contained in:
1 parent
0b4b909a20
commit
c5cabf076f
9 files changed
+159
-10
No files matched your search
@@ -0,0 +1 @@
|
||||
ZAPRET_AUTOTUNE_HOST_SOCKS_PORT=11080
|
||||
@@ -0,0 +1,41 @@
|
||||
name: zapret-autotune-managed-test
|
||||
services:
|
||||
target:
|
||||
image: zapret-autotune-managed-target:local
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: Dockerfile.target
|
||||
privileged: false
|
||||
cap_drop: [ALL]
|
||||
# nft/NFQUEUE, nfqws2 raw sends, and --user=tpws UID/GID switching.
|
||||
# DAC_OVERRIDE lets root read the invoking user's 0600 read-only secret bind.
|
||||
# It is container-wide; expose only this secret and the fresh target-state bind.
|
||||
cap_add: [NET_ADMIN, NET_RAW, SETUID, SETGID, DAC_OVERRIDE]
|
||||
environment:
|
||||
SOCKS_PORT: "1080"
|
||||
ZAPRET_AUTOTUNE_TARGET_ROLE: managed-test
|
||||
ZAPRET_AUTOTUNE_TARGET_ID: zapret-autotune-managed-v1
|
||||
ZAPRET_AUTOTUNE_TARGET_DIR: /var/lib/zapret-autotune/target
|
||||
ZAPRET_CONFIG: /var/lib/zapret-autotune/target/config
|
||||
ZAPRET_AUTOTUNE_SOCKS_PROXY: socks5://127.0.0.1:1080
|
||||
ZAPRET_AUTOTUNE_DB: /var/lib/zapret-autotune/target/candidates.db
|
||||
ports:
|
||||
- "127.0.0.1:${ZAPRET_AUTOTUNE_HOST_SOCKS_PORT:-11080}:1080/tcp"
|
||||
- "127.0.0.1:${ZAPRET_AUTOTUNE_HOST_SOCKS_PORT:-11080}:1080/udp"
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./target-state
|
||||
target: /var/lib/zapret-autotune/target
|
||||
bind:
|
||||
create_host_path: false
|
||||
secrets: [ss_password]
|
||||
tmpfs:
|
||||
- /run/zapret-autotune-ss:rw,noexec,nosuid,nodev,size=1m,mode=0700,uid=0,gid=0
|
||||
networks: [target]
|
||||
stop_grace_period: 45s
|
||||
networks:
|
||||
target:
|
||||
driver: bridge
|
||||
secrets:
|
||||
ss_password:
|
||||
file: ./ss_password
|
||||
Reference in new issue
Block a user