mirror of
https://github.com/binwiederhier/ntfy.git
synced 2024-12-04 17:05:46 +01:00
add tzdata to image and use env for docker timezone
This commit is contained in:
parent
f6dee345b7
commit
ae3163c5b1
3 changed files with 10 additions and 6 deletions
|
@ -3,5 +3,7 @@ MAINTAINER Philipp C. Heckel <philipp.heckel@gmail.com>
|
||||||
|
|
||||||
COPY ntfy /usr/bin
|
COPY ntfy /usr/bin
|
||||||
|
|
||||||
|
RUN apk add --no-cache tzdata
|
||||||
|
|
||||||
EXPOSE 80/tcp
|
EXPOSE 80/tcp
|
||||||
ENTRYPOINT ["ntfy"]
|
ENTRYPOINT ["ntfy"]
|
||||||
|
|
|
@ -5,11 +5,12 @@ services:
|
||||||
container_name: ntfy
|
container_name: ntfy
|
||||||
command:
|
command:
|
||||||
- serve
|
- 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:
|
volumes:
|
||||||
- /var/cache/ntfy:/var/cache/ntfy
|
- /var/cache/ntfy:/var/cache/ntfy
|
||||||
- /etc/ntfy:/etc/ntfy
|
- /etc/ntfy:/etc/ntfy
|
||||||
- /etc/localtime:/etc/localtime:ro
|
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
|
@ -239,11 +239,11 @@ docker run \
|
||||||
serve
|
serve
|
||||||
```
|
```
|
||||||
|
|
||||||
With other config options, host-matched timezone, 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
|
```bash
|
||||||
docker run \
|
docker run \
|
||||||
-v /etc/ntfy:/etc/ntfy \
|
-v /etc/ntfy:/etc/ntfy \
|
||||||
-v /etc/localtime:/etc/localtime:ro \
|
-e TZ=UTC \
|
||||||
-p 80:80 \
|
-p 80:80 \
|
||||||
-u UID:GID \
|
-u UID:GID \
|
||||||
-it \
|
-it \
|
||||||
|
@ -261,11 +261,12 @@ services:
|
||||||
container_name: ntfy
|
container_name: ntfy
|
||||||
command:
|
command:
|
||||||
- serve
|
- 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:
|
volumes:
|
||||||
- /var/cache/ntfy:/var/cache/ntfy
|
- /var/cache/ntfy:/var/cache/ntfy
|
||||||
- /etc/ntfy:/etc/ntfy
|
- /etc/ntfy:/etc/ntfy
|
||||||
- /etc/localtime:/etc/localtime:ro # set timezone to match host
|
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
Loading…
Reference in a new issue