DEVELOPMENT ENVIRONMENT

~liljamo/nix-arta

679df0fb1cdf4099650698c724a704e9846ab59a — Jonni Liljamo a month ago 6e56327
feat: host websites on oci instead of old portainer
M systems/hosts/oci/default.nix => systems/hosts/oci/default.nix +4 -0
@@ 2,6 2,10 @@
  registryPort = 5000;
  registryUIPort = 5080;
in {
  imports = [
    ./websites.nix
  ];

  networking.firewall.allowedTCPPorts = [
    registryPort
    registryUIPort

A systems/hosts/oci/websites.nix => systems/hosts/oci/websites.nix +31 -0
@@ 0,0 1,31 @@
{...}: let
  comPort = 8080;
  devPort = 8081;
in {
  networking.firewall.allowedTCPPorts = [
    comPort
    devPort
  ];

  virtualisation.oci-containers.containers."liljamo-com-zola" = {
    image = "localhost:5000/liljamo/liljamo-com-zola:latest";
    extraOptions = [
      "--tls-verify=false"
    ];
    hostname = "liljamo-com-zola";
    ports = [
      "${toString comPort}:80"
    ];
  };

  virtualisation.oci-containers.containers."liljamo-dev-zola" = {
    image = "localhost:5000/liljamo/liljamo-dev-zola:latest";
    hostname = "liljamo-dev-zola";
    extraOptions = [
      "--tls-verify=false"
    ];
    ports = [
      "${toString devPort}:80"
    ];
  };
}

M systems/hosts/proxy/haproxy.conf => systems/hosts/proxy/haproxy.conf +2 -2
@@ 60,7 60,7 @@ backend be_caddy-https

# liljamo.com
backend be_liljamocom
  server liljamocom 10.1.1.10:8100
  server liljamocom 10.1.2.9:8080

backend be_liljamocom_webfinger
  server liljamocomwebfinger 10.1.2.12:80


@@ 96,7 96,7 @@ backend be_lothlorien_matrix

# liljamo.dev
backend be_liljamodev
  server liljamodev 10.1.1.10:8110
  server liljamodev 10.1.2.9:8081

backend be_registry
  server registry 10.1.1.10:5000