Fix port issues for swarm. Update README.

This commit is contained in:
Tha14 2022-12-20 16:39:37 +02:00
parent dc3d2109d4
commit 38a1242443
No known key found for this signature in database
GPG Key ID: C2B875C3A9D53CFC
3 changed files with 10 additions and 7 deletions

View File

@ -15,7 +15,7 @@
2. Clone this repository.
3. Add your Public Key by editing the docker-compose.yml file. Add it to the variable named `PBKEY` without spaces for each service.
4. If you're on windows or macos, make sure you change the volume path `/opt/uam_data/uam_` to something that works on your OS.
5. Optionally, add or remove services according to your needs. You can copy and paste the existing services and modify the names, paths, and ports for each.
5. Optionally, add or remove services according to your needs. You can copy and paste the existing services and modify the names, paths, and ports for each of them.
6. Execute the following command in terminal while being in the `uam-swarm` directory of this repository:
```docker-compose up -d```

View File

@ -13,12 +13,13 @@ services:
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}"
command: /bin/sh -c "chmod +x /opt/entrypoint.sh && /opt/entrypoint.sh $${PBKEY} $${PPORT}"
ports:
- "127.0.0.1:17100:17099"
- "4160:4160"
environment:
- PBKEY=
- PPORT=4160
uam_2:
image: debian:bullseye-slim
@ -32,12 +33,13 @@ services:
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}"
command: /bin/sh -c "chmod +x /opt/entrypoint.sh && /opt/entrypoint.sh $${PBKEY} $${PPORT}"
ports:
- "127.0.0.1:17101:17099"
- "4161:4160"
- "4161:4161"
environment:
- PBKEY=
- PPORT=4161
uam_3:
image: debian:bullseye-slim
@ -51,9 +53,10 @@ services:
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}"
command: /bin/sh -c "chmod +x /opt/entrypoint.sh && /opt/entrypoint.sh $${PBKEY} $${PPORT}"
ports:
- "127.0.0.1:17102:17099"
- "4162:4160"
- "4162:4162"
environment:
- PBKEY=
- PPORT=4162

View File

@ -7,5 +7,5 @@ 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
echo "listens=[${container_ip}]:$2" >> /root/.uam/uam.ini
./uam --pk $1 --http [0.0.0.0]:17099 --no-ui