Changes
Page history
Updated Installing using Docker (recommended!) (markdown)
authored
Jul 02, 2021
by
Simon
Hide whitespace changes
Inline
Side-by-side
Installing-using-Docker-(recommended!).md
View page @
900f09f7
...
@@ -8,7 +8,7 @@ docker containers.
...
@@ -8,7 +8,7 @@ docker containers.
For a one-shot install, paste this into the terminal of a running debian-like Linux system
For a one-shot install, paste this into the terminal of a running debian-like Linux system
`sudo curl https://raw.githubusercontent.com/hacknix/FreeDMR/master/docker-configs/docker_install.sh | bash`
`sudo curl https://raw.githubusercontent.com/hacknix/FreeDMR/master/docker-configs/docker
-compose
_install.sh | bash`
The rest of this page details the manual install process.
The rest of this page details the manual install process.
...
@@ -18,6 +18,8 @@ Firstly, you need a system running docker. For debian-based systems, this is sim
...
@@ -18,6 +18,8 @@ Firstly, you need a system running docker. For debian-based systems, this is sim
`apt-get install docker.io`
`apt-get install docker.io`
`apt-get install docker-compose`
`apt-get install conntrack`
`apt-get install conntrack`
A change needs to be made to the docker config for openbridge to work correctly:
A change needs to be made to the docker config for openbridge to work correctly:
...
@@ -27,10 +29,6 @@ A change needs to be made to the docker config for openbridge to work correctly:
...
@@ -27,10 +29,6 @@ A change needs to be made to the docker config for openbridge to work correctly:
`systemctl restart docker`
`systemctl restart docker`
## Get FreeDMR
`docker pull hacknix/freedmr:latest`
## Grab and edit the config file
## Grab and edit the config file
`mkdir /etc/freedmr`
`mkdir /etc/freedmr`
...
@@ -157,9 +155,6 @@ edit /etc/freedmr/freedmr.cfg with your favourite editor:
...
@@ -157,9 +155,6 @@ edit /etc/freedmr/freedmr.cfg with your favourite editor:
TGID_TS2_ACL: PERMIT:ALL
TGID_TS2_ACL: PERMIT:ALL
ANNOUNCEMENT_LANGUAGE: en_GB_2
ANNOUNCEMENT_LANGUAGE: en_GB_2
Remember to configure the database connection
## Make rules file
## Make rules file
`echo "BRIDGES = {'9990': [{'SYSTEM': 'ECHO', 'TS': 2, 'TGID': 9990, 'ACTIVE': True, 'TIMEOUT': 2, 'TO_TYPE': 'NONE', 'ON': [], 'OFF': [], 'RESET': []},]}" > /etc/freedmr/rules.py`
`echo "BRIDGES = {'9990': [{'SYSTEM': 'ECHO', 'TS': 2, 'TGID': 9990, 'ACTIVE': True, 'TIMEOUT': 2, 'TO_TYPE': 'NONE', 'ON': [], 'OFF': [], 'RESET': []},]}" > /etc/freedmr/rules.py`
...
@@ -180,32 +175,53 @@ Remember to configure the database connection
...
@@ -180,32 +175,53 @@ Remember to configure the database connection
`chown -R 54000 /var/log/freedmr`
`chown -R 54000 /var/log/freedmr`
## Run docker container and check it all starts up OK
## create /etc/freedmr/docker-compose.yml with the following content
version: '3.3'
services:
freedmr:
container_name: freedmr
volumes:
- '/etc/freedmr/freedmr.cfg:/opt/freedmr/freedmr.cfg'
- '/var/log/freedmr/freedmr.log:/opt/freedmr/freedmr.log'
- '/etc/freedmr/rules.py:/opt/freedmr/rules.py'
ports:
- '62031:62031/udp'
- '62045-62049:62045-62049/udp'
- '5900:5900/udp'
- '4321:4321/tcp'
image: 'hacknix/freedmr:development-latest'
docker run --name=freedmr -d --read-only -v /etc/freedmr/freedmr.cfg:/opt/freedmr/freedmr.cfg \
-v /var/log/freedmr/freedmr.log:/opt/freedmr/freedmr.log \
-v /etc/freedmr/rules.py:/opt/freedmr/rules.py -p 62031:62031/udp -p 62036-62046:62036-62046/udp \
-p 4321:4321/tcp hacknix/freedmr:latest
Hopefully this will run fine. If you have made any mistakes you may have to stop, edit config and restart.
#Run Freedmr
`cd /etc/freedmr`
`docker-compose up`
Once you are sure it has run correctly, you can restart in the background
`docker-compose up -d`
## Stop docker container
## Stop docker container
`docker container stop freedmr`
`docker-compose down`
## Update Freedmr
## Remove the docker container
`cd /etc/freedmr`
`docker
co
ntainer rm freedmr
`
`docker
-
co
mpose down
`
## Start on boot / restart on die
`docker-compose pull`
`docker
update --restart unless-stopped freedmr
`
`docker
-compose up -d
`
## Restart the container (for example when config is changed)
## Restart the container (for example when config is changed)
`docker
co
ntainer
restart
freedmr
`
`docker
-
co
mpose
restart`
## After FreeDMR is updated or restarted
## After FreeDMR is updated or restarted
this may be required
`conntrack -F`
`conntrack -F`
...
...
...
...