LeineLab Signal-Bot
Go to file
2024-12-29 00:40:25 +01:00
data main: move db to data/ such that docker does not create a directory 2024-12-29 00:33:42 +01:00
.gitignore Add docker and README.md 2024-12-28 23:52:19 +01:00
apitypes.py main: send stuff 2024-12-21 05:39:00 +01:00
config.json.example Add docker and README.md 2024-12-28 23:52:19 +01:00
create_task.py main: move db to data/ such that docker does not create a directory 2024-12-29 00:33:42 +01:00
docker-compose.yml main: move db to data/ such that docker does not create a directory 2024-12-29 00:33:42 +01:00
Dockerfile Add docker and README.md 2024-12-28 23:52:19 +01:00
list_signal_groups.py Add docker and README.md 2024-12-28 23:52:19 +01:00
main.py Task: add unfulfillable_message_sent property 2024-12-29 00:40:25 +01:00
models.py Task: add unfulfillable_message_sent property 2024-12-29 00:40:25 +01:00
README.md main: move db to data/ such that docker does not create a directory 2024-12-29 00:33:42 +01:00
requirements.txt Add create_task.py 2024-12-27 01:21:36 +01:00

Lab signal bot

Starting

Configuration

Create a config:

cp config.json.example config.json
vi config.json

(Inside the docker container, "http://signal-cli-rest-api:8080" can be resolved to the host of the other docker container. Outside not.)

Start containers:

docker compose up -d

In the beginning, this will only start the signal-cli-rest-api docker container. The other container will fail, since the signal-cli is not linked to the account. If you already activated the phone number with another signal device, you can register the new device.

Join the docker do this:

docker exec -it lab-signal-bot-signal-cli-rest-api-1 /bin/bash

Change user:

su signal-api

Link the new device:

signal-cli --config /home/.local/share/signal-cli link

Exit the docker shell.

Restart docker container:

docker restart lab-signal-bot-signal-cli-rest-api-1

From host, list signal groups:

python list_signal_groups.py --api-url http://localhost:8080/ -i

Now, you can set the identifier of the group you want in the config.json:

vi config.json

Rebuild containers:

docker compose up --build -d

Change the ownership of the db, such that the host user 1000 can write it:

sudo chown -R 1000 data/