alex
31226a03d2
A new major release 5.0.0 at https://github.com/xwiki-labs/cryptpad/releases/tag/5.0.0 |
2 years ago | |
---|---|---|
cryptpad | 2 years ago | |
customize | 3 years ago | |
tools | 3 years ago | |
.dockerignore | 3 years ago | |
.gitignore | 3 years ago | |
Containerfile | 3 years ago | |
config.js | 3 years ago | |
nginx.conf | 3 years ago | |
readme.md | 3 years ago |
readme.md
A custom self-hosted instance of CryptPad for qcode infra, accessible at https://cryptpad.qcode.ch.
The upstream code lives in the cryptpad sub directory. This is placed as a git subtree, not to be confused with submodule. To customize functionality or look&feel, copy a file from cryptpad/customize.dist into customize and change it. The file will be served in place of the original dist.
See upstream docs for customization details.
Updating from upstream
Check the current status of the local cryptpad copy with:
git log cryptpad
Then go to https://github.com/xwiki-labs/cryptpad/commits/main and check where the upstream is at.
To update local copy with upstream changes, use tools/pull-cryptpad-upstream.sh script. For example, to pull up to an imaginary release tag xyz, execute:
./tools/pull-cryptpad-upstream.sh xyz
It'll fetch from upstream and add new commits as if they were part of this repo.
Finally, git push
to update this repo's remote.
If instead you want to make a pull request, first create a branch. Something like
git checkout -b upstream-update-xyz master
should do. Then execute the above
script and send the branch as a pull request.
For the record, initial subtree merge from upstream was done with the following command:
git subtree add -P cryptpad https://github.com/xwiki-labs/cryptpad.git 4.14.0
Contributing to upstream
You'll probably want to have a separate repository, cloned directly from the
upstream https://github.com/xwiki-labs/cryptpad.git
. Since this repo's
cryptpad dir is a copy of the upstream repo, it should be very easy to apply
changes to both using patch files and git apply
or patch
commands.
See details on how to contribute in the upstream docs.
Dev environment
To start a local dev instance, forget about the files in the root of this repo and simply work in the cryptpad sub directory. In other words, follow upstream dev guide.
When done, a git diff
will show some changes. Those in the cryptpad/
sub
directory should go to upstream. Anything else, notably the customize
directory, lives in this repo.
Production instance
To build for prod deployment, you'll need podman. Create prod build artifacts manually with:
./tools/build-prod.sh
The script creates few files in the build
directory. Notably, the two files
required for prod deployment are:
cryptpad-container-img-<git-commit-hash>.tar.gz
: container file with the nodejs servercryptpad-static-<git-commit-hash>.tar.gz
: static files served by nginx frontend
Copy both files to production machines. The cryptpad-container-img.tar.gz
can
be loaded on the machine with:
podman load path/to/cryptpad-container-img.tar.gz
Unpack the static files into a temp dir and sync with the prod dir:
rsync -rl --chown root:root --delete-after tmpdir/ path/to/proddir/
There are also a couple of config files, config.js
and nginx.conf
, in the root
of this repo. These are production configs and will eventually move to
another location with all the other prod infra configs.
All the manual steps described above will disappear once a central prod infra is in place.