first
Some checks failed
continuous-integration/drone Build is failing

This commit is contained in:
Jeffrey C. Ollie 2022-05-27 20:43:00 -05:00
commit 2bcd499ebb
4 changed files with 142 additions and 0 deletions

39
.drone.yml Normal file
View File

@ -0,0 +1,39 @@
---
kind: secret
name: local_username
get:
path: local
name: username
---
kind: secret
name: local_password
get:
path: local
name: password
---
kind: pipeline
type: kubernetes
name: publish
steps:
- name: tags
image: docker.io/library/busybox
pull: always
commands:
- echo -n "latest,${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:8}" > .tags
- name: build
image: docker.io/nixos/nix
pull: always
commands:
- nix --experimental-features "nix-command flakes" build .#
- cp result docker-image.tar.gz
- name: push
image: docker.io/allgreed/drone-load-and-store
pull: always
settings:
archive: docker-image.tar.gz
repo: media/radarr
registry: r.ocj.io
username:
from_secret: local_username
password:
from_secret: local_password

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/result

26
flake.lock Normal file
View File

@ -0,0 +1,26 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1653407748,
"narHash": "sha256-g9puJaILRTb9ttlLQ7IehpV7Wcy0n+vs8LOFu6ylQcM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5ce6597eca7d7b518c03ecda57d45f9404b5e060",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

76
flake.nix Normal file
View File

@ -0,0 +1,76 @@
{
description = "Radarr";
inputs = {
nixpkgs = {
url = "nixpkgs/nixos-unstable";
};
};
outputs = { self, nixpkgs }@inputs:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
overlays = [
(
self: super:
{
radarr =
let
version = "4.1.0.6175";
os = "linux";
arch = "x64";
in
super.radarr.overrideAttrs (old: {
inherit version;
src = builtins.fetchurl {
url = "https://github.com/Radarr/Radarr/releases/download/v${version}/Radarr.master.${version}.${os}-core-${arch}.tar.gz";
sha256 = "sha256:0b3kb7wrh3s3kr5phb2f8flzchnj19i95dd434gdzi551w34536y";
};
});
}
)
];
};
in
{
packages.${system}.default = pkgs.dockerTools.buildImage
{
name = "radarr";
tag = "latest";
contents = [
pkgs.cacert
pkgs.coreutils-full
pkgs.bash
pkgs.radarr
pkgs.util-linux
];
runAsRoot = ''
mkdir /config
mkdir /media
chown 5000:5000 /config
chown 5000:5000 /media
'';
config = {
Cmd = [
"${pkgs.radarr}/bin/Radarr"
"-nobrowser"
"-data=/config"
];
User = "5000:5000";
Env = [
"COMPlus_EnableDiagnostics=0"
"XDG_CONFIG_HOME=/config/xdg"
];
ExposedPorts = {
"7878/tcp" = { };
};
Volumes = {
"/config" = { };
"/media" = { };
};
};
};
};
}