generated from hotio/overseerr
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 56f56f1
Showing
13 changed files
with
1,231 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.git | ||
.github | ||
.gitattributes | ||
build.sh | ||
LICENSE | ||
README.md | ||
update-digests.sh | ||
update-versions.sh | ||
VERSION.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Documentation | ||
|
||
All our documentation is located at [hotio.dev](https://hotio.dev). | ||
|
||
# Support | ||
|
||
If you need some assistance, please join our [discord](https://hotio.dev/discord) server. | ||
|
||
# Source | ||
|
||
The source is hosted at [GitHub](https://github.com/hotio). If you can't find it in the `master` branch, it's probably located in another branch. | ||
|
||
# Show your support | ||
|
||
You can show your support by giving us a star on Docker Hub or/and GitHub, it's also possible to make a [donation](https://hotio.dev/donate). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"latest": true, | ||
"description": "Releases", | ||
"version": "1.6.0", | ||
"changelog": "https://github.com/fallenbagel/jellyseerr/compare/v1.33.2...v1.6.0", | ||
"upstream_image": "cr.hotio.dev/hotio/base", | ||
"upstream_tag": "alpine", | ||
"upstream_digest_amd64": "sha256:900e4d4190ce888480b287de41d7b9f8a0c65a14bc1e739feac814ceab93dc36", | ||
"upstream_digest_arm64": "sha256:af86b6528da8ecaf00e5cc4e5ec27ee3b42f9549c6a679252cf9220cd88aa33e", | ||
"test_url": "http://localhost:5055" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
if [[ -z ${1} ]]; then | ||
echo "Usage: ./build.sh amd64" | ||
echo " ./build.sh arm64" | ||
exit 1 | ||
fi | ||
|
||
image=$(basename "$(git rev-parse --show-toplevel)") | ||
docker build -f "./linux-${1}.Dockerfile" -t "${image}-${1}" $(for i in $(jq -r 'to_entries[] | [(.key | ascii_upcase),.value] | join("=")' < VERSION.json); do out+="--build-arg $i " ; done; echo $out;out="") . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
ARG UPSTREAM_IMAGE | ||
ARG UPSTREAM_DIGEST_AMD64 | ||
|
||
FROM node:16.17-alpine AS builder | ||
RUN apk add --no-cache curl | ||
ARG VERSION | ||
ENV COMMIT_TAG=${VERSION} | ||
RUN mkdir /build && \ | ||
curl -fsSL "https://github.com/fallenbagel/jellyseerr/archive/v${VERSION}.tar.gz" | tar xzf - -C "/build" --strip-components=1 && \ | ||
cd /build && \ | ||
CYPRESS_INSTALL_BINARY=0 yarn --frozen-lockfile --network-timeout 1000000 && \ | ||
yarn build && \ | ||
yarn install --production --ignore-scripts --prefer-offline && \ | ||
yarn cache clean | ||
|
||
|
||
FROM ${UPSTREAM_IMAGE}@${UPSTREAM_DIGEST_AMD64} | ||
EXPOSE 5055 | ||
VOLUME ["${CONFIG_DIR}"] | ||
|
||
RUN apk add --no-cache yarn | ||
|
||
COPY --from=builder /build/dist "${APP_DIR}/dist" | ||
COPY --from=builder /build/.next "${APP_DIR}/.next" | ||
COPY --from=builder /build/node_modules "${APP_DIR}/node_modules" | ||
|
||
ARG VERSION | ||
RUN curl -fsSL "https://github.com/fallenbagel/jellyseerr/archive/v${VERSION}.tar.gz" | tar xzf - -C "${APP_DIR}" --strip-components=1 && \ | ||
echo '{"commitTag": "'"${VERSION}"'"}' > "${APP_DIR}/committag.json" && \ | ||
rm -rf "${APP_DIR}/config" && ln -s "${CONFIG_DIR}" "${APP_DIR}/config" && \ | ||
chmod -R u=rwX,go=rX "${APP_DIR}" | ||
|
||
COPY root/ / | ||
RUN chmod -R +x /etc/cont-init.d/ /etc/services.d/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
ARG UPSTREAM_IMAGE | ||
ARG UPSTREAM_DIGEST_ARM64 | ||
|
||
FROM node:16.17-alpine AS builder | ||
RUN apk add --no-cache curl build-base python3 sqlite | ||
ARG VERSION | ||
ENV COMMIT_TAG=${VERSION} | ||
RUN mkdir /build && \ | ||
curl -fsSL "https://github.com/fallenbagel/jellyseerr/archive/v${VERSION}.tar.gz" | tar xzf - -C "/build" --strip-components=1 && \ | ||
cd /build && \ | ||
CYPRESS_INSTALL_BINARY=0 yarn --frozen-lockfile --network-timeout 1000000 && \ | ||
yarn build && \ | ||
yarn install --production --ignore-scripts --prefer-offline && \ | ||
yarn cache clean | ||
|
||
|
||
FROM ${UPSTREAM_IMAGE}@${UPSTREAM_DIGEST_ARM64} | ||
EXPOSE 5055 | ||
VOLUME ["${CONFIG_DIR}"] | ||
|
||
RUN apk add --no-cache yarn | ||
|
||
COPY --from=builder /build/dist "${APP_DIR}/dist" | ||
COPY --from=builder /build/.next "${APP_DIR}/.next" | ||
COPY --from=builder /build/node_modules "${APP_DIR}/node_modules" | ||
|
||
ARG VERSION | ||
RUN curl -fsSL "https://github.com/fallenbagel/jellyseerr/archive/v${VERSION}.tar.gz" | tar xzf - -C "${APP_DIR}" --strip-components=1 && \ | ||
echo '{"commitTag": "'"${VERSION}"'"}' > "${APP_DIR}/committag.json" && \ | ||
rm -rf "${APP_DIR}/config" && ln -s "${CONFIG_DIR}" "${APP_DIR}/config" && \ | ||
chmod -R u=rwX,go=rX "${APP_DIR}" | ||
|
||
COPY root/ / | ||
RUN chmod -R +x /etc/cont-init.d/ /etc/services.d/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/command/with-contenv bash | ||
# shellcheck shell=bash | ||
|
||
umask "${UMASK}" | ||
|
||
echo " | ||
---------------------------------------------------------------------- | ||
ENVIRONMENT | ||
---------------------------------------------------------------------- | ||
PUID=${PUID} | ||
PGID=${PGID} | ||
UMASK=${UMASK} | ||
TZ=${TZ} | ||
---------------------------------------------------------------------- | ||
" | ||
|
||
if [[ ! "${PUID}" -eq 0 ]] && [[ ! "${PGID}" -eq 0 ]]; then | ||
echo "Executing usermod..." | ||
mkdir "/tmp/temphome" | ||
usermod -d "/tmp/temphome" hotio | ||
usermod -o -u "${PUID}" hotio | ||
usermod -d "${CONFIG_DIR}" hotio | ||
rm -rf "/tmp/temphome" | ||
groupmod -o -g "${PGID}" hotio | ||
else | ||
echo "Running as root is not supported, please fix your PUID and PGID!" | ||
exit 1 | ||
fi | ||
|
||
echo "Applying permissions to ${CONFIG_DIR}" | ||
chmod "=rwx" "${CONFIG_DIR}" | ||
chown hotio:hotio "${CONFIG_DIR}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/command/with-contenv bash | ||
# shellcheck shell=bash | ||
|
||
umask "${UMASK}" | ||
|
||
HOME="${APP_DIR}" && export HOME | ||
|
||
cd "${APP_DIR}" || exit 1 | ||
exec s6-setuidgid hotio yarn start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
export DOCKER_CLI_EXPERIMENTAL=enabled | ||
version_json=$(cat ./VERSION.json) | ||
upstream_image=$(jq -r '.upstream_image' <<< "${version_json}") | ||
upstream_tag=$(jq -r '.upstream_tag' <<< "${version_json}") | ||
if [[ ${upstream_image} == null || ${upstream_tag} == null ]]; then | ||
jq '.upstream_image = "'"cr.hotio.dev/hotio/base"'" | .upstream_tag = "'"alpine"'"' <<< "${version_json}" > VERSION.json | ||
exit 0 | ||
fi | ||
manifest=$(skopeo inspect --raw "docker://${upstream_image}:${upstream_tag}") | ||
[[ -z ${manifest} ]] && exit 1 | ||
upstream_digest_amd64=$(echo "${manifest}" | jq -r '.manifests[] | select (.platform.architecture == "amd64" and .platform.os == "linux").digest') | ||
upstream_digest_arm64=$(echo "${manifest}" | jq -r '.manifests[] | select (.platform.architecture == "arm64" and .platform.os == "linux").digest') | ||
jq '.upstream_digest_amd64 = "'"${upstream_digest_amd64}"'" | .upstream_digest_arm64 = "'"${upstream_digest_arm64}"'"' <<< "${version_json}" > VERSION.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
version=$(curl -u "${GITHUB_ACTOR}:${GITHUB_TOKEN}" -fsSL "https://api.github.com/repos/fallenbagel/jellyseerr/tags" | jq -r .[0].name | sed s/v//g) | ||
[[ -z ${version} ]] && exit 0 | ||
old_version=$(jq -r '.version' < VERSION.json) | ||
changelog=$(jq -r '.changelog' < VERSION.json) | ||
[[ "${old_version}" != "${version}" ]] && changelog="https://github.com/fallenbagel/jellyseerr/compare/v${old_version}...v${version}" | ||
version_json=$(cat ./VERSION.json) | ||
jq '.version = "'"${version}"'" | .changelog = "'"${changelog}"'"' <<< "${version_json}" > VERSION.json |