Compare commits

...

4 Commits

Author SHA1 Message Date
75c90c4511 WIP: TiTiler config. 2024-10-01 19:53:25 +01:00
d717104a8b Add TCP proxy for NTRIP. 2024-09-27 21:07:38 +01:00
28182852fc Fix formatting. 2024-09-25 15:13:18 +01:00
855850196f Fix formatting. 2024-09-25 15:11:56 +01:00
9 changed files with 380 additions and 325 deletions

View File

@@ -17,14 +17,12 @@ in
fileSystems."/data/media" = { fileSystems."/data/media" = {
device = "//fractal/media"; device = "//fractal/media";
fsType = "cifs"; fsType = "cifs";
options = options = [ "${automount_opts},credentials=/etc/nixos/smb-secrets" ];
[ "${automount_opts},credentials=/etc/nixos/smb-secrets" ];
}; };
fileSystems."/data/shared" = { fileSystems."/data/shared" = {
device = "//fractal/shared"; device = "//fractal/shared";
fsType = "cifs"; fsType = "cifs";
options = options = [ "${automount_opts},credentials=/etc/nixos/smb-secrets" ];
[ "${automount_opts},credentials=/etc/nixos/smb-secrets" ];
}; };
} }

View File

@@ -1,8 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
environment.systemPackages = [ environment.systemPackages = [ pkgs.kopia ];
pkgs.kopia
];
# systemd = { # systemd = {
# services = { # services = {

View File

@@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
with lib; with lib;
let let
cfg = config.custom.tailscale; cfg = config.custom.tailscale;

View File

@@ -1,4 +1,10 @@
{ pkgs, inputs, lib, config, ... }: {
pkgs,
inputs,
lib,
config,
...
}:
let let
cfg = config.custom.impermanence; cfg = config.custom.impermanence;
in in

View File

@@ -6,7 +6,5 @@
]; ];
networking.hostName = "kopia"; networking.hostName = "kopia";
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [ kopia ];
kopia
];
} }

44
services/titiler.hcl Normal file
View File

@@ -0,0 +1,44 @@
job "titiler" {
datacenters = ["alo"]
group "web" {
network {
port "http" {
to = 8000
}
}
task "server" {
driver = "docker"
config {
image = "ghcr.io/developmentseed/titiler:latest"
ports = ["http"]
volumes = [
"/data/shared/alo_gis/drone_images:/data:ro",
]
}
env {
PORT = "8000"
WORKERS_PER_CORE = "1"
}
service {
name = "titiler"
port = "http"
tags = [
"traefik.enable=true",
"traefik.http.routers.titiler.entryPoints=websecure",
#"traefik.http.routers.titiler.middlewares=authentik@file",
]
}
resources {
cpu = 1000
memory = 1000
}
}
}
}

View File

@@ -12,6 +12,9 @@ job "traefik" {
port "ssh" { port "ssh" {
static = "2222" static = "2222"
} }
port "ntrip" {
static = "2101"
}
port "admin" { port "admin" {
#host_network = "tailscale" #host_network = "tailscale"
static = "9002" static = "9002"
@@ -55,7 +58,7 @@ job "traefik" {
config { config {
image = "traefik:latest" image = "traefik:latest"
ports = ["http", "https", "admin", "http4proxy"] ports = ["http", "https", "admin", "http4proxy", "ssh", "ntrip"]
network_mode = "host" network_mode = "host"
volumes = [ volumes = [
"local/traefik.yml:/etc/traefik/traefik.yml", "local/traefik.yml:/etc/traefik/traefik.yml",
@@ -131,6 +134,9 @@ entryPoints:
ssh: ssh:
address: ":{{{ env "NOMAD_PORT_ssh" }}}" address: ":{{{ env "NOMAD_PORT_ssh" }}}"
ntrip:
address: ":{{{ env "NOMAD_PORT_ntrip" }}}"
EOH EOH
destination = "local/traefik.yml" destination = "local/traefik.yml"
change_mode = "noop" change_mode = "noop"