migrate notes to peninsula

This commit is contained in:
Cyryl Płotnicki 2023-09-24 06:21:44 +01:00
parent 1056fc86d8
commit 5a10e10d38
2 changed files with 12 additions and 8 deletions

View file

@ -1,14 +1,14 @@
/* globals module */
module.exports = {
httpUnsafeOrigin: 'https://notes.purrfect.estate',
httpSafeOrigin: "https://notes-sandbox.purrfect.estate",
httpUnsafeOrigin: 'https://notes.peninsula.industries',
httpSafeOrigin: "https://notes-sandbox.peninsula.industries",
httpAddress: '::',
httpPort: 3000,
httpSafePort: 3001,
adminKeys: [
"[cyplo@notes.purrfect.estate/Ii+Y2Z5ZDAN2fFpAEQu93SDjQcWkSfY7eaSvhCJedX8=]",
"[cyplo@notes.peninsula.industries/Ii+Y2Z5ZDAN2fFpAEQu93SDjQcWkSfY7eaSvhCJedX8=]",
],
/* =====================

View file

@ -4,15 +4,19 @@
inputs,
lib,
...
}: {
}: let
baseDomain = "peninsula.industries";
domain = "notes.${baseDomain}";
sandboxDomain = "notes-sandbox.${baseDomain}";
in {
imports = [../nginx.nix];
services.nginx = {
virtualHosts = {
"notes.purrfect.estate" = {
"${domain}" = {
forceSSL = true;
enableACME = true;
serverAliases = ["notes-sandbox.purrfect.estate"];
serverAliases = ["${sandboxDomain}"];
locations."/" = {
proxyPass = "http://127.0.0.1:9005";
proxyWebsockets = true;
@ -32,8 +36,8 @@
"cryptpad_data_files:/cryptpad/datastore"
];
environment = {
CPAD_MAIN_DOMAIN = "notes.purrfect.estate";
CPAD_SANDBOX_DOMAIN = "notes-sandbox.purrfect.estate";
CPAD_MAIN_DOMAIN = domain;
CPAD_SANDBOX_DOMAIN = sandboxDomain;
CPAD_REALIP_HEADER = "X-Forwarded-For";
CPAD_REALIP_RECURSIVE = "on";
CPAD_TRUSTED_PROXY = "0.0.0.0/0";