Unverified Commit 320f897d authored by Cabia Rangris's avatar Cabia Rangris Committed by GitHub
Browse files

outline: 0.87.3 -> 0.87.4 (#444287)

parents 38d19f79 5daa3ed0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -702,7 +702,6 @@ in
            FORCE_HTTPS = builtins.toString cfg.forceHttps;
            ENABLE_UPDATES = builtins.toString cfg.enableUpdateCheck;
            WEB_CONCURRENCY = builtins.toString cfg.concurrency;
            MAXIMUM_IMPORT_SIZE = builtins.toString cfg.maximumImportSize;
            DEBUG = cfg.debugOutput;
            GOOGLE_ANALYTICS_ID = lib.optionalString (cfg.googleAnalyticsId != null) cfg.googleAnalyticsId;
            SENTRY_DSN = lib.optionalString (cfg.sentryDsn != null) cfg.sentryDsn;
@@ -715,6 +714,7 @@ in
            RATE_LIMITER_DURATION_WINDOW = builtins.toString cfg.rateLimiter.durationWindow;

            FILE_STORAGE = cfg.storage.storageType;
            FILE_STORAGE_IMPORT_MAX_SIZE = builtins.toString cfg.maximumImportSize;
            FILE_STORAGE_UPLOAD_MAX_SIZE = builtins.toString cfg.storage.uploadMaxSize;
            FILE_STORAGE_LOCAL_ROOT_DIR = cfg.storage.localRootDir;
          }
+10 −39
Original line number Diff line number Diff line
{ pkgs, lib, ... }:
let
  accessKey = "BKIKJAA5BMMU2RHO6IBB";
  secretKey = "V7f1CwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr12";
  secretKeyFile = pkgs.writeText "outline-secret-key" ''
    ${secretKey}
  '';
  rootCredentialsFile = pkgs.writeText "minio-credentials-full" ''
    MINIO_ROOT_USER=${accessKey}
    MINIO_ROOT_PASSWORD=${secretKey}
  '';
in
{ lib, ... }:
{
  name = "outline";

@@ -17,37 +6,19 @@ in

  node.pkgsReadOnly = false;

  nodes.outline =
    { pkgs, config, ... }:
    {
  nodes.outline = {
    virtualisation.memorySize = 2 * 1024;
    nixpkgs.config.allowUnfree = true;
      environment.systemPackages = [ pkgs.minio-client ];
    services.outline = {
      enable = true;
      forceHttps = false;
      storage = {
          inherit accessKey secretKeyFile;
          uploadBucketUrl = "http://localhost:9000";
          uploadBucketName = "outline";
          region = config.services.minio.region;
        storageType = "local";
      };
    };
      services.minio = {
        enable = true;
        inherit rootCredentialsFile;
      };
  };

  testScript = ''
    machine.wait_for_unit("minio.service")
    machine.wait_for_open_port(9000)

    # Create a test bucket on the server
    machine.succeed(
        "mc alias set minio http://localhost:9000 ${accessKey} ${secretKey} --api s3v4"
    )
    machine.succeed("mc mb minio/outline")

    outline.wait_for_unit("outline.service")
    outline.wait_for_open_port(3000)
    outline.succeed("curl --fail http://localhost:3000/")
+3 −3
Original line number Diff line number Diff line
@@ -14,13 +14,13 @@

stdenv.mkDerivation rec {
  pname = "outline";
  version = "0.87.3";
  version = "0.87.4";

  src = fetchFromGitHub {
    owner = "outline";
    repo = "outline";
    rev = "v${version}";
    hash = "sha256-hayA8zYSl4PFRlsK6n2881eef2J9Oy3FhiMFgdFgONY=";
    hash = "sha256-gsQPDbKTzsXV8y8/xMxmhJM6pI+zDkx/r1Zk83ixb7k=";
  };

  nativeBuildInputs = [
@@ -35,7 +35,7 @@ stdenv.mkDerivation rec {

  yarnOfflineCache = fetchYarnDeps {
    yarnLock = "${src}/yarn.lock";
    hash = "sha256-1u9/I1H2BsUS5qPwNAdCrug3ekCTyWHd60kR9FXugV0=";
    hash = "sha256-/bWDFIGElBc1lMODKTxmSkal9c4L1iTPd521/DVYyxo=";
  };

  configurePhase = ''