Commit 90e70ef5 authored by Profpatsch's avatar Profpatsch

containers: add hbci payment processor docker image

Also makes `createStandaloneDockerImage`s `rootSetupScript` argument optional.
parent 3127d7c3
......@@ -9,6 +9,7 @@ let
./postgres.nix
./rabbitmq.nix
./sangha-api.nix
./payment-processor-hbci.nix
];
config = {
......@@ -16,12 +17,14 @@ let
org.techcultivation.deploy.database.dockerImage.enable = true;
org.techcultivation.deploy.queue.dockerImage.enable = true;
org.techcultivation.deploy.api.dockerImage.enable = true;
org.techcultivation.deploy.paymentProcessorHbci.dockerImage.enable = true;
# our own packages
nixpkgs.overlays = [(self: _: {
sangha = self.callPackage ../packages/sangha {};
payment-processor-hbci = self.callPackage ../packages/payment-processor-hbci {};
# lots of small and big helper functions
helpers = (lib.mapAttrs (_: pkg: self.callPackage pkg {}) {
genUtf8Localedb = ./helpers/gen-utf8-localedb.nix;
postgresTemplate = ./helpers/postgres-template.nix;
......@@ -77,7 +80,7 @@ let
in {
pkgs = {
inherit (pkgs) sangha payment-processor-hbci helpers;
inherit (pkgs) sangha payment-processor-hbci;
inherit sanghaPostgresTemplate;
};
downloads.dockerImages.sangha = lib.mapAttrs (lib.const buildHydraDockerImage) {
......@@ -85,6 +88,7 @@ in {
postgresDev = evalDev.config.generated.dockerImages.sanghaPostgres;
rabbitmq = evalDeploy.config.generated.dockerImages.sanghaRabbitmq;
api = evalDeploy.config.generated.dockerImages.sanghaApi;
paymentProcessorHbci = evalDeploy.config.generated.dockerImages.sanghaPaymentProcessorHbci;
};
# FIXME: evalDev is implicitely needed, otherwise the test
# doesn’t get the mock database.
......
......@@ -10,7 +10,7 @@
, config
, description
# like runAsRoot, but the base setup is already done
, rootSetupScript
, rootSetupScript ? ""
# Add an init process as entry point that reaps zombie processes.
# See https://github.com/krallin/tini
# and https://github.com/docker-library/official-images#init
......
{ lib, pkgs, config, ... }:
let
cfg = config.org.techcultivation.deploy.paymentProcessorHbci;
in {
options.org.techcultivation.deploy.paymentProcessorHbci = {
dockerImage.enable = lib.mkEnableOption "sangha hbci payment processor docker image";
};
config = lib.mkIf cfg.dockerImage.enable {
generated.dockerImages.sanghaPaymentProcessorHbci =
pkgs.helpers.createStandaloneDockerImage {
name = "sangha-payment-processor-hbci";
tag = "deployment";
description = "TODO";
contents = [
pkgs.payment-processor-hbci
];
config = {
User = "payment-processor-hbci";
Cmd = [ "/bin/hbci" ];
};
};
};
}
......@@ -23,9 +23,6 @@ in {
Cmd = [ "/bin/sangha" ];
ExposedPorts."${toString 9991}/tcp" = {};
};
rootSetupScript = "";
};
};
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment