Skip to content

Commit 690b365

Browse files
committed
feat: add profilarr container
1 parent a0ed48a commit 690b365

File tree

5 files changed

+112
-0
lines changed

5 files changed

+112
-0
lines changed

apps/profilarr/Dockerfile

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Get upstream code
2+
FROM alpine:latest AS cloner
3+
ARG VERSION
4+
5+
RUN apk update && apk upgrade && \
6+
apk add --no-cache git
7+
8+
RUN git clone -b $VERSION https://github.com/Dictionarry-Hub/profilarr.git /source
9+
10+
### STAGE 1: Build Profilarr ###
11+
FROM node:20-alpine AS build
12+
COPY --from=cloner /source /source
13+
WORKDIR /source
14+
15+
RUN cd ./frontend && \
16+
npm ci && \
17+
npm run build && \
18+
cd .. && \
19+
mkdir -p dist/backend dist/static && \
20+
cp -r frontend/dist/* dist/static/ && \
21+
cp -r backend/* dist/backend/ && \
22+
cp backend/requirements.txt dist/
23+
24+
### STAGE 2: Final Image ###
25+
FROM ghcr.io/ipromknight/ubuntu:rolling
26+
27+
ARG TARGETPLATFORM
28+
ARG BUILDPLATFORM
29+
ARG VERSION
30+
ARG CHANNEL
31+
32+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
33+
34+
RUN apt-get update && \
35+
apt-get install -y git && \
36+
rm -rf /var/lib/apt/lists/*
37+
38+
WORKDIR /app
39+
40+
COPY --from=build /source/dist/backend/app ./app
41+
COPY --from=build /source/dist/static ./app/static
42+
COPY --from=build /source/dist/requirements.txt .
43+
44+
RUN uv python install 3.9
45+
46+
RUN uv venv --python 3.9 && \
47+
. .venv/bin/activate && \
48+
uv pip install --upgrade pip wheel && \
49+
uv pip install --no-cache-dir -r requirements.txt
50+
51+
LABEL org.opencontainers.image.authors="Dictionarry [email protected]"
52+
LABEL org.opencontainers.image.description="Profilarr - Profile manager for *arr apps"
53+
LABEL org.opencontainers.image.source="https://github.com/Dictionarry-Hub/profilarr"
54+
LABEL org.opencontainers.image.title="Profilarr"
55+
LABEL org.opencontainers.image.version="release"
56+
57+
EXPOSE 6868
58+
59+
COPY --chmod=0755 apps/profilarr/promknight-entrypoint.sh /promknight-entrypoint.sh

apps/profilarr/ci/goss.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
http:
3+
http://127.0.0.1:6868:
4+
status: 200

apps/profilarr/ci/latest.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
AUTH="Authorization: token ${GH_PAT:-${TOKEN:-}}"
3+
version=$(curl -sLf -H "$AUTH" https://api.github.com/repos/Dictionarry-Hub/profilarr/releases/latest | jq --raw-output '. | .tag_name')
4+
printf "%s" "${version}"

apps/profilarr/metadata.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"app": "profilarr",
3+
"base": false,
4+
"channels": [
5+
{
6+
"name": "main",
7+
"platforms": [
8+
"linux/amd64"
9+
],
10+
"stable": true,
11+
"tests": {
12+
"enabled": true,
13+
"type": "web"
14+
}
15+
}
16+
]
17+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
cat << "EOF"
6+
7+
▐▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▌
8+
▐ ▌
9+
▐ ██▓███ ██▀███ ▒█████ ███▄ ▄███▓ ██ ▄█▀ ███▄ █ ██▓ ▄████ ██░ ██ ▄▄▄█████▓ ▌
10+
▐ ▓██░ ██▒▓██ ▒ ██▒▒██▒ ██▒▓██▒▀█▀ ██▒ ██▄█▒ ██ ▀█ █ ▓██▒ ██▒ ▀█▒▓██░ ██▒▓ ██▒ ▓▒ ▌
11+
▐ ▓██░ ██▓▒▓██ ░▄█ ▒▒██░ ██▒▓██ ▓██░▓███▄░ ▓██ ▀█ ██▒▒██▒▒██░▄▄▄░▒██▀▀██░▒ ▓██░ ▒░ ▌
12+
▐ ▒██▄█▓▒ ▒▒██▀▀█▄ ▒██ ██░▒██ ▒██ ▓██ █▄ ▓██▒ ▐▌██▒░██░░▓█ ██▓░▓█ ░██ ░ ▓██▓ ░ ▌
13+
▐ ▒██▒ ░ ░░██▓ ▒██▒░ ████▓▒░▒██▒ ░██▒▒██▒ █▄▒██░ ▓██░░██░░▒▓███▀▒░▓█▒░██▓ ▒██▒ ░ ▌
14+
▐ ▒▓▒░ ░ ░░ ▒▓ ░▒▓░░ ▒░▒░▒░ ░ ▒░ ░ ░▒ ▒▒ ▓▒░ ▒░ ▒ ▒ ░▓ ░▒ ▒ ▒ ░░▒░▒ ▒ ░░ ▌
15+
▐ ░▒ ░ ░▒ ░ ▒░ ░ ▒ ▒░ ░ ░ ░░ ░▒ ▒░░ ░░ ░ ▒░ ▒ ░ ░ ░ ▒ ░▒░ ░ ░ ▌
16+
▐ ░░ ░░ ░ ░ ░ ░ ▒ ░ ░ ░ ░░ ░ ░ ░ ░ ▒ ░░ ░ ░ ░ ░░ ░ ░ ▌
17+
▐ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ▌
18+
▐ ▌
19+
▐ Profilarr ▌
20+
▐▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▌
21+
22+
EOF
23+
24+
exec \
25+
uv run gunicorn \
26+
--bind 0.0.0.0:6868 \
27+
--timeout 600 \
28+
"app.main:create_app()"

0 commit comments

Comments
 (0)