Compare commits

...

2 Commits

Author SHA1 Message Date
f8f964741a super minimal rebrand 2024-06-02 22:33:45 +12:00
58c736c51b fix build not including git hash 2024-06-02 22:33:45 +12:00
15 changed files with 60 additions and 50 deletions

20
Cargo.lock generated
View File

@ -1031,7 +1031,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
[[package]]
name = "redlib"
name = "redox_syscall"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e"
dependencies = [
"bitflags",
]
[[package]]
name = "redsunlib"
version = "0.34.0"
dependencies = [
"askama",
@ -1066,15 +1075,6 @@ dependencies = [
"uuid",
]
[[package]]
name = "redox_syscall"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e"
dependencies = [
"bitflags",
]
[[package]]
name = "regex"
version = "1.10.4"

View File

@ -1,5 +1,5 @@
[package]
name = "redlib"
name = "redsunlib"
description = " Alternative private front-end to Reddit"
license = "AGPL-3.0"
repository = "https://git.stardust.wtf/iridium/redlib"

View File

@ -2,7 +2,7 @@
FROM rust:alpine AS builder
RUN apk add --no-cache musl-dev
RUN apk add --no-cache musl-dev git
WORKDIR /redlib

View File

@ -1,20 +0,0 @@
FROM alpine:3.19
ARG TARGET
RUN apk add --no-cache curl
RUN curl -L https://github.com/redlib-org/redlib/releases/latest/download/redlib-${TARGET}.tar.gz | \
tar xz -C /usr/local/bin/
RUN adduser --home /nonexistent --no-create-home --disabled-password redlib
USER redlib
# Tell Docker to expose port 8080
EXPOSE 8080
# Run a healthcheck every minute to make sure redlib is functional
HEALTHCHECK --interval=1m --timeout=3s CMD wget --spider --q http://localhost:8080/settings || exit 1
CMD ["redlib"]

View File

@ -2,25 +2,25 @@
version: "3.8"
services:
redlib:
redsunlib:
build: .
restart: always
container_name: "redlib"
container_name: "redsunlib"
ports:
- 8080:8080 # Specify `127.0.0.1:8080:8080` instead if using a reverse proxy
user: nobody
read_only: true
security_opt:
- no-new-privileges:true
# - seccomp=seccomp-redlib.json
# - seccomp=seccomp-redsunlib.json
cap_drop:
- ALL
networks:
- redlib
- redsunlib
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "--tries=1", "http://localhost:8080/settings"]
interval: 5m
timeout: 3s
networks:
redlib:
redsunlib:

View File

@ -1,26 +1,24 @@
services:
redlib:
image: quay.io/redlib/redlib:latest
# image: quay.io/redlib/redlib:latest-arm # uncomment if you use arm64
# image: quay.io/redlib/redlib:latest-armv7 # uncomment if you use armv7
redsunlib:
image: git.stardust.wtf/iridium/redsunlib:latest
restart: always
container_name: "redlib"
container_name: "redsunlib"
ports:
- 8080:8080 # Specify `127.0.0.1:8080:8080` instead if using a reverse proxy
user: nobody
read_only: true
security_opt:
- no-new-privileges:true
# - seccomp=seccomp-redlib.json
# - seccomp=seccomp-redsunlib.json
cap_drop:
- ALL
env_file: .env
networks:
- redlib
- redsunlib
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "--tries=1", "http://localhost:8080/settings"]
interval: 5m
timeout: 3s
networks:
redlib:
redsunlib:

View File

@ -166,7 +166,7 @@ async fn main() {
let listener = [address, ":", port].concat();
println!("Starting Redlib...");
println!("Starting Redsunlib...");
// Begin constructing a server
let mut app = server::Server::new();
@ -373,7 +373,7 @@ async fn main() {
// Default service in case no routes match
app.at("/*").get(|req| error(req, "Nothing here").boxed());
println!("Running Redlib v{} on {listener}!", env!("CARGO_PKG_VERSION"));
println!("Running Redsunlib v{} on {listener}!", env!("CARGO_PKG_VERSION"));
let server = app.listen(&listener);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 969 B

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View File

@ -1 +1,33 @@
<svg version="1.1" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><g transform="matrix(.75272 0 0 .75272 -.75945 -.16518)"><circle cx="341.11" cy="340.32" r="340.1" fill="#1a1a1a"/><path d="m320.64 126.73v300.8h92.264v-207.92h75.803v-92.83h-75.803v-0.0508z" fill="#0ff"/><path d="m193.1 126.74v383.96h6e-3v43.543h295.82v-92.338h-202.74v-335.16z" fill="#f9f9f9"/></g></svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
viewBox="0 0 512 512"
id="svg2"
width="512"
height="512"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs id="defs2" />
<rect width="512" height="512" fill="#4c082a" />
<g
transform="matrix(0.75272,0,0,0.75272,-1.1596187,-0.37987125)"
id="g2">
<circle
fill="#1a1a1a"
id="circle1"
style="fill:#4c082a;fill-opacity:0"
r="340.10001"
cy="340.32001"
cx="341.10999" />
<path
d="m 320.64,126.73 v 300.8 h 92.264 V 219.61 h 75.803 v -92.83 h -75.803 v -0.0508 z"
fill="#f83240"
id="path1"
style="fill:#f83240;fill-opacity:1" />
<path
d="M 193.1,126.74 V 510.7 h 0.006 v 43.543 h 295.82 v -92.338 h -202.74 v -335.16 z"
fill="#f83240"
id="path2"
style="fill:#f83240;fill-opacity:1" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 383 B

After

Width:  |  Height:  |  Size: 943 B

BIN
static/logo_full.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 KiB

View File

@ -35,7 +35,7 @@
<nav class="
{% if prefs.fixed_navbar == "on" %} fixed_navbar{% endif %}">
<div id="logo">
<a id="redlib" href="/"><span id="lib">red</span><span id="reddit">lib.</span></a>
<a id="redlib" href="/"><span id="lib">red</span><span id="reddit">sun</span><span id="lib">lib</span></a>
{% block subscriptions %}{% endblock %}
</div>
{% block search %}{% endblock %}
@ -76,7 +76,7 @@
<a href="/info" title="View instance information">ⓘ View instance info</a>
</div>
<div class="footer-button">
<a href="https://git.stardust.wtf/Ayaka/redlib" title="View code on git.stardust.wtf">&lt;&gt; Code</a>
<a href="https://git.stardust.wtf/iridium/redsunlib" title="View code on git.stardust.wtf">&lt;&gt; Code</a>
</div>
</footer>
{% endblock %}