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

Update dev branch #1

Merged
merged 10 commits into from
Mar 4, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Docker Image CI for GHCR

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Build and publish the Docker image to GHCR
run: |
docker login --username raycadle --password ${{ secrets.GH_PAT }} ghcr.io
docker build --build-arg BUILD_DATE="$(date +%d/%m/%y)" --build-arg VERSION="$(date +%R:%S)" --tag ghcr.io/raycadle/ntfy:latest .
docker push ghcr.io/raycadle/ntfy:latest
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ RUN \
NTFY_RELEASE=$(curl -sX GET "https://api.github.com/repos/binwiederhier/ntfy/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
if [ -z ${NTFY_ARCH+x} ]; then \
NTFY_ARCH="ntfy_2.7.0_linux_amd64"; \
NTFY_ARCH="ntfy_${NTFY_RELEASE/v/}_linux_amd64"; \
fi && \
curl -o \
/tmp/ntfy.tar.gz -L \
"https://github.com/binwiederhier/ntfy/releases/download/${NTFY_RELEASE}/${NTFY_ARCH}.tar.gz" && \
tar zxf \
tar -zxf \
/tmp/ntfy.tar.gz -C /tmp/ntfy && \
cp -a /tmp/ntfy/"${NTFY_ARCH}"/ntfy /usr/bin/ntfy && \
echo "**** clean up ****" && \
Expand Down
38 changes: 28 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,43 @@
# Docker Ntfy
![ntfy](https://github.com/binwiederhier/ntfy/raw/main/web/public/static/images/ntfy.png)

[Ntfy](https://ntfy.sh/) A free and open source notification service.
# ntfy.sh | Send push notifications to your phone or desktop via PUT/POST

This is a Ntfy Docker image built on top of linuxserver.io's `baseimage-alpine:3.18` image, but is not supported by linuxserver.io.
**[ntfy](https://ntfy.sh/)** (pronounced *"notify"*) is a simple HTTP-based pub-sub notification service.

## The official docker image can be found at https://hub.docker.com/r/binwiederhier/ntfy
This is an unofficial Docker image built using the [LinuxServer](https://www.linuxserver.io/) team's [Alpine base-image](https://github.com/linuxserver/docker-baseimage-alpine).

## Notice
Although using both [binwiederhier's](https://github.com/binwiederhier) and [LinuxServer's](https://www.linuxserver.io/) respective works at its core, this image is not associated with — nor endorsed by — either developers in any way, shape, or form. It is simply a project for me to learn container architecture, which I chose to make public in the spirit of [FOSS](https://en.wikipedia.org/wiki/Free_and_open-source_software). All rights belong to their respective owners.

The official ntfy Docker image can be found [here](https://hub.docker.com/r/binwiederhier/ntfy) and you can support its developer [here](https://github.com/sponsors/binwiederhier) and [here](https://en.liberapay.com/ntfy/), or contribute to its development [here](https://github.com/binwiederhier/ntfy).

## Usage
To use this image, simply run the following command:
```shell
docker run -p 8080:8080 ghcr.io/raycadle/ntfy:latest
```
or
```shell
podman run -p 8080:8080 ghcr.io/raycadle/ntfy:latest
```

This image must be built and ran with the docker/podman cli.
## Build
If you wish to build this image locally, you can do so by running the commands below.

### Docker CLI
### Clone Repo
```shell
git clone https://github.com/raycadle/docker-ntfy.git && cd docker-ntfy
```
docker build -t ntfy:latest . && \
docker create \
### Build & Run
```shell
docker build --build-arg BUILD_DATE="$(date +%d/%m/%y)" --build-arg VERSION="$(date +%R:%S)" --tag ntfy:latest . && \
docker run \
--name=ntfy \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Europe/London \
-e TZ=America/Belize \
-p 8080:8080 \
-v path_to_data:/config \
-v /path/to/data:/config \
--restart unless-stopped \
ntfy:latest
```