mirror of
https://github.com/juanfont/headscale.git
synced 2025-12-16 21:38:34 +00:00
Compare commits
8 Commits
v0.23.0-al
...
topic/docu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
173ea0423d | ||
|
|
693002a7a9 | ||
|
|
7e51c4570f | ||
|
|
cd793b2220 | ||
|
|
ecfe859a2e | ||
|
|
5f9c26930c | ||
|
|
5a4e52b727 | ||
|
|
51b56ba447 |
28
.github/workflows/docs-test.yml
vendored
28
.github/workflows/docs-test.yml
vendored
@@ -1,27 +1,27 @@
|
|||||||
name: Test documentation build
|
name: Test documentation build
|
||||||
|
|
||||||
on: [pull_request]
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'docs/**'
|
||||||
|
- pyproject.toml
|
||||||
|
- poetry.lock
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Install python
|
- uses: DeterminateSystems/nix-installer-action@main
|
||||||
uses: actions/setup-python@v4
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
with:
|
- name: Run tests
|
||||||
python-version: 3.x
|
run: nix develop --command bash -c "poetry install && poetry run mkdocs build --strict"
|
||||||
- name: Setup cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
key: ${{ github.ref }}
|
|
||||||
path: .cache
|
|
||||||
- name: Setup dependencies
|
|
||||||
run: pip install -r docs/requirements.txt
|
|
||||||
- name: Build docs
|
|
||||||
run: mkdocs build --strict
|
|
||||||
|
|||||||
24
.github/workflows/docs.yml
vendored
24
.github/workflows/docs.yml
vendored
@@ -4,6 +4,10 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
paths:
|
||||||
|
- 'docs/**'
|
||||||
|
- pyproject.toml
|
||||||
|
- poetry.lock
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@@ -17,19 +21,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Install python
|
- uses: DeterminateSystems/nix-installer-action@main
|
||||||
uses: actions/setup-python@v4
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
with:
|
- name: Run tests
|
||||||
python-version: 3.x
|
run: nix develop --command bash -c "poetry install && poetry run mkdocs build --strict"
|
||||||
- name: Setup cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
key: ${{ github.ref }}
|
|
||||||
path: .cache
|
|
||||||
- name: Setup dependencies
|
|
||||||
run: pip install -r docs/requirements.txt
|
|
||||||
- name: Build docs
|
|
||||||
run: mkdocs build --strict
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@v3
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
with:
|
||||||
@@ -39,9 +34,6 @@ jobs:
|
|||||||
environment:
|
environment:
|
||||||
name: github-pages
|
name: github-pages
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
permissions:
|
|
||||||
pages: write
|
|
||||||
id-token: write
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs: build
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
6
Makefile
6
Makefile
@@ -52,3 +52,9 @@ compress: build
|
|||||||
generate:
|
generate:
|
||||||
rm -rf gen
|
rm -rf gen
|
||||||
buf generate proto
|
buf generate proto
|
||||||
|
|
||||||
|
docs-serve:
|
||||||
|
poetry run mkdocs serve
|
||||||
|
|
||||||
|
docs-build:
|
||||||
|
poetry run mkdocs build
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ hide:
|
|||||||
|
|
||||||
`headscale` is an open source, self-hosted implementation of the Tailscale control server.
|
`headscale` is an open source, self-hosted implementation of the Tailscale control server.
|
||||||
|
|
||||||
This page contains the documentation for the latest version of headscale. Please also check our [FAQ](/faq/).
|
This page contains the documentation for the latest version of headscale. Please also check our [FAQ](faq.md).
|
||||||
|
|
||||||
Join our [Discord](https://discord.gg/c84AZQhmpx) server for a chat and community support.
|
Join our [Discord](https://discord.gg/c84AZQhmpx) server for a chat and community support.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
cairosvg~=2.7.1
|
|
||||||
mkdocs-material~=9.5.18
|
|
||||||
mkdocs-minify-plugin~=0.7.1
|
|
||||||
pillow~=10.1.0
|
|
||||||
@@ -57,7 +57,7 @@ describing how to make `headscale` run properly in a server environment.
|
|||||||
touch /etc/headscale/config.yaml
|
touch /etc/headscale/config.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
**(Strongly Recommended)** Download a copy of the [example configuration][config-example.yaml](https://github.com/juanfont/headscale/blob/main/config-example.yaml) from the headscale repository.
|
**(Strongly Recommended)** Download a copy of the [example configuration](https://github.com/juanfont/headscale/blob/main/config-example.yaml) from the headscale repository.
|
||||||
|
|
||||||
1. Start the headscale server:
|
1. Start the headscale server:
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ describing how to make `headscale` run properly in a server environment.
|
|||||||
touch /etc/headscale/config.yaml
|
touch /etc/headscale/config.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
**(Strongly Recommended)** Download a copy of the [example configuration][config-example.yaml](https://github.com/juanfont/headscale/blob/main/config-example.yaml) from the headscale repository.
|
**(Strongly Recommended)** Download a copy of the [example configuration](https://github.com/juanfont/headscale/blob/main/config-example.yaml) from the headscale repository.
|
||||||
|
|
||||||
1. Start the headscale server:
|
1. Start the headscale server:
|
||||||
|
|
||||||
|
|||||||
6
flake.lock
generated
6
flake.lock
generated
@@ -20,11 +20,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715774670,
|
"lastModified": 1716062047,
|
||||||
"narHash": "sha256-iJYnKMtLi5u6hZhJm94cRNSDG5Rz6ZzIkGbhPFtDRm0=",
|
"narHash": "sha256-OhysviwHQz4p2HZL4g7XGMLoUbWMjkMr/ogaR3VUYNA=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b3fcfcfabd01b947a1e4f36622bbffa3985bdac6",
|
"rev": "02923630b89aa1ab36ef8e422501a6f4fd4b2016",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -90,6 +90,12 @@
|
|||||||
protoc-gen-grpc-gateway
|
protoc-gen-grpc-gateway
|
||||||
buf
|
buf
|
||||||
clang-tools # clang-format
|
clang-tools # clang-format
|
||||||
|
|
||||||
|
# Docu dependencies
|
||||||
|
python311
|
||||||
|
poetry
|
||||||
|
mkdocs
|
||||||
|
cairo
|
||||||
];
|
];
|
||||||
|
|
||||||
# Add entry to build a docker image with headscale
|
# Add entry to build a docker image with headscale
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ func NewHeadscaleDatabase(
|
|||||||
RenameColumn(&types.Node{}, "nickname", "given_name")
|
RenameColumn(&types.Node{}, "nickname", "given_name")
|
||||||
|
|
||||||
dbConn.Model(&types.Node{}).Where("auth_key_id = ?", 0).Update("auth_key_id", nil)
|
dbConn.Model(&types.Node{}).Where("auth_key_id = ?", 0).Update("auth_key_id", nil)
|
||||||
// If the Node table has a column for registered,
|
// If the Node table has a column for registered,
|
||||||
// find all occourences of "false" and drop them. Then
|
// find all occourences of "false" and drop them. Then
|
||||||
// remove the column.
|
// remove the column.
|
||||||
if tx.Migrator().HasColumn(&types.Node{}, "registered") {
|
if tx.Migrator().HasColumn(&types.Node{}, "registered") {
|
||||||
@@ -319,14 +319,8 @@ func NewHeadscaleDatabase(
|
|||||||
// no longer used.
|
// no longer used.
|
||||||
ID: "202402151347",
|
ID: "202402151347",
|
||||||
Migrate: func(tx *gorm.DB) error {
|
Migrate: func(tx *gorm.DB) error {
|
||||||
err := tx.Migrator().DropColumn(&types.Node{}, "last_successful_update")
|
_ = tx.Migrator().DropColumn(&types.Node{}, "last_successful_update")
|
||||||
if err != nil && strings.Contains(err.Error(), `of relation "nodes" does not exist`) {
|
return nil
|
||||||
return nil
|
|
||||||
} else {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return err
|
|
||||||
},
|
},
|
||||||
Rollback: func(tx *gorm.DB) error {
|
Rollback: func(tx *gorm.DB) error {
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
1018
poetry.lock
generated
Normal file
1018
poetry.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
18
pyproject.toml
Normal file
18
pyproject.toml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
[tool.poetry]
|
||||||
|
name = "docs"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = ""
|
||||||
|
authors = ["ohdearaugustin <ohdearaugustin@users.noreply.github.com>"]
|
||||||
|
package-mode = false
|
||||||
|
|
||||||
|
[tool.poetry.dependencies]
|
||||||
|
python = "^3.11"
|
||||||
|
cairosvg = "^2.7.1,<2.8.0"
|
||||||
|
mkdocs-material = "^9.4.14"
|
||||||
|
mkdocs-minify-plugin = ">=0.7.1,<0.8.0"
|
||||||
|
pillow = ">=10.1.0,<10.2.0"
|
||||||
|
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = ["poetry-core"]
|
||||||
|
build-backend = "poetry.core.masonry.api"
|
||||||
Reference in New Issue
Block a user