diff --git a/README.md b/README.md index 745ec60..1117c94 100644 --- a/README.md +++ b/README.md @@ -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``` diff --git a/uam-swarm/docker-compose.yml b/uam-swarm/docker-compose.yml index a772f8d..0d9497d 100644 --- a/uam-swarm/docker-compose.yml +++ b/uam-swarm/docker-compose.yml @@ -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 diff --git a/uam-swarm/entrypoint.sh b/uam-swarm/entrypoint.sh index 5d2aca3..343db73 100755 --- a/uam-swarm/entrypoint.sh +++ b/uam-swarm/entrypoint.sh @@ -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