Bundle service with .deb package

This commit is contained in:
2025-03-14 01:15:50 +01:00
parent 697dd44b52
commit 723ea0145b
4 changed files with 31 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ phar:
mv bin/slotdbd.phar ./slotdbd.phar
deb:
dpack build --type deb
fakeroot -- dpack build --type deb
docker:
docker build -t dev.noccylabs.info/slotdb/slotdb:latest .

View File

@@ -23,6 +23,22 @@ $ docker run -it \
dev.noccylabs.info/slotdb/slotdb
```
### Debian
```bash
$ sudo curl https://dev.noccylabs.info/api/packages/slotdb/debian/repository.key -o /etc/apt/keyrings/gitea-slotdb.asc
$ echo "deb [signed-by=/etc/apt/keyrings/gitea-slotdb.asc] https://dev.noccylabs.info/api/packages/slotdb/debian any main" | sudo tee -a /etc/apt/sources.list.d/gitea.list
$ sudo apt update
$ sudo apt install slotdb
```
### Build from source
```bash
$ composer install
$ make phar
```
## Configuration
## Security
@@ -87,6 +103,8 @@ $ curl -XPOST -Hcontent-type:application/json --data \
http://127.0.0.1:8080/api/slotdb/v1/group/A
```
To remove a member, set it to `false` rather than `true`.
### Updating slots
Set properties:

View File

@@ -14,9 +14,12 @@ package:
files:
./slotdbd.phar:
target: /usr/bin/slotdbd
chmod: '0744'
chmod: '0755'
build:
- 'make phar'
./doc/slotdbd.1.md:
target: /usr/share/man/man1/slotdbd.1.gz
type: manpage
./doc/slotdb.service:
target: /etc/systemd/system/slotdb.service

8
doc/slotdb.service Normal file
View File

@@ -0,0 +1,8 @@
[Unit]
Description=SlotDB database daemon
[Service]
ExecStart=/usr/bin/slotdbd
[Install]
WantedBy=multi-user.target