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 */ /* globals module */
module.exports = { module.exports = {
httpUnsafeOrigin: 'https://notes.purrfect.estate', httpUnsafeOrigin: 'https://notes.peninsula.industries',
httpSafeOrigin: "https://notes-sandbox.purrfect.estate", httpSafeOrigin: "https://notes-sandbox.peninsula.industries",
httpAddress: '::', httpAddress: '::',
httpPort: 3000, httpPort: 3000,
httpSafePort: 3001, httpSafePort: 3001,
adminKeys: [ adminKeys: [
"[cyplo@notes.purrfect.estate/Ii+Y2Z5ZDAN2fFpAEQu93SDjQcWkSfY7eaSvhCJedX8=]", "[cyplo@notes.peninsula.industries/Ii+Y2Z5ZDAN2fFpAEQu93SDjQcWkSfY7eaSvhCJedX8=]",
], ],
/* ===================== /* =====================

View file

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