mirror of
https://github.com/Tha14/uam-docker.git
synced 2025-06-26 20:56:47 +02:00
fix: swarm net privileges, make wondershaper toggleable
This commit is contained in:
@ -17,11 +17,12 @@ services:
|
||||
volumes:
|
||||
- "./entrypoint.sh:/opt/entrypoint.sh"
|
||||
- "/opt/uam_data:/root/.uam"
|
||||
command: /bin/sh -c "chmod +x /opt/entrypoint.sh && /opt/entrypoint.sh $${PBKEY} $${NETLIMUP} $${NETLIMDOWN}"
|
||||
command: /bin/sh -c "chmod +x /opt/entrypoint.sh && /opt/entrypoint.sh $${PBKEY} $${NETLIMUP} $${NETLIMDOWN} $${ENABLE_WONDERSHAPER}"
|
||||
ports:
|
||||
- "127.0.0.1:17099:17099"
|
||||
- "4156:4156"
|
||||
environment:
|
||||
- PBKEY=${PBKEY?err}
|
||||
- ENABLE_WONDERSHAPER=true
|
||||
- NETLIMUP=10000
|
||||
- NETLIMDOWN=18000
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
cd /tmp
|
||||
apt update && apt -yq install wget libglib2.0-0 ca-certificates dnsmasq wondershaper
|
||||
update-ca-certificates
|
||||
@ -8,5 +8,7 @@ cd /opt/uam/
|
||||
echo "[net]" >> /root/.uam/uam.ini
|
||||
container_ip="$(hostname -i)"
|
||||
echo "listens=[${container_ip}]:4156" >> /root/.uam/uam.ini
|
||||
wondershaper eth0 $2 $3 &
|
||||
if [[ "$4" == "true" ]]; then
|
||||
wondershaper eth0 $2 $3 &
|
||||
fi
|
||||
./uam --pk $1 --http [0.0.0.0]:17099 --no-ui
|
||||
|
Reference in New Issue
Block a user