Arion: Add mollysocket

This commit is contained in:
GHOSCHT 2024-03-07 16:47:08 +01:00
parent f807e11b6c
commit 6a3dc93ed1
Signed by: ghoscht
GPG key ID: 2C2C1C62A5388E82
3 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,44 @@
{pkgs, ...}: {
project.name = "signal";
networks.dmz = {
name = "dmz";
external = true;
};
services = {
mollysocket.service = {
image = "ghcr.io/mollyim/mollysocket:latest";
container_name = "mollysocket";
useHostStore = true;
ports = [
"8020:8020"
];
command = "server";
working_dir = "/data";
labels = {
"traefik.enable" = "true";
"traefik.http.routers.mollysocket.rule" = "Host(`signal.ghoscht.com`)";
"traefik.http.routers.mollysocket.entrypoints" = "websecure";
"traefik.http.services.mollysocket.loadbalancer.server.port" = "8020";
"traefik.http.routers.mollysocket.tls" = "true";
"traefik.http.routers.mollysocket.tls.certresolver" = "letsencrypt";
};
volumes = [
"/home/ghoscht/.docker/signal/mollysocket_data:/data"
];
environment = {
MOLLY_DB = "/data/mollysocket.db";
MOLLY_ALLOWED_ENDPOINTS = "['https://push.ghoscht.com','*]";
MOLLY_ALLOWED_UUIDS = "['*']";
MOLLY_HOST = "0.0.0.0";
MOLLY_PORT = 8020;
RUST_LOG = "info";
};
restart = "always";
networks = [
"dmz"
];
};
};
}

View file

@ -0,0 +1,6 @@
# Instead of pinning Nixpkgs, we can opt to use the one in NIX_PATH
import <nixpkgs> {
# We specify the architecture explicitly. Use a Linux remote builder when
# calling arion from other platforms.
system = "x86_64-linux";
}

View file

@ -0,0 +1,7 @@
{config, ...}: {
virtualisation.arion = {
projects.infrastructure.settings = {
imports = [./arion-compose.nix];
};
};
}