Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add timezone for docker install #307

Merged
merged 2 commits into from Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions Dockerfile
Expand Up @@ -3,5 +3,7 @@ MAINTAINER Philipp C. Heckel <philipp.heckel@gmail.com>

COPY ntfy /usr/bin

RUN apk add --no-cache tzdata

EXPOSE 80/tcp
ENTRYPOINT ["ntfy"]
4 changes: 3 additions & 1 deletion docker-compose.yml
Expand Up @@ -5,7 +5,9 @@ services:
container_name: ntfy
command:
- serve
user: UID:GID # optional. Set custom user/group or uid/gid
environment:
- TZ=UTC # optional: Change to your desired timezone
user: UID:GID # optional: Set custom user/group or uid/gid
volumes:
- /var/cache/ntfy:/var/cache/ntfy
- /etc/ntfy:/etc/ntfy
Expand Down
7 changes: 5 additions & 2 deletions docs/install.md
Expand Up @@ -239,10 +239,11 @@ docker run \
serve
```

With other config options and non-root user (configured via `/etc/ntfy/server.yml`, see [configuration](config.md) for details):
With other config options, timezone, and non-root user (configured via `/etc/ntfy/server.yml`, see [configuration](config.md) for details):
```bash
docker run \
-v /etc/ntfy:/etc/ntfy \
-e TZ=UTC \
-p 80:80 \
-u UID:GID \
-it \
Expand All @@ -260,7 +261,9 @@ services:
container_name: ntfy
command:
- serve
user: UID:GID # optional. replace with your own user/group or uid/gid
environment:
- TZ=UTC # optional: set desired timezone
user: UID:GID # optional: replace with your own user/group or uid/gid
volumes:
- /var/cache/ntfy:/var/cache/ntfy
- /etc/ntfy:/etc/ntfy
Expand Down