Commit d19b9379 authored by Mitchell Monahan's avatar Mitchell Monahan
Browse files

Switch to docsify

parent aa607a0e
Pipeline #120 passed with stage
in 27 seconds
image: python:alpine
before_script:
- apk update
- apk add build-base
- pip install mkdocs
# Add your custom theme if not inside a theme_dir
# (https://github.com/mkdocs/mkdocs/wiki/MkDocs-Themes)
# - pip install mkdocs-material
pages:
stage: deploy
script:
- mkdocs build
- mv site public
- mkdir .public
- cp -r * .public
- mv .public public
artifacts:
paths:
- public
only:
- master
- master
\ No newline at end of file
![Build Status](https://gitlab.com/pages/mkdocs/badges/master/build.svg)
# Welcome to the 9net docs
---
This is built from a repo on GitLab, located [here](https://git.9net/docs/docs.p.9net).
Currently maintained by Morgan, so I guess ask them if you don't want to update this or if you have any questions.
Example [MkDocs] website using GitLab Pages.
Learn more about GitLab Pages at https://pages.gitlab.io and the official
documentation https://docs.gitlab.com/ce/user/project/pages/.
---
## GitLab CI
This project's static Pages are built by [GitLab CI][ci], following the steps
defined in [`.gitlab-ci.yml`](.gitlab-ci.yml):
```
image: python:alpine
before_script:
- pip install mkdocs
## Add your custom theme if not inside a theme_dir
## (https://github.com/mkdocs/mkdocs/wiki/MkDocs-Themes)
# - pip install mkdocs-material
pages:
script:
- mkdocs build
- mv site public
artifacts:
paths:
- public
only:
- master
```
## Building locally
To work locally with this project, you'll have to follow the steps below:
1. Fork, clone or download this project
1. [Install][] MkDocs
1. Preview your project: `mkdocs serve`,
your site can be accessed under `localhost:8000`
1. Add content
1. Generate the website: `mkdocs build` (optional)
Read more at MkDocs [documentation][].
## GitLab User or Group Pages
To use this project as your user/group website, you will need one additional
step: just rename your project to `namespace.gitlab.io`, where `namespace` is
your `username` or `groupname`. This can be done by navigating to your
project's **Settings**.
You'll need to configure your site too: change this line
in your `mkdocs.yml`, from `"https://pages.gitlab.io/mkdocs/"` to
`site_url = "https://namespace.gitlab.io"`.
Read more about [user/group Pages][userpages] and [project Pages][projpages].
## Did you fork this project?
If you forked this project for your own use, please go to your project's
**Settings** and remove the forking relationship, which won't be necessary
unless you want to contribute back to the upstream project.
## Troubleshooting
1. CSS is missing! That means two things:
Either that you have wrongly set up the CSS URL in your templates, or
your static generator has a configuration option that needs to be explicitly
set in order to serve static assets under a relative URL.
[ci]: https://about.gitlab.com/gitlab-ci/
[mkdocs]: http://www.mkdocs.org
[install]: http://www.mkdocs.org/#installation
[documentation]: http://www.mkdocs.org
[userpages]: https://docs.gitlab.com/ce/user/project/pages/introduction.html#user-or-group-pages
[projpages]: https://docs.gitlab.com/ce/user/project/pages/introduction.html#project-pages
---
Forked from https://gitlab.com/morph027/mkdocs
## Editing
To edit this yourself., ask Morgan to add you to the Git repository, or submit a pull request with your changes.
\ No newline at end of file
- [Home](README.md)
- Documentation
- [Certificate Authority](docs/certificate-authority.md)
\ No newline at end of file
......@@ -5,19 +5,22 @@
1. Install Step-CLI
- [Documentation here](https://smallstep.com/cli/)
2. Bootstrap CA cert locally
sudo -H step ca bootstrap --install \
--ca-url=https://ca.9net \
--fingerprint=17444b93edcf24609a95074b68b640cbb408884199e60424e3b39ddc03c23b1f
```sh
sudo -H step ca bootstrap --install \
--ca-url=https://ca.9net \
--fingerprint=17444b93edcf24609a95074b68b640cbb408884199e60424e3b39ddc03c23b1f
```
- Convenient Way - Note that this does not verify the root CA once downloaded.
1. Install `curl` and `jq`
sudo apt install -y curl jq
```sh
sudo apt install -y curl jq
``
2. Fetch+Install Root CA
curl -k https://ca.9net/root/17444b93edcf24609a95074b68b640cbb408884199e60424e3b39ddc03c23b1f | \
jq -r .ca | \
sudo tee /usr/local/share/ca-certificates/9net.crt
```sh
curl -k https://ca.9net/root/17444b93edcf24609a95074b68b640cbb408884199e60424e3b39ddc03c23b1f | \
jq -r .ca | \
sudo tee /usr/local/share/ca-certificates/9net.crt
```
3. Run `sudo update-ca-certificates`
......@@ -25,33 +28,37 @@
Note: These instructions use the `step` CLI. Make sure you have the root CA installed as above. Also, to make renewals easier, I'd recommend having one certificate for all domains on a single machine (fairly easy with multiple `--san` parameteres)
1. Configure your webserver however you need to for webroot cert verification
2. Generate certificate/key (replace BASE_DOMAIN, YOUR_WEBROOT, and DOMAIN2-DOMAIN _n_ as needed)
sudo -H step ca certificate \
BASE_DOMAIN.9net \
/etc/ssl/certs/cert-9net.pem \
/etc/ssl/private/key-9net.pem \
--provisioner acme \
--webroot /var/www/YOUR_WEBROOT \
--san BASE_DOMAIN.9net \ # the only required --san parameter
--san DOMAIN2.9net \
--san DOMAIN3.9net \
--san DOMAIN4.9net # repeat as needed
```sh
sudo -H step ca certificate \
BASE_DOMAIN.9net \
/etc/ssl/certs/cert-9net.pem \
/etc/ssl/private/key-9net.pem \
--provisioner acme \
--webroot /var/www/YOUR_WEBROOT \
--san BASE_DOMAIN.9net \ # the only required --san parameter
--san DOMAIN2.9net \
--san DOMAIN3.9net \
--san DOMAIN4.9net # repeat as needed
```
3. Certificate renewal:
- Method A: Cron job - Put the following in a cron job
step ca renew /etc/ssl/certs/cert-9net.pem /etc/ssl/private/key-9net.pem \
--exec "systemctl reload nginx"
```sh
step ca renew /etc/ssl/certs/cert-9net.pem /etc/ssl/private/key-9net.pem \
--exec "systemctl reload nginx"
```
- Method B: Run `step` in daemon mode for automatic renewals under `systemd`
[Unit]
Description=Automatically renew SSL certificates for 9net
After=network.target
StartLimitIntervalSec=0
```ini
[Unit]
Description=Automatically renew SSL certificates for 9net
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
ExecStart=/usr/bin/step ca renew --daemon --exec=systemctl\x20reload\x20nginx --ca-url=https://ca.9net /etc/ssl/certs/cert-9net.pem /etc/ssl/private/key-9net.pem
[Service]
Type=simple
Restart=always
RestartSec=1
ExecStart=/usr/bin/step ca renew --daemon --exec=systemctl\x20reload\x20nginx --ca-url=https://ca.9net /etc/ssl/certs/cert-9net.pem /etc/ssl/private/key-9net.pem
[Install]
WantedBy=multi-user.target
\ No newline at end of file
[Install]
WantedBy=multi-user.target
```
\ No newline at end of file
# Welcome to the 9net docs
This is built from a repo on GitLab, located [here](https://git.9net/docs/docs.p.9net).
Currently maintained by Morgan, so I guess ask them if you don't want to update this or if you have any questions.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/dark.css">
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
name: '9net docs',
repo: '',
loadSidebar: true
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
</body>
</html>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment