Compare commits

..

No commits in common. "f8f964741a1ebb8a98733f3a5e9ac1586afe9376" and "336d5dcaa7030a025ebe8f34d6eae04b8348d1e4" have entirely different histories.

15 changed files with 50 additions and 60 deletions

20
Cargo.lock generated
View File

@ -1031,16 +1031,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
[[package]]
name = "redox_syscall"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e"
dependencies = [
"bitflags",
]
[[package]]
name = "redsunlib"
name = "redlib"
version = "0.34.0"
dependencies = [
"askama",
@ -1075,6 +1066,15 @@ 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 = "redsunlib"
name = "redlib"
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 git
RUN apk add --no-cache musl-dev
WORKDIR /redlib

20
Dockerfile.old Normal file
View File

@ -0,0 +1,20 @@
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:
redsunlib:
redlib:
build: .
restart: always
container_name: "redsunlib"
container_name: "redlib"
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-redsunlib.json
# - seccomp=seccomp-redlib.json
cap_drop:
- ALL
networks:
- redsunlib
- redlib
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "--tries=1", "http://localhost:8080/settings"]
interval: 5m
timeout: 3s
networks:
redsunlib:
redlib:

View File

@ -1,24 +1,26 @@
services:
redsunlib:
image: git.stardust.wtf/iridium/redsunlib:latest
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
restart: always
container_name: "redsunlib"
container_name: "redlib"
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-redsunlib.json
# - seccomp=seccomp-redlib.json
cap_drop:
- ALL
env_file: .env
networks:
- redsunlib
- redlib
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "--tries=1", "http://localhost:8080/settings"]
interval: 5m
timeout: 3s
networks:
redsunlib:
redlib:

View File

@ -166,7 +166,7 @@ async fn main() {
let listener = [address, ":", port].concat();
println!("Starting Redsunlib...");
println!("Starting Redlib...");
// 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 Redsunlib v{} on {listener}!", env!("CARGO_PKG_VERSION"));
println!("Running Redlib v{} on {listener}!", env!("CARGO_PKG_VERSION"));
let server = app.listen(&listener);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 969 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1,33 +1 @@
<?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>
<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>

Before

Width:  |  Height:  |  Size: 943 B

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

Before

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">sun</span><span id="lib">lib</span></a>
<a id="redlib" href="/"><span id="lib">red</span><span id="reddit">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/iridium/redsunlib" title="View code on git.stardust.wtf">&lt;&gt; Code</a>
<a href="https://git.stardust.wtf/Ayaka/redlib" title="View code on git.stardust.wtf">&lt;&gt; Code</a>
</div>
</footer>
{% endblock %}