Skip to content

Commit 60be59d

Browse files
committed
2 parents 97c5402 + ee5de1a commit 60be59d

14 files changed

Lines changed: 201 additions & 93 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
secured-signal:
2+
image: ghcr.io/codeshelldev/secured-signal-api:latest
3+
container_name: secured-signal
4+
environment:
5+
API__URL: http://signal-api:8080
6+
SETTINGS__MESSAGE__VARIABLES__RECIPIENTS: "[+123400002, +123400003, +123400004]"
7+
SETTINGS__MESSAGE__VARIABLES__NUMBER: "+123400001"
8+
API__TOKENS: "[LOOOOOONG_STRING]"
9+
restart: unless-stopped
10+
networks:
11+
backend:
12+
aliases:
13+
- secured-signal-api
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
secured-signal:
2+
image: ghcr.io/codeshelldev/secured-signal-api:latest
3+
container_name: secured-signal
4+
environment:
5+
API__URL: http://signal-api:8080
6+
SETTINGS__MESSAGE__VARIABLES__RECIPIENTS: "[+123400002, +123400003, +123400004]"
7+
SETTINGS__MESSAGE__VARIABLES__NUMBER: "+123400001"
8+
API__TOKENS: "[LOOOOOONG_STRING]"
9+
ports:
10+
- "8880:8880"
11+
restart: unless-stopped
12+
networks:
13+
backend:
14+
aliases:
15+
- secured-signal-api

docs/getting-started/examples/docker-compose.yaml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,7 @@ services:
1212
aliases:
1313
- signal-api
1414

15-
secured-signal:
16-
image: ghcr.io/codeshelldev/secured-signal-api:latest
17-
container_name: secured-signal
18-
environment:
19-
API__URL: http://signal-api:8080
20-
SETTINGS__MESSAGE__VARIABLES__RECIPIENTS: "[+123400002, +123400003, +123400004]"
21-
SETTINGS__MESSAGE__VARIABLES__NUMBER: "+123400001"
22-
API__TOKENS: "[LOOOOOONG_STRING]"
23-
ports:
24-
- "8880:8880"
25-
restart: unless-stopped
26-
networks:
27-
backend:
28-
aliases:
29-
- secured-signal-api
15+
{{{ \\#://../../examples/frontend.sec-signal-api.yml }}}
3016

3117
networks:
3218
backend:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
notify:
2+
- name: signal
3+
platform: signal_messenger
4+
url: "http://sec-signal-api:8880/auth=API_TOKEN"
5+
number: "+123400001" # tip: use a placeholder instead
6+
recipients:
7+
- "+123400002"
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: Home Assistant
3+
---
4+
5+
# Home Assistant
6+
7+
Instructions on how you can use **Secured Signal API** as a notification service for [Home Assistant](https://github.com/home-assistant/core).
8+
9+
## Setup
10+
11+
### 1. Home Assistant Configuration
12+
13+
To be able to use the Signal Messenger integration in Home Assistant you need to modify or add the following to your `configuration.yml` file:
14+
15+
```yaml
16+
{{{ #://./configuration.yml }}}
17+
```
18+
19+
Here we are taking advantage of the `url` field for adding `/auth=API_TOKEN` in order to use [Path Auth](../usage#auth).
20+
21+
For more detailed configuration instructions read the [official Home Assistant docs](https://www.home-assistant.io/integrations/signal_messenger/).
22+
23+
### 2. Enabling Path Auth
24+
25+
By default [Path Auth](../usage#auth) is disabled, so we first need to enable it in the config by adding `path` to [`auth.methods`](../configuration/auth):
26+
27+
```yaml
28+
api:
29+
auth:
30+
methods: [bearer, basic, body, path]
31+
```
32+
33+
And that's basically it, have fun!
34+
35+
## Sources
36+
37+
- https://www.home-assistant.io/integrations/signal_messenger/
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: Apache
3+
---
4+
5+
# Apache
6+
7+
Want to use [**Apache**](https://github.com/apache/apache) as your **reverse proxy**?
8+
Then your in luck you've come to the right place!
9+
10+
## Prerequisites
11+
12+
Before moving on you must have
13+
14+
- some knowledge of **Apache**
15+
- valid **SSL certificates**
16+
17+
## Installation
18+
19+
To implement Apache in front of **Secured Signal API** you need to update your `docker-compose.yaml` file.
20+
21+
```yaml
22+
{{{ #://./examples/apache.docker-compose.yaml }}}
23+
```
24+
25+
## Setup
26+
27+
Create a `apache.conf` file in the `docker-compose.yaml` folder and mount it to `/usr/local/apache2/conf.d` in your Apache container.
28+
29+
```apacheconf
30+
{{{ #://./examples/apache.conf }}}
31+
```
32+
33+
Add your `cert.key` and `cert.crt` into your `certs/` folder and mount it to `/etc/ssl`.
34+
35+
## Configuration
36+
37+
Now you can switch over to **Secured Signal API** and add Apache to your [trusted proxies](../../configuration/trusted-proxies.md):
38+
39+
```yaml
40+
settings:
41+
access:
42+
trustedProxies:
43+
- 172.20.0.100
44+
```
45+
46+
Lastly spin up your stack:
47+
48+
```bash
49+
docker compose up -d
50+
```
51+
52+
And you are ready to go!
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<VirtualHost *:443>
2+
ServerName domain.com
3+
4+
# SSL Configuration
5+
SSLEngine on
6+
SSLCertificateFile /etc/ssl/cert.crt
7+
SSLCertificateKeyFile /etc/ssl/cert.key
8+
9+
# Proxy settings
10+
ProxyPreserveHost On
11+
12+
# Use whatever network alias you set in the docker-compose file
13+
ProxyPass / http://sec-signal-api:8880
14+
ProxyPassReverse / http://sec-signal-api:8880
15+
</VirtualHost>
16+
17+
# Redirect HTTP to HTTPS
18+
<VirtualHost *:80>
19+
ServerName domain.com
20+
Redirect permanent / https://domain.com/
21+
</VirtualHost>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
services:
2+
{{{ \\#://../../../examples/backend.sec-signal-api.yml }}}
3+
4+
apache:
5+
image: httpd:latest
6+
container_name: apache
7+
ports:
8+
- "80:80"
9+
- "443:443"
10+
volumes:
11+
- ./apache.conf:/usr/local/apache2/conf/httpd.conf:ro
12+
- ./certs:/etc/ssl
13+
networks:
14+
proxy:
15+
backend:
16+
ipv4_address: 172.20.0.100
17+
18+
networks:
19+
backend:
20+
proxy:
Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
services:
2-
secured-signal:
3-
image: ghcr.io/codeshelldev/secured-signal-api:latest
4-
container_name: secured-signal-api
5-
environment:
6-
API__URL: http://signal-api:8080
7-
SETTINGS__MESSAGE__VARIABLES__RECIPIENTS: "[+123400002,+123400003,+123400004]"
8-
SETTINGS__MESSAGE__VARIABLES__NUMBER: "+123400001"
9-
API__TOKENS: "[LOOOOOONG_STRING]"
10-
restart: unless-stopped
11-
networks:
12-
backend:
13-
aliases:
14-
- secured-signal-api
2+
{{{ \\#://../../../examples/backend.sec-signal-api.yml }}}
153

164
caddy:
175
image: caddy:latest
@@ -26,11 +14,13 @@ services:
2614
- secured-signal
2715
restart: unless-stopped
2816
networks:
17+
proxy:
2918
backend:
3019
ipv4_address: 172.20.0.100
3120

3221
networks:
3322
backend:
23+
proxy:
3424

3525
volumes:
3626
data:

docs/reverse-proxy/nginx/examples/nginx.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ server {
66
# `_` for any
77
server_name domain.com;
88

9+
# SSL Configuration
910
ssl_certificate /etc/nginx/ssl/cert.crt;
1011
ssl_certificate_key /etc/nginx/ssl/cert.key;
1112

0 commit comments

Comments
 (0)