[obsidian] vault backup: 2025-08-20 18:47:16
All checks were successful
Build / build (push) Successful in 10m50s
All checks were successful
Build / build (push) Successful in 10m50s
This commit is contained in:
4
content/Caddy.md
Normal file
4
content/Caddy.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
date: 2025-08-20 18:45
|
||||||
|
---
|
||||||
|
#stub
|
@@ -3,11 +3,13 @@ date: "2024-02-05T12:26:59+0900"
|
|||||||
---
|
---
|
||||||
#self-hosted #server #tips
|
#self-hosted #server #tips
|
||||||
|
|
||||||
Giteaは最近Actionが使えるようになった。Dockerで別にランナーマシンを立ち上げる必要があるほか、GitHub Actionsと比べると、Concurrencyなどちゃんと効かなかったり色々まだ機能が足りてない所はある。
|
[[Gitea]]は最近Actionが使えるようになった。Dockerで別にランナーマシンを立ち上げる必要があるほか、GitHub Actionsと比べると、Concurrencyなどちゃんと効かなかったり色々まだ機能が足りてない所はある。
|
||||||
|
|
||||||
ただ、公開されてるGithubs Actionはそのままuseできるのが強い。`actions/cache@v3`の代わりに`https://github.com/actions/cache@v3`のようにURLで指定できる。よく使うアクションはgitea側にもミラーされていることもあるが、なんか放置されてるやつも多々あるので注意。
|
ただ、公開されてるGithubs Actionはそのままuseできるのが強い。`actions/cache@v3`の代わりに`https://github.com/actions/cache@v3`のようにURLで指定できる。よく使うアクションはgitea側にもミラーされていることもあるが、なんか放置されてるやつも多々あるので注意。
|
||||||
|
|
||||||
Pagesの機能がないため、別途サーバーを立ち上げてrsyncで同期するくらいしか方法がない。そこそこ設定は面倒くさいが、nginxよりさらに簡易的に動かせるgo製のWebサーバーCaddyを使ってなんとかすることにした。
|
Pagesの機能がないため、別途サーバーを立ち上げてrsyncで同期するくらいしか方法がない。そこそこ設定は面倒くさいが、nginxよりさらに簡易的に動かせるgo製のWebサーバー[[Caddy]]を使ってなんとかすることにした。
|
||||||
|
|
||||||
|
[[Cloudflare Pages]]でいいならそっちの方がBranch Previewもできるので多分圧倒的に楽。
|
||||||
|
|
||||||
## 下準備
|
## 下準備
|
||||||
|
|
||||||
@@ -20,7 +22,6 @@ ssh-keygen -t ed25519
|
|||||||
ファイル名は`rsync_webserver`と`rsync_webserver.pub`とかにしておく
|
ファイル名は`rsync_webserver`と`rsync_webserver.pub`とかにしておく
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Caddyサーバー側の構成
|
## Caddyサーバー側の構成
|
||||||
|
|
||||||
[tomoyanonymous/Caddy\_rsync\_webserver - Caddy\_rsync\_webserver - Tomoya Matsuura Gitea](https://git.matsuuratomoya.com/tomoyanonymous/Caddy_rsync_webserver)
|
[tomoyanonymous/Caddy\_rsync\_webserver - Caddy\_rsync\_webserver - Tomoya Matsuura Gitea](https://git.matsuuratomoya.com/tomoyanonymous/Caddy_rsync_webserver)
|
||||||
@@ -120,7 +121,10 @@ Action RunnerつきでGiteaを立ち上げるところまでは省略。
|
|||||||
- WEBSERVER_PORT (Caddyが立ち上がっているサーバーのSSH用ポート、上の例では25222)
|
- WEBSERVER_PORT (Caddyが立ち上がっているサーバーのSSH用ポート、上の例では25222)
|
||||||
- WEBSERVER_USER :root(これあんまり良くないのかな)
|
- WEBSERVER_USER :root(これあんまり良くないのかな)
|
||||||
|
|
||||||
で、リポジトリに`/.gitea/workflows/ci.yaml`を作る。[Gitea Actionsの`ubuntu-latest`ラベルのランナーはデフォルトでDebianベースの`node:16-bullseye`のDockerイメージのエイリアス](https://docs.gitea.com/usage/actions/act-runner#labels)で(これまじでややこしい)、QuartzはNode18以降でないと動かない。またGoも入ってないので入れる。
|
で、リポジトリに`/.gitea/workflows/ci.yaml`を作る。[Gitea Actionsの`ubuntu-latest`ラベルのランナーはデフォルトでDebianベースの`node:16-bullseye`のDockerイメージのエイリアス](https://docs.gitea.com/usage/actions/act-runner#labels)で(これまじでややこしい)、QuartzはNode18以降でないと動かない。
|
||||||
|
|
||||||
|
GIteaの難点として、Github Actionsではデフォルトで使える`hashFiles()`関数が使えない。代わりに、`go-hashfiles`というアクションを使う必要がある。QuartzはGo非依存になったのだが、これがあるのでビルド側でもまだgoをインストールする必要がある。
|
||||||
|
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
name: Build
|
name: Build
|
||||||
|
4
content/Gitea.md
Normal file
4
content/Gitea.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
date: 2025-08-20 18:36
|
||||||
|
---
|
||||||
|
#software
|
@@ -55,4 +55,5 @@ https://quartz.jzhao.xyz/migrating-from-Quartz-3
|
|||||||
beforeBody: [Component.ArticleTitle(), Component.ContentMeta(),/*Component.TagList()*/],
|
beforeBody: [Component.ArticleTitle(), Component.ContentMeta(),/*Component.TagList()*/],
|
||||||
```
|
```
|
||||||
|
|
||||||
このレイアウトの仕組みよくできてんなー
|
- v4.5でOGPイメージの自動生成機能がついた。
|
||||||
|
- 今はデフォルトでオンになっているが、[[Satori]]というJSでHTMLをSVGに変換しWebPまで変換してくれるモジュールを使うみたい。これがまだキャッシングの仕組みなどないみたいで結構重い。
|
Reference in New Issue
Block a user