Compare commits

..

5 Commits

Author SHA1 Message Date
9b52524548 Merge pull request 'simple-build' () from simple-build into main
Reviewed-on: 
2024-04-09 00:41:39 +12:00
91eecdab9d add build 2024-04-09 00:39:22 +12:00
333aa3d810 Update Dockerfile.old 2024-04-09 00:38:30 +12:00
92648d9ea4 monumental fuckup :D
revert revert
2024-04-09 00:34:24 +12:00
bafc2e2773 revert e79242c9e7
revert v0.31.2
2024-04-09 00:33:39 +12:00
5 changed files with 22 additions and 12 deletions

@ -1,5 +0,0 @@
target
Dockerfile
.dockerignore
.git
.gitignore

@ -11,7 +11,7 @@ FROM debian:stable
ARG TARGET
RUN apt-get update
RUN apt-get install -y ca-certificates
RUN apt-get install -y ca-certificates wget
RUN apt-get clean -y; \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*

20
Dockerfile.old Normal 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"]

@ -883,8 +883,7 @@ pub fn rewrite_urls(input_text: &str) -> String {
let text1 =
// Rewrite Reddit links to Redlib
REDDIT_REGEX.replace_all(input_text, r#"href="/"#)
.to_string()
.replace("a href=\"https://preview.redd.it", "img src=\"https://preview.redd.it");
.to_string();
let text1 = REDDIT_EMOJI_REGEX
.replace_all(&text1, format_url(REDDIT_EMOJI_REGEX.find(&text1).map(|x| x.as_str()).unwrap_or_default()))
.to_string()

@ -1209,10 +1209,6 @@ a.search_subreddit:hover {
min-width: 0;
}
.comment_right img {
width: 50%;
}
.comment_data > * {
margin-right: 5px;
}