Skip to content

Commit 3fdcd3f

Browse files
Fix certificate permission error in Docker by pre-creating /certs directory
Co-authored-by: thomasneuberger <23504477+thomasneuberger@users.noreply.github.com>
1 parent e87b5ad commit 3fdcd3f

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,20 @@ List all registered chats with their feature flags:
4848
Returns an array of chat objects with IDs and flag states.
4949

5050
**Note**: Manual trigger commands like `/monthlyreport` that respond directly to the requesting user bypass feature flags. However, when running scheduled tasks via `/runtask` command or API endpoints, feature flags are respected.
51+
52+
## Docker Certificate Setup
53+
54+
When running in Docker and Home Assistant uses a self-signed or custom CA certificate, mount the certificate and set the path via environment variable:
55+
56+
```yaml
57+
volumes:
58+
- ../certs/root_ca.crt:/certs/root_ca.crt:ro
59+
environment:
60+
- HomeAssistant__CertificateAuthorityPath=/certs/root_ca.crt
61+
```
62+
63+
The certificate file must be readable by all users on the host (world-readable), otherwise the container's non-root app user will be denied access:
64+
65+
```bash
66+
chmod a+r /path/to/root_ca.crt
67+
```

TgHomeBot.Api/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base
2+
RUN mkdir /certs
23
USER $APP_UID
34
WORKDIR /app
45
EXPOSE 8080

0 commit comments

Comments
 (0)