mirror of
https://github.com/Tha14/uam-docker.git
synced 2024-11-24 19:43:03 +01:00
Fix listening ports. Add swarm mode and update instructions on README.md
This commit is contained in:
parent
6f38a09dc0
commit
9a7cc49cee
14
README.md
14
README.md
@ -1,6 +1,7 @@
|
||||
# Run UAM in a Docker container
|
||||
|
||||
## How to use
|
||||
### Single UAM instance
|
||||
1. Make sure you have docker and docker-compose installed on your host.
|
||||
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.
|
||||
@ -8,6 +9,15 @@
|
||||
|
||||
```docker-compose up -d```
|
||||
|
||||
### UAM Swarm
|
||||
1. Make sure you have docker and docker-compose installed on your host.
|
||||
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. 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. Execute the following command in terminal while being in the `uam-swarm` directory of this repository:
|
||||
|
||||
```docker-compose up -d```
|
||||
|
||||
## Information
|
||||
This container will download the latest version of uam every time it is started.
|
||||
The http service is enabled for 127.0.0.1:17099.
|
||||
This container will download the latest version of uam every time it is started and will install apt packages so keep that in mind.
|
||||
The http service for uam is enabled and listening on http://127.0.0.1:17099 for the single instance. For the UAM swarm you need to define the listening port for each instance.
|
||||
|
59
uam-swarm/docker-compose.yml
Normal file
59
uam-swarm/docker-compose.yml
Normal 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
11
uam-swarm/entrypoint.sh
Executable 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
|
@ -5,4 +5,7 @@ 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}]:4156" >> /root/.uam/uam.ini
|
||||
./uam --pk $1 --http [0.0.0.0]:17099 --no-ui
|
||||
|
Loading…
Reference in New Issue
Block a user