Skip to content

Commit

Permalink
Libreddit -> Redlib
Browse files Browse the repository at this point in the history
  • Loading branch information
sigaloid committed Dec 26, 2023
1 parent dac0595 commit b0f985c
Show file tree
Hide file tree
Showing 38 changed files with 276 additions and 275 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"portsAttributes": {
"8080": {
"label": "libreddit",
"label": "redlib",
"onAutoForward": "notify"
}
},
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_parity.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: ✨ Feature parity
about: Suggest implementing a feature into Libreddit that is found in Reddit.com
about: Suggest implementing a feature into Redlib that is found in Reddit.com
title: '✨ Feature parity: '
labels: feature parity
assignees: ''
Expand All @@ -12,7 +12,7 @@ assignees: ''
A clear and concise description of what the feature is.
-->

## Describe how this could be implemented into Libreddit
## Describe how this could be implemented into Redlib
<!--
A clear and concise description of what you want to happen.
-->
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: 💡 Feature request
about: Suggest a feature for Libreddit that is not found in Reddit
about: Suggest a feature for Redlib that is not found in Reddit
title: '💡 Feature request: '
labels: enhancement
assignees: ''
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/main-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,21 @@ jobs:
with:
version: latest

- name: Login to DockerHub
- name: Login to Quay.io
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}

- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v3
if: matrix.config.platform == 'linux/amd64'
- name: push README to Quay.io
uses: christian-korneck/update-container-description-action@v1
env:
DOCKER_APIKEY: ${{ secrets.APIKEY__QUAY_IO }}
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: libreddit/libreddit
destination_container_repo: quay.io/redlib/redlib
provider: quay
readme_file: 'README.md'

- name: Build and push
uses: docker/build-push-action@v4
Expand All @@ -53,6 +55,6 @@ jobs:
file: ./${{ matrix.config.dockerfile }}
platforms: ${{ matrix.config.platform }}
push: true
tags: libreddit/libreddit:${{ matrix.config.tag }}
tags: redlib/redlib:${{ matrix.config.tag }}
cache-from: type=gha
cache-to: type=gha,mode=max
18 changes: 9 additions & 9 deletions .github/workflows/main-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ jobs:
run: RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --target x86_64-unknown-linux-gnu

- name: Calculate SHA512 checksum
run: sha512sum target/x86_64-unknown-linux-gnu/release/libreddit > libreddit.sha512
run: sha512sum target/x86_64-unknown-linux-gnu/release/redlib > redlib.sha512

- name: Calculate SHA256 checksum
run: sha256sum target/x86_64-unknown-linux-gnu/release/libreddit > libreddit.sha256
run: sha256sum target/x86_64-unknown-linux-gnu/release/redlib > redlib.sha256

- uses: actions/upload-artifact@v3
name: Upload a Build Artifact
with:
name: libreddit
name: redlib
path: |
target/x86_64-unknown-linux-gnu/release/libreddit
libreddit.sha512
libreddit.sha256
target/x86_64-unknown-linux-gnu/release/redlib
redlib.sha512
redlib.sha256
- name: Versions
id: version
Expand All @@ -68,9 +68,9 @@ jobs:
name: ${{ steps.version.outputs.VERSION }} - ${{ github.event.head_commit.message }}
draft: true
files: |
target/x86_64-unknown-linux-gnu/release/libreddit
libreddit.sha512
libreddit.sha256
target/x86_64-unknown-linux-gnu/release/redlib
redlib.sha512
redlib.sha256
body: |
- ${{ github.event.head_commit.message }} ${{ github.sha }}
generate_release_notes: true
Expand Down
2 changes: 1 addition & 1 deletion .replit
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
run = "while :; do set -ex; nix-env -iA nixpkgs.unzip; curl -o./libreddit.zip -fsSL -- https://nightly.link/libreddit/libreddit/workflows/main-rust/master/libreddit.zip; unzip -n libreddit.zip; mv target/x86_64-unknown-linux-gnu/release/libreddit .; chmod +x libreddit; set +e; ./libreddit -H 63115200; sleep 1; done"
run = "while :; do set -ex; nix-env -iA nixpkgs.unzip; curl -o./redlib.zip -fsSL -- https://nightly.link/redlib-org/redlib/workflows/main-rust/master/redlib.zip; unzip -n redlib.zip; mv target/x86_64-unknown-linux-gnu/release/redlib .; chmod +x redlib; set +e; ./redlib -H 63115200; sleep 1; done"
language = "bash"
72 changes: 36 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "libreddit"
name = "redlib"
description = " Alternative private front-end to Reddit"
license = "AGPL-3.0"
repository = "https://github.com/spikecodes/libreddit"
repository = "https://github.com/redlib-org/redlib"
version = "0.30.1"
authors = ["spikecodes <[email protected]>"]
authors = ["Matthew Esposito <[email protected]>"]
edition = "2021"

[dependencies]
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM rust:alpine AS builder

RUN apk add --no-cache musl-dev

WORKDIR /libreddit
WORKDIR /redlib

COPY . .

Expand All @@ -21,16 +21,16 @@ COPY --from=builder /usr/share/ca-certificates /usr/share/ca-certificates
COPY --from=builder /etc/ssl/certs /etc/ssl/certs

# Copy our build
COPY --from=builder /libreddit/target/x86_64-unknown-linux-musl/release/libreddit /usr/local/bin/libreddit
COPY --from=builder /redlib/target/x86_64-unknown-linux-musl/release/redlib /usr/local/bin/redlib

# Use an unprivileged user.
RUN adduser --home /nonexistent --no-create-home --disabled-password libreddit
USER libreddit
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 Libreddit is functional
# 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 ["libreddit"]
CMD ["redlib"]
12 changes: 6 additions & 6 deletions Dockerfile.arm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM rust:alpine AS builder

RUN apk add --no-cache g++ git

WORKDIR /usr/src/libreddit
WORKDIR /usr/src/redlib

# cache dependencies in their own layer
COPY Cargo.lock Cargo.toml .
Expand All @@ -30,16 +30,16 @@ COPY --from=builder /usr/share/ca-certificates /usr/share/ca-certificates
COPY --from=builder /etc/ssl/certs /etc/ssl/certs

# Copy our build
COPY --from=builder /usr/local/cargo/bin/libreddit /usr/local/bin/libreddit
COPY --from=builder /usr/local/cargo/bin/redlib /usr/local/bin/redlib

# Use an unprivileged user.
RUN adduser --home /nonexistent --no-create-home --disabled-password libreddit
USER libreddit
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 Libreddit is functional
# 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 ["libreddit"]
CMD ["redlib"]
12 changes: 6 additions & 6 deletions Dockerfile.armv7
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN apt-get update && apt-get -y install gcc-arm-linux-gnueabihf \

RUN rustup target add armv7-unknown-linux-musleabihf

WORKDIR /libreddit
WORKDIR /redlib

COPY . .

Expand All @@ -28,16 +28,16 @@ COPY --from=builder /usr/share/ca-certificates /usr/share/ca-certificates
COPY --from=builder /etc/ssl/certs /etc/ssl/certs

# Copy our build
COPY --from=builder /libreddit/target/armv7-unknown-linux-musleabihf/release/libreddit /usr/local/bin/libreddit
COPY --from=builder /redlib/target/armv7-unknown-linux-musleabihf/release/redlib /usr/local/bin/redlib

# Use an unprivileged user.
RUN adduser --home /nonexistent --no-create-home --disabled-password libreddit
USER libreddit
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 Libreddit is functional
# 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 ["libreddit"]
CMD ["redlib"]
Loading

0 comments on commit b0f985c

Please sign in to comment.