Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
#!/usr/bin/env sh
#!/usr/bin/env dash
set -e

: "${DATABASE_HOST:="127.0.0.1"}"
: "${DATABASE_PORT:=5432}"
: "${ULIMIT_MAX_NOFILE:=65536}"

# prevent memory bloat in some misconfigured versions of Docker/containerd
# where the nofiles limit is very large. 0 means don't set it.
if test "${ULIMIT_MAX_NOFILE}" != 0 && test "$(ulimit -n)" -gt "${ULIMIT_MAX_NOFILE}"; then
ulimit -n "${ULIMIT_MAX_NOFILE}"
fi

# wait until Postgres is ready
while ! nc -z "${DATABASE_HOST}" "${DATABASE_PORT}" 2>/dev/null; do
Expand Down
2 changes: 2 additions & 0 deletions website/docs/advanced_guides/apache.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ services:
- 127.0.0.1:4000:4000
cap_drop:
- all
ulimits:
nofile: 65536
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To explain this to newcomers, a comment would greatly enhance UX.


database:
image: postgres:17
Expand Down
2 changes: 2 additions & 0 deletions website/docs/advanced_guides/traefik.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ services:
traefik.http.routers.teslamate.tls.certresolver: "tmhttpchallenge"
cap_drop:
- ALL
ulimits:
nofile: 65536
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To explain this to newcomers, a comment would greatly enhance UX.


database:
image: postgres:17
Expand Down
2 changes: 2 additions & 0 deletions website/docs/installation/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Alternatively, you can use a reverse proxy (such as Traefik, Apache2 or Caddy) w
- ./import:/opt/app/import
cap_drop:
- all
ulimits:
nofile: 65536
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To explain this to newcomers, a comment would greatly enhance UX.


database:
image: postgres:17-trixie
Expand Down
Loading