deploy grist
This commit is contained in:
parent
33b33196ff
commit
e16116720d
13 changed files with 66 additions and 229 deletions
|
@ -53,7 +53,6 @@
|
|||
exposes = {
|
||||
www.domain = "0x76.dev";
|
||||
flux.domain = "flux.0x76.dev";
|
||||
o2p.domain = "o2p.0x76.dev";
|
||||
internal.domain = "internal.xirion.net";
|
||||
blog.domain = "blog.xirion.net";
|
||||
};
|
||||
|
@ -61,9 +60,15 @@
|
|||
"dex" = {
|
||||
ip = "10.42.42.11";
|
||||
mac = "AE:66:7B:FA:15:72";
|
||||
exposes.dex = {
|
||||
domain = "dex.0x76.dev";
|
||||
port = 5556;
|
||||
exposes = {
|
||||
dex = {
|
||||
domain = "dex.0x76.dev";
|
||||
port = 5556;
|
||||
};
|
||||
o2p_proxy = {
|
||||
domain = "o2p.0x76.dev";
|
||||
port = 8484;
|
||||
};
|
||||
};
|
||||
};
|
||||
"WoolooTV" = {
|
||||
|
@ -151,7 +156,14 @@
|
|||
ip = "10.42.42.25";
|
||||
mac = "1E:ED:97:2C:C3:9D";
|
||||
};
|
||||
# 10.42.42.26
|
||||
"grist" = {
|
||||
ip = "10.42.42.26";
|
||||
mac = "B2:AA:AB:5D:2F:22";
|
||||
exposes.grist = {
|
||||
domain = "grist.0x76.dev";
|
||||
port = 8484;
|
||||
};
|
||||
};
|
||||
"bookwyrm" = {
|
||||
ip = "10.42.42.27";
|
||||
mac = "9E:8A:6C:39:27:DE";
|
||||
|
|
|
@ -23,6 +23,8 @@ in {
|
|||
networking.firewall.allowedTCPPorts = [ port metricsPort ];
|
||||
|
||||
vault-secrets.secrets.dex = { };
|
||||
vault-secrets.secrets.oauth2_proxy = { };
|
||||
|
||||
services = {
|
||||
|
||||
postgresql = {
|
||||
|
@ -91,24 +93,15 @@ in {
|
|||
secretEnv = "FLUX_CLIENT_SECRET";
|
||||
}
|
||||
{
|
||||
id = "oauth2-proxy";
|
||||
name = "OAuth2 Proxy";
|
||||
redirectURIs = [ "https://o2p.0x76.dev/oauth2/callback" ];
|
||||
secretEnv = "O2P_CLIENT_SECRET";
|
||||
id = "grist";
|
||||
name = "grist";
|
||||
redirectURIs = [ "https://grist.0x76.dev/oauth2/callback" ];
|
||||
secretEnv = "GRIST_CLIENT_SECRET";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
environmentFile = "${vs.dex}/environment";
|
||||
};
|
||||
|
||||
oauth2_proxy = {
|
||||
enable = true;
|
||||
provider = "oidc";
|
||||
redirectURL = "https://o2p.0x76.dev/oauth2/callback";
|
||||
cookie.secure = false;
|
||||
httpAddress = "0.0.0.0:4180";
|
||||
keyFile = "";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
42
nixos/hosts/olympus/grist/configuration.nix
Normal file
42
nixos/hosts/olympus/grist/configuration.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, ... }:
|
||||
let vs = config.vault-secrets.secrets;
|
||||
in {
|
||||
imports = [ ];
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
networking.firewall.allowedTCPPorts = [ 8484 ];
|
||||
|
||||
virtualisation.podman.enable = true;
|
||||
virtualisation.oci-containers.backend = "podman";
|
||||
|
||||
vault-secrets.secrets.grist = {
|
||||
quoteEnvironmentValues = false; # Needed for docker
|
||||
services = [ "podman-grist" ];
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers.grist = {
|
||||
image = "gristlabs/grist:latest";
|
||||
environment = {
|
||||
APP_HOME_URL = "https://grist.0x76.dev";
|
||||
GRIST_SUPPORT_ANON = "false";
|
||||
PYTHON_VERSION = "3";
|
||||
PYTHON_VERSION_ON_CREATION = "3";
|
||||
|
||||
# Beta OIDC support
|
||||
GRIST_OIDC_IDP_ISSUER = "https://dex.0x76.dev";
|
||||
};
|
||||
environmentFiles = [ "${vs.grist}/environment" ];
|
||||
ports = [ "8484:8484" ];
|
||||
volumes = [ "/var/lib/grist:/persist" ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue