... | ... | @@ -71,11 +71,41 @@ next people can start from your changes: |
|
|
|
|
|
## Disaster recovery
|
|
|
|
|
|
<!-- what to do if all goes to hell. e.g. restore from backups? -->
|
|
|
<!-- rebuild from scratch? not necessarily those procedures (e.g. see -->
|
|
|
<!-- "Installation" below but some pointers. -->
|
|
|
It should be possible to deploy the static website anywhere that
|
|
|
supports plain HTML, assuming you have a copy of the git repository.
|
|
|
|
|
|
TODO: contingencies when/if the normal system is down
|
|
|
The instructions below asssume you have a copy of the git repository
|
|
|
(currently
|
|
|
<https://gitlab.torproject.org/tpo/tpa/status-site.git>). If not, you
|
|
|
could start from scratch using [the example repository](https://github.com/cstate/example) as well.
|
|
|
|
|
|
From here on, it is assumed you have a copy of the git repository (or
|
|
|
the example one).
|
|
|
|
|
|
Those procedures were not tested.
|
|
|
|
|
|
### Netlify deployment
|
|
|
|
|
|
Upstream has instructions to [deploy to Netlify](https://github.com/cstate/cstate#-netlify-and-netlify-cms), which, in our
|
|
|
case, might be as simple as [following this link](https://app.netlify.com/start/deploy?repository=https://gitlab.torproject.org/tpo/tpa/status-site.git) and filling in
|
|
|
those settings:
|
|
|
|
|
|
* Build command: `hugo`
|
|
|
* Publish directory: `public`
|
|
|
* Add one build environment variable
|
|
|
* Key: `HUGO_VERSION`
|
|
|
* Value: `0.48` (or later)
|
|
|
|
|
|
Then, of course, DNS needs to be updated to point there.
|
|
|
|
|
|
### GitLab pages deployment
|
|
|
|
|
|
A site could also be deployed on *another* GitLab server with "GitLab
|
|
|
pages" enabled. For example, if the repository is pushed to
|
|
|
https://gitlab.com/, the GitLab CI/CD system there will automatically
|
|
|
pick it up and publish it.
|
|
|
|
|
|
Then DNS needs to be tweaked to point there as well.
|
|
|
|
|
|
# Reference
|
|
|
|
... | ... | @@ -84,13 +114,16 @@ TODO: contingencies when/if the normal system is down |
|
|
The basic setup for cstate is:
|
|
|
|
|
|
sudo apt install hugo
|
|
|
git clone --recursive -b master https://github.com/cstate/example.git
|
|
|
cd example
|
|
|
hugo serve
|
|
|
git clone --recursive -b master https://gitlab.torproject.org/tpo/tpa/status-site.git
|
|
|
cd status-site
|
|
|
hugo
|
|
|
|
|
|
This will build a copy of the status site in `public/`. To view it in
|
|
|
your web browser, for example:
|
|
|
|
|
|
firefox public/index.html
|
|
|
|
|
|
This will serve a copy of the example website on localhost. Obviously,
|
|
|
this will be a different URL for our repository. Most configuration
|
|
|
happens in `config.yaml`.
|
|
|
Most configuration happens in `config.yaml`.
|
|
|
|
|
|
## SLA
|
|
|
|
... | ... | |