Fix listening ports. Add swarm mode and update instructions on README.md

This commit is contained in:
2022-12-13 20:28:55 +02:00
parent 6f38a09dc0
commit 9a7cc49cee
4 changed files with 85 additions and 2 deletions

View File

@ -0,0 +1,59 @@
version: '3.3'
services:
uam_1:
image: debian:bullseye-slim
container_name: uam_1
hostname: uam_1
restart: unless-stopped
stop_grace_period: 5s
ulimits:
rtprio: 95
memlock: -1
volumes:
- "./entrypoint.sh:/opt/entrypoint.sh"
- "/opt/uam_data/uam_1:/root/.uam"
command: /bin/sh -c "chmod +x /opt/entrypoint.sh && /opt/entrypoint.sh $${PBKEY}"
ports:
- "127.0.0.1:17100:17099"
- "4160:4160"
environment:
- PBKEY=
uam_2:
image: debian:bullseye-slim
container_name: uam_2
hostname: uam_2
restart: unless-stopped
stop_grace_period: 5s
ulimits:
rtprio: 95
memlock: -1
volumes:
- "./entrypoint.sh:/opt/entrypoint.sh"
- "/opt/uam_data/uam_2:/root/.uam"
command: /bin/sh -c "chmod +x /opt/entrypoint.sh && /opt/entrypoint.sh $${PBKEY}"
ports:
- "127.0.0.1:17101:17099"
- "4161:4160"
environment:
- PBKEY=
uam_3:
image: debian:bullseye-slim
container_name: uam_3
hostname: uam_3
restart: unless-stopped
stop_grace_period: 5s
ulimits:
rtprio: 95
memlock: -1
volumes:
- "./entrypoint.sh:/opt/entrypoint.sh"
- "/opt/uam_data/uam_3:/root/.uam"
command: /bin/sh -c "chmod +x /opt/entrypoint.sh && /opt/entrypoint.sh $${PBKEY}"
ports:
- "127.0.0.1:17102:17099"
- "4162:4160"
environment:
- PBKEY=

11
uam-swarm/entrypoint.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
cd /tmp
apt update && apt -yq install wget libglib2.0-0 ca-certificates dnsmasq
update-ca-certificates
wget https://update.u.is/downloads/uam/linux/uam-latest_amd64.deb
dpkg -i uam-latest_amd64.deb
cd /opt/uam/
echo "[net]" >> /root/.uam/uam.ini
container_ip="$(hostname -i)"
echo "listens=[${container_ip}]:4160" >> /root/.uam/uam.ini
./uam --pk $1 --http [0.0.0.0]:17099 --no-ui