Skip to content

Commit

Permalink
feat: add jellystat
Browse files Browse the repository at this point in the history
  • Loading branch information
ajgon committed Apr 7, 2024
1 parent 9415eb0 commit 8762894
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ tasks:
build-channel:
desc: |-
go-task APP=<app> CHANNEL=<stable|dev> build-channel
go-task APP=<app> CHANNEL=<stable|devel> build-channel
cmds:
# prepare multiarch docker build
# docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
Expand Down Expand Up @@ -135,7 +135,7 @@ tasks:
test-channel:
desc: |-
go-task APP=<app> CHANNEL=<stable|dev> test-channel
go-task APP=<app> CHANNEL=<stable|devel> test-channel
cmds:
- >-
cue vet --schema '#Spec' ./apps/{{ .APP }}/metadata.json metadata.rules.cue
Expand Down
24 changes: 24 additions & 0 deletions apps/jellystat/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM ghcr.io/deedee-ops/alpine:3.19.1

ARG TARGETPLATFORM
ARG VERSION

WORKDIR /app

#hadolint ignore=DL3018,DL4006
RUN apk add git nodejs npm --no-cache \
&& git clone --depth 1 --branch "$(echo "${VERSION}" | sed 's@latest@unstable@g')" --single-branch https://github.com/CyferShepard/Jellystat . \
&& rm -rf .git \
&& npm install \
&& npm run build \
&& chown -R 65000:65000 /app \
&& apk del --purge git

EXPOSE 3000

USER 65000:65000
VOLUME ["/tmp"]
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/base-entrypoint.sh"]
CMD ["npm", "run", "start"]

LABEL org.opencontainers.image.source="https://github.com/CyferShepard/Jellystat"
34 changes: 34 additions & 0 deletions apps/jellystat/ci/goss.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
# https://github.com/goss-org/goss/blob/master/docs/manual.md#group
group:
abc:
exists: true
gid: 65000
# https://github.com/goss-org/goss/blob/master/docs/manual.md#file
file:
/usr/local/bin/base-entrypoint.sh:
exists: true
mode: "0755"
/usr/local/bin/entrypoint.sh:
exists: true
mode: "0755"
# https://github.com/aelsabbahy/goss/blob/master/docs/manual.md#http
http:
http://localhost:8096/web/index.html:
status: 200
# https://github.com/goss-org/goss/blob/master/docs/manual.md#mount
mount:
/config:
exists: true
/tmp:
exists: true
# https://github.com/goss-org/goss/blob/master/docs/manual.md#port
port:
tcp:8096:
listening: true
# https://github.com/goss-org/goss/blob/master/docs/manual.md#user
user:
abc:
exists: true
uid: 65000
gid: 65000
27 changes: 27 additions & 0 deletions apps/jellystat/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"app": "jellystat",
"base": false,
"testMuteCmd": false,
"channels": [
{
"name": "stable",
"renovate::dataSource": "github-releases",
"renovate::depName": "CyferShepard/Jellystat",
"version": "1.0.9",
"platforms": [
"linux/amd64",
"linux/arm64"
]
}, {
"name": "devel",
"metavar": "-develop",
"renovate::dataSource": "github-releases",
"renovate::depName": "CyferShepard/Jellystat",
"version": "latest",
"platforms": [
"linux/amd64",
"linux/arm64"
]
}
]
}
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
devShells.default = pkgs.mkShell {
buildInputs = [
pkgs.cue
# pkgs.dgoss
pkgs.dgoss
pkgs.go-task
pkgs.jq
pkgs.lefthook
Expand Down

0 comments on commit 8762894

Please sign in to comment.