Libreddit -> Redlib

This commit is contained in:
Matthew Esposito 2023-12-26 18:25:52 -05:00
parent dac059573d
commit b0f985c687
No known key found for this signature in database
38 changed files with 276 additions and 275 deletions

View file

@ -5,7 +5,7 @@ FROM rust:alpine AS builder
RUN apk add --no-cache musl-dev
WORKDIR /libreddit
WORKDIR /redlib
COPY . .
@ -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"]