From 133f94da46f319bebf1ce66958b4bc716a5679ff Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Sat, 15 Apr 2023 19:01:10 -0500 Subject: [PATCH] update to 2.8.1 --- .drone.yml | 2 +- Dockerfile | 2 +- flake.nix | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 flake.nix diff --git a/.drone.yml b/.drone.yml index d0de1f9..c2c29a0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -19,7 +19,7 @@ steps: image: plugins/kaniko settings: build_args: - - VERSION=2.2.1 + - VERSION=2.8.1 repo: r.ocj.io/network/healthchecks registry: r.ocj.io username: diff --git a/Dockerfile b/Dockerfile index 6ebc694..fde07b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.10 +FROM python:3.11 ARG VERSION diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..806b954 --- /dev/null +++ b/flake.nix @@ -0,0 +1,71 @@ +{ + description = "Healthchecks"; + + inputs = { + nixpkgs = { + url = "nixpkgs/nixos-22.11"; + }; + }; + + outputs = { self, nixpkgs }@inputs: + let + system = "x86_64-linux"; + pkgs = import nixpkgs { + inherit system; + overlays = [ + ( + self: super: { + # sonarr = super.sonarr.overrideAttrs ( + # old: + # let + # version = "3.0.10.1567"; + # sha256 = "sha256-6zdp/Bg+9pcrElW5neB+BC16Vn1VhTjhMRRIxGrKhxc="; + # in + # { + # inherit version; + # src = pkgs.fetchurl { + # url = "https://download.sonarr.tv/v3/main/${version}/Sonarr.main.${version}.linux.tar.gz"; + # sha256 = sha256; + # }; + # } + # ); + } + ) + ]; + }; + + in + { + packages.${system}.smtpd = pkgs.dockerTools.buildLayeredImage + { + name = "healthchecks-smtpd"; + tag = "latest"; + maxLayers = 2; + copyToRoot = pkgs.buildEnv { + name = "image-root"; + pathsToLink = [ "/" ]; + paths = [ + pkgs.healthchecks + ]; + }; + config = { + Cmd = [ + "${pkgs.sonarr}/bin/NzbDrone" + "-nobrowser" + "-data=/config" + ]; + User = "5000:5000"; + ExposedPorts = { + "8989/tcp" = { }; + }; + Volumes = { + "/config" = { }; + }; + Env = [ + "LANG=en_US.UTF-8" + "SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" + ]; + }; + }; + }; +}