Example config, dist cleanup, build files
This commit is contained in:
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
FROM php:8.4-cli-alpine
|
||||||
|
|
||||||
|
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
|
||||||
|
RUN apk add --no-cache tini
|
||||||
|
ENTRYPOINT [ "/sbin/tini", "--" ]
|
||||||
|
|
||||||
|
RUN install-php-extensions pcntl posix mbstring sodium curl
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY ./ntfid.phar /app/ntfid
|
||||||
|
COPY ./config.dist.yaml /app/config.yaml
|
||||||
|
|
||||||
|
CMD [ "/app/ntfid", "--config", "/app/config.yaml" ]
|
||||||
23
Makefile
Normal file
23
Makefile
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
.PHONY: help all phar deb docker push
|
||||||
|
|
||||||
|
help:
|
||||||
|
@echo "\e[1mTargets:\e[0m"
|
||||||
|
@echo " \e[3mall\e[0m — build everything\n \e[3mphar\e[0m — build the phar\n \e[3mdeb\e[0m — build deb package\n \e[3mdocker\e[0m — build container image"
|
||||||
|
|
||||||
|
all: phar
|
||||||
|
|
||||||
|
phar:
|
||||||
|
echo "<?php return [ 'version' => '$(shell git describe --tags)', 'builddate' => '$(shell date)' ];" > src/build.php \
|
||||||
|
&& box compile \
|
||||||
|
&& echo "yay"
|
||||||
|
rm -f src/build.php
|
||||||
|
mv bin/ntfid.phar ./ntfid.phar
|
||||||
|
|
||||||
|
deb:
|
||||||
|
fakeroot -- dpack build --type deb
|
||||||
|
|
||||||
|
docker:
|
||||||
|
docker build -t dev.noccylabs.info/noccylabs/ntfi:latest .
|
||||||
|
|
||||||
|
push:
|
||||||
|
docker push dev.noccylabs.info/noccylabs/ntfi:latest
|
||||||
@@ -1,26 +1,9 @@
|
|||||||
# listen address
|
listen: "0.0.0.0:13000"
|
||||||
listen: "127.0.0.1:13000"
|
|
||||||
|
|
||||||
# these are the servers that the channels can use as destinations
|
|
||||||
servers:
|
servers:
|
||||||
default:
|
default:
|
||||||
server: ntfy.sh
|
server: ntfy.sh
|
||||||
# set to auth with token
|
|
||||||
token: ~
|
|
||||||
# or set to auth as user
|
|
||||||
username: ~
|
|
||||||
password: ~
|
|
||||||
|
|
||||||
# this is where you can send messages to
|
|
||||||
channels:
|
channels:
|
||||||
# redirect topics directly
|
|
||||||
serverevents:
|
|
||||||
destination: default/sometopicnameforserverevents
|
|
||||||
otherevents:
|
|
||||||
destination: default/someothertopicnameforevents
|
|
||||||
# parse and use only part of topic
|
|
||||||
"prefix_{topic}":
|
|
||||||
destination: prefixed/{topic}
|
|
||||||
# or append a prefix to the topic
|
|
||||||
"{topic}":
|
"{topic}":
|
||||||
destination: prefixing/prefix_{topic}
|
destination: "prefixing/{topic}"
|
||||||
|
|||||||
26
config.example.yaml
Normal file
26
config.example.yaml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# listen address
|
||||||
|
listen: "127.0.0.1:13000"
|
||||||
|
|
||||||
|
# these are the servers that the channels can use as destinations
|
||||||
|
servers:
|
||||||
|
default:
|
||||||
|
server: ntfy.sh
|
||||||
|
# set to auth with token
|
||||||
|
token: ~
|
||||||
|
# or set to auth as user
|
||||||
|
username: ~
|
||||||
|
password: ~
|
||||||
|
|
||||||
|
# this is where you can send messages to
|
||||||
|
channels:
|
||||||
|
# redirect topics directly
|
||||||
|
serverevents:
|
||||||
|
destination: default/sometopicnameforserverevents
|
||||||
|
otherevents:
|
||||||
|
destination: default/someothertopicnameforevents
|
||||||
|
# parse and use only part of topic
|
||||||
|
"prefix_{topic}":
|
||||||
|
destination: prefixed/{topic}
|
||||||
|
# or append a prefix to the topic
|
||||||
|
"{topic}":
|
||||||
|
destination: prefixing/prefix_{topic}
|
||||||
Reference in New Issue
Block a user