[GH-ISSUE #732] signal-cli binary in docker image #525

Closed
opened 2026-02-25 23:42:46 +03:00 by kerem · 5 comments
Owner

Originally created by @SecT0uch on GitHub (Nov 13, 2022).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/732

It seems the signal-cli binary in not included in the docker image.
It is needed for the Signal integration
Would it be possible to make it available ?

Edit: Submitted #733

Originally created by @SecT0uch on GitHub (Nov 13, 2022). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/732 It seems the signal-cli binary in not included in the docker image. It is needed for the Signal integration Would it be possible to make it available ? Edit: Submitted #733
kerem closed this issue 2026-02-25 23:42:46 +03:00
Author
Owner

@cuu508 commented on GitHub (Nov 13, 2022):

Wouldn't it be better to signal-cli in a separate container?

<!-- gh-comment-id:1312762489 --> @cuu508 commented on GitHub (Nov 13, 2022): Wouldn't it be better to signal-cli in a separate container?
Author
Owner

@SecT0uch commented on GitHub (Nov 13, 2022):

That's what I initially did, sharing the signal socket between the containers.
However signal-cli needs to be available in healthchecks container to connect to the socket.
Am I missing something ?

<!-- gh-comment-id:1312784603 --> @SecT0uch commented on GitHub (Nov 13, 2022): That's what I initially did, sharing the signal socket between the containers. However signal-cli needs to be available in healthchecks container to connect to the socket. Am I missing something ?
Author
Owner

@cuu508 commented on GitHub (Nov 13, 2022):

Did sharing the socket between the containers not work? What problem did you hit?
(note – I've not personally tested running healthchecks and signal-cli in separate containers, but I assumed there must be a way to make a socket from one container available to another container)

<!-- gh-comment-id:1312785370 --> @cuu508 commented on GitHub (Nov 13, 2022): Did sharing the socket between the containers not work? What problem did you hit? (note – I've not personally tested running healthchecks and signal-cli in separate containers, but I assumed there must be a way to make a socket from one container available to another container)
Author
Owner

@SecT0uch commented on GitHub (Nov 13, 2022):

I did manage to share the socket between the containers.

The issue is when testing my Signal integration: Could not send a test notification. signal-cli call failed

<!-- gh-comment-id:1312786862 --> @SecT0uch commented on GitHub (Nov 13, 2022): I did manage to share the socket between the containers. The issue is when testing my Signal integration: `Could not send a test notification. signal-cli call failed`
Author
Owner

@cuu508 commented on GitHub (Dec 15, 2022):

I got it semi-working with the following docker-compose file:

version: "3"
volumes:
    db-data:

services:
  db:
    image: postgres:12
    volumes:
      - db-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=$DB_NAME
      - POSTGRES_PASSWORD=$DB_PASSWORD
  web:
    build:
        context: ..
        dockerfile: docker/Dockerfile
    env_file:
        - .env
    ports:
        - "8000:8000"
    volumes:
      - "/tmp/sockets:/tmp/sockets"
    depends_on:
        - db
    command: bash -c 'while !</dev/tcp/db/5432; do sleep 1; done; uwsgi /opt/healthchecks/docker/uwsgi.ini'
  signal-cli:
    image: registry.gitlab.com/packaging/signal-cli/signal-cli-native:latest
    command: -a +[redacted] --config /var/lib/signal-cli daemon --socket /tmp/sockets/signal-cli.socket
    ports:
      - "7583:7583"
    volumes:
      - "/tmp/signal-cli-config:/var/lib/signal-cli"
      - "/tmp/sockets:/tmp/sockets"
    tmpfs:
      - "/tmp:exec"

And I had this in .env file:

SIGNAL_CLI_SOCKET=/tmp/sockets/signal-cli.socket

But using volumes to share sockets is quite clumsy. I had permission problems with socket files – I had to chmod the socket file so the healthchecks process would be able to access it. And, after stopping and restarting containers, the signal-cli container complained about the socket file already being there – I had to manually remove it between restarts.

I'm inexperienced with docker, there may be proper ways to solve the above issues.

As an experimental alternative I added support for connecting to a TCP socket in 73a5cb0d57. TCP communication between containers is simpler–no volumes, no sokcet files:

version: "3"
volumes:
    db-data:

services:
  db:
    image: postgres:12
    volumes:
      - db-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=$DB_NAME
      - POSTGRES_PASSWORD=$DB_PASSWORD
  web:
    build:
        context: ..
        dockerfile: docker/Dockerfile
    env_file:
        - .env
    ports:
        - "8000:8000"
    depends_on:
        - db
        - signal-cli
    command: bash -c 'while !</dev/tcp/db/5432; do sleep 1; done; uwsgi /opt/healthchecks/docker/uwsgi.ini'
  signal-cli:
    image: registry.gitlab.com/packaging/signal-cli/signal-cli-native:latest
    command: -a +[redacted] --config /var/lib/signal-cli daemon --tcp 0.0.0.0:7583
    volumes:
      - "/tmp/signal-cli-config:/var/lib/signal-cli"
    tmpfs:
      - "/tmp:exec"

And I had this in .env file:

SIGNAL_CLI_SOCKET=signal-cli:7583
<!-- gh-comment-id:1353306787 --> @cuu508 commented on GitHub (Dec 15, 2022): I got it semi-working with the following docker-compose file: ``` version: "3" volumes: db-data: services: db: image: postgres:12 volumes: - db-data:/var/lib/postgresql/data environment: - POSTGRES_DB=$DB_NAME - POSTGRES_PASSWORD=$DB_PASSWORD web: build: context: .. dockerfile: docker/Dockerfile env_file: - .env ports: - "8000:8000" volumes: - "/tmp/sockets:/tmp/sockets" depends_on: - db command: bash -c 'while !</dev/tcp/db/5432; do sleep 1; done; uwsgi /opt/healthchecks/docker/uwsgi.ini' signal-cli: image: registry.gitlab.com/packaging/signal-cli/signal-cli-native:latest command: -a +[redacted] --config /var/lib/signal-cli daemon --socket /tmp/sockets/signal-cli.socket ports: - "7583:7583" volumes: - "/tmp/signal-cli-config:/var/lib/signal-cli" - "/tmp/sockets:/tmp/sockets" tmpfs: - "/tmp:exec" ``` And I had this in `.env` file: ``` SIGNAL_CLI_SOCKET=/tmp/sockets/signal-cli.socket ``` But using volumes to share sockets is quite clumsy. I had permission problems with socket files – I had to chmod the socket file so the healthchecks process would be able to access it. And, after stopping and restarting containers, the signal-cli container complained about the socket file already being there – I had to manually remove it between restarts. I'm inexperienced with docker, there may be proper ways to solve the above issues. As an experimental alternative I added support for connecting to a TCP socket in 73a5cb0d572d3fa8923ab28a47409a6bfc4ac7da. TCP communication between containers is simpler–no volumes, no sokcet files: ``` version: "3" volumes: db-data: services: db: image: postgres:12 volumes: - db-data:/var/lib/postgresql/data environment: - POSTGRES_DB=$DB_NAME - POSTGRES_PASSWORD=$DB_PASSWORD web: build: context: .. dockerfile: docker/Dockerfile env_file: - .env ports: - "8000:8000" depends_on: - db - signal-cli command: bash -c 'while !</dev/tcp/db/5432; do sleep 1; done; uwsgi /opt/healthchecks/docker/uwsgi.ini' signal-cli: image: registry.gitlab.com/packaging/signal-cli/signal-cli-native:latest command: -a +[redacted] --config /var/lib/signal-cli daemon --tcp 0.0.0.0:7583 volumes: - "/tmp/signal-cli-config:/var/lib/signal-cli" tmpfs: - "/tmp:exec" ``` And I had this in `.env` file: ``` SIGNAL_CLI_SOCKET=signal-cli:7583 ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#525
No description provided.