Skip to content

Commit 9dd76c8

Browse files
authored
Add files via upload
1 parent 1266071 commit 9dd76c8

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

Containerfile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM cgr.dev/chainguard/wolfi-base:latest AS cloner
2+
RUN apk add git
3+
RUN git clone --depth=1 --single-branch --branch=master --recurse-submodules https://git.uupdump.net/uup-dump/json-api.git
4+
FROM cgr.dev/chainguard/wolfi-base:latest AS openuup
5+
RUN apk add php-8.4 7zip
6+
COPY web.html /openuup/index.html
7+
ADD https://raw.githubusercontent.com/oxalorg/sakura/refs/heads/master/css/sakura-dark.css /openuup/sakura.css
8+
COPY --from=cloner /json-api /openuup/json-api
9+
RUN ln -s /fileinfo /openuup/json-api/fileinfo
10+
RUN ln -s /packs /openuup/json-api/packs
11+
EXPOSE 80
12+
VOLUME ["/fileinfo", "/packs"]
13+
CMD /usr/bin/php -S 0.0.0.0:80 -t /openuup

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# OpenUUP
2+
3+
Simple container image that lets you self-host the open source parts of UUP dump as well as a basic frontend.

web.html

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!doctype html>
2+
3+
<head>
4+
<title>OpenUUP</title>
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<link rel="stylesheet" href="/sakura.css" />
7+
</head>
8+
9+
<body>
10+
<h1>OpenUUP</h1>
11+
<p>Yes, this is a lame web UI that only allows viewing the known builds. Use the /json-api for everything else. It is documented <a href="https://git.uupdump.net/uup-dump/json-api#uup-dump-json-api">here</a>.</p>
12+
<p>As an example, GET <a href="/json-api/listid.php">/json-api/listid.php</a> to get the same known builds as displayed below.</p>
13+
<p id="status">Loading...</p>
14+
<ul id="builds"></ul>
15+
<script>
16+
(async () => {
17+
let status = document.querySelector("#status");
18+
let builds = document.querySelector("#builds");
19+
try {
20+
let allBuilds = await fetch("/json-api/listid.php");
21+
let allBuildsJSON = await allBuilds.json();
22+
if (allBuildsJSON.response.builds.length == 0) {
23+
let emptyText = document.createElement("li");
24+
emptyText.textContent = "Hmm, looks like there's no builds. Make sure /fileinfo and /packs are mounted!"
25+
builds.append(emptyText);
26+
}
27+
allBuildsJSON.response.builds.forEach(build => {
28+
let buildText = document.createElement("li");
29+
buildText.textContent = build.title;
30+
builds.append(buildText);
31+
});
32+
status.style.display = "none";
33+
} catch (err) {
34+
status.textContent += `error! Got "${err}". Check the browser console.`;
35+
}
36+
})();
37+
</script>
38+
</body>

0 commit comments

Comments
 (0)