diff --git a/cluster/prod/app/cryptpad/build/README.md b/cluster/prod/app/cryptpad/build/README.md index 13c6ea2..f97fce4 100644 --- a/cluster/prod/app/cryptpad/build/README.md +++ b/cluster/prod/app/cryptpad/build/README.md @@ -1,6 +1,24 @@ # CryptPad for NixOS with Deuxfleurs flavour -## Building +## Basic Usage + +### Building + +To build and load the Docker image used in our Deuxfleurs deployment, run: + +``` shell +docker load -i $(nix-build deuxfleurs.nix -A docker) +``` + +### Updating Cryptpad to a newer version + +- Check whether the cryptpad build instructions and the `install-onlyoffice.sh` + script has changed. If yes, then update `default.nix` accordingly. +- In `default.nix`, update the `version` field for cryptpad +- In `default.nix`, change the hash (any change works) of the release and `npmDepsHash` to trigger a rebuild +- Run `nix-build deuxfleurs.nix`. This will fail because the hashes have changed, but tell you the correct hash to insert in `default.nix`. + +## More info The `default.nix` file follows the nixpkgs `callPackage` convention for fetching dependencies, so you need to either: diff --git a/cluster/prod/app/cryptpad/build/default.nix b/cluster/prod/app/cryptpad/build/default.nix index 458253a..fffbd91 100644 --- a/cluster/prod/app/cryptpad/build/default.nix +++ b/cluster/prod/app/cryptpad/build/default.nix @@ -71,16 +71,16 @@ }); in buildNpmPackage rec { pname = "cryptpad"; - version = "2024.9.0"; + version = "2024.12.0"; src = fetchFromGitHub { owner = "cryptpad"; repo = "cryptpad"; rev = version; - hash = "sha256-OUtWaDVLRUbKS0apwY0aNq4MalGFv+fH9VA7LvWWYRs="; + hash = "sha256-oSrDajaCEc7I2AsDzKoO34ffd4OeXDwFDGm45yQDSvE="; }; - npmDepsHash = "sha256-pK0b7q1kJja9l8ANwudbfo3jpldwuO56kuulS8X9A5s="; + npmDepsHash = "sha256-1EwxAe+8FOrngZx5+FEeu9uHKWZNBpsECEGrsyiZ2GU="; inherit nodejs; diff --git a/cluster/prod/app/cryptpad/build/npins/sources.json b/cluster/prod/app/cryptpad/build/npins/sources.json index 3372fd0..1f513ad 100644 --- a/cluster/prod/app/cryptpad/build/npins/sources.json +++ b/cluster/prod/app/cryptpad/build/npins/sources.json @@ -3,8 +3,8 @@ "nixpkgs": { "type": "Channel", "name": "nixos-24.05", - "url": "https://releases.nixos.org/nixos/24.05/nixos-24.05.5385.1719f27dd95f/nixexprs.tar.xz", - "hash": "0f7i315g1z8kjh10hvj2zv7y2vfqxmwvd96hwlcrr8aig6qq5gzm" + "url": "https://releases.nixos.org/nixos/24.05/nixos-24.05.7376.b134951a4c9f/nixexprs.tar.xz", + "hash": "1f8j7fh0nl4qmqlxn6lis8zf7dnckm6jri4rwmj0qm1qivhr58lv" } }, "version": 3 diff --git a/cluster/prod/app/cryptpad/build_docker/README.md b/cluster/prod/app/cryptpad/build_docker/README.md new file mode 100644 index 0000000..03e11bb --- /dev/null +++ b/cluster/prod/app/cryptpad/build_docker/README.md @@ -0,0 +1,4 @@ +# Dockerfile for Cryptpad + +This was an experiment but is not used or maintained currently. +The docker image we use is the one build using nix; see the `build/` directory. diff --git a/cluster/prod/app/cryptpad/deploy/cryptpad.hcl b/cluster/prod/app/cryptpad/deploy/cryptpad.hcl index 8ea8b5d..5e19919 100644 --- a/cluster/prod/app/cryptpad/deploy/cryptpad.hcl +++ b/cluster/prod/app/cryptpad/deploy/cryptpad.hcl @@ -26,7 +26,7 @@ job "cryptpad" { } config { - image = "kokakiwi/cryptpad:2024.9.0" + image = "armael/cryptpad:2024.12.0" ports = [ "http" ] volumes = [ diff --git a/cluster/staging/app/cryptpad/deploy/cryptpad.hcl b/cluster/staging/app/cryptpad/deploy/cryptpad.hcl index 5cda46e..0948798 100644 --- a/cluster/staging/app/cryptpad/deploy/cryptpad.hcl +++ b/cluster/staging/app/cryptpad/deploy/cryptpad.hcl @@ -26,7 +26,7 @@ job "cryptpad" { } config { - image = "kokakiwi/cryptpad:2024.9.0" + image = "armael/cryptpad:2024.12.0" ports = [ "http" ] volumes = [