mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2026-01-05 01:52:30 +00:00
Compare commits
4 Commits
56fb070e41
...
renovate/p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5c62e6b8e1 | ||
| 47e1792caa | |||
| d4b0e599db | |||
| f433fb9f1c |
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
|||||||
cache-dependency-path: "**/package-lock.json"
|
cache-dependency-path: "**/package-lock.json"
|
||||||
|
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v3
|
||||||
with:
|
with:
|
||||||
hugo-version: "0.120.3"
|
hugo-version: "0.120.3"
|
||||||
extended: true
|
extended: true
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ If you would like to connect with me:
|
|||||||
- [Mastodon](https://mastodon.social/@davegallant)
|
- [Mastodon](https://mastodon.social/@davegallant)
|
||||||
- [GitHub](https://github.com/davegallant)
|
- [GitHub](https://github.com/davegallant)
|
||||||
- [RSS Feed](https://davegallant.ca/index.xml)
|
- [RSS Feed](https://davegallant.ca/index.xml)
|
||||||
- [gitea.snake-cloud.ts.net](https://gitea.snake-cloud.ts.net/explore/repos)
|
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
|
|||||||
@@ -50,11 +50,9 @@ services:
|
|||||||
gitea:
|
gitea:
|
||||||
image: gitea/gitea:1.21.1
|
image: gitea/gitea:1.21.1
|
||||||
container_name: gitea
|
container_name: gitea
|
||||||
network_mode: service:ts-gitea
|
|
||||||
environment:
|
environment:
|
||||||
- USER_UID=1000
|
- USER_UID=1000
|
||||||
- USER_GID=1000
|
- USER_GID=1000
|
||||||
|
|
||||||
- GITEA__server__DOMAIN=gitea.my-tailnet-name.ts.net
|
- GITEA__server__DOMAIN=gitea.my-tailnet-name.ts.net
|
||||||
- GITEA__server__ROOT_URL=https://gitea.my-tailnet-name.ts.net
|
- GITEA__server__ROOT_URL=https://gitea.my-tailnet-name.ts.net
|
||||||
- GITEA__server__HTTP_ADDR=0.0.0.0
|
- GITEA__server__HTTP_ADDR=0.0.0.0
|
||||||
@@ -64,57 +62,18 @@ services:
|
|||||||
- ./data:/data
|
- ./data:/data
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
ts-gitea:
|
|
||||||
image: tailscale/tailscale:v1.58
|
|
||||||
container_name: ts-gitea
|
|
||||||
hostname: gitea
|
|
||||||
environment:
|
|
||||||
- TS_AUTHKEY=<FILL THIS IN>
|
|
||||||
- TS_SERVE_CONFIG=/config/gitea.json
|
|
||||||
- TS_STATE_DIR=/var/lib/tailscale
|
|
||||||
volumes:
|
|
||||||
- ${PWD}/state:/var/lib/tailscale
|
|
||||||
- ${PWD}/config:/config
|
|
||||||
- /dev/net/tun:/dev/net/tun
|
|
||||||
cap_add:
|
|
||||||
- net_admin
|
|
||||||
- sys_module
|
|
||||||
restart: unless-stopped
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that you must specify a `TS_AUTHKEY` in the `ts-gitea` service. You can generate an auth key [here](https://login.tailscale.com/admin/settings/keys).
|
After adding the above configuration, running `docker compose up -d` should be enough to get an instance up and running.
|
||||||
|
|
||||||
`config/gitea.json`:
|
To make it accessible at [https://gitea.my-tailnet-name.ts.net](https://gitea.my-tailnet-name.ts.net) from within the tailnet, install tailscale cli and run:
|
||||||
|
|
||||||
```yaml
|
```sh
|
||||||
{
|
tailscale serve -bg 3000
|
||||||
"TCP": { "443": { "HTTPS": true } },
|
|
||||||
"Web":
|
|
||||||
{
|
|
||||||
"${TS_CERT_DOMAIN}:443":
|
|
||||||
{ "Handlers": { "/": { "Proxy": "http://127.0.0.1:3000" } } },
|
|
||||||
},
|
|
||||||
"AllowFunnel": { "${TS_CERT_DOMAIN}:443": false }
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
After adding the above configuration, running `docker compose up -d` should be enough to get an instance up and running. It will be accessible at [https://gitea.my-tailnet-name.ts.net](https://gitea.my-tailnet-name.ts.net) from within the tailnet.
|
|
||||||
|
|
||||||
Something to consider is whether or not you want to use ssh with git. One method to get this to work with containers is to use [ssh container passthrough](https://docs.gitea.com/installation/install-with-docker#ssh-container-passthrough). I decided to keep it simple and not use ssh, since communicating over https is perfectly fine for my use case.
|
Something to consider is whether or not you want to use ssh with git. One method to get this to work with containers is to use [ssh container passthrough](https://docs.gitea.com/installation/install-with-docker#ssh-container-passthrough). I decided to keep it simple and not use ssh, since communicating over https is perfectly fine for my use case.
|
||||||
|
|
||||||
## Theming
|
|
||||||
|
|
||||||
I discovered some themes for gitea [here](https://git.sainnhe.dev/sainnhe/gitea-themes).
|
|
||||||
|
|
||||||
I added the theme by copying [theme-palenight.css](https://git.sainnhe.dev/sainnhe/gitea-themes/raw/branch/master/dist/theme-palenight.css) into `./data/gitea/public/assets/css`. I then added the following to `environment` in `docker-compose.yml`:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- GITEA__ui__DEFAULT_THEME=palenight
|
|
||||||
- GITEA__ui__THEMES=palenight
|
|
||||||
```
|
|
||||||
|
|
||||||
After restarting the gitea instance, the default theme was applied.
|
|
||||||
|
|
||||||
## Connecting runners
|
## Connecting runners
|
||||||
|
|
||||||
I installed the runner by [following the docs](https://docs.gitea.com/usage/actions/quickstart#set-up-runner). I opted for installing it on a separate host as recommended in the docs. I used the systemd unit file to ensure that the runner comes back online after system reboots. I installed tailscale on the gitea runner as well, so that it can be part of the same tailnet as the main instance.
|
I installed the runner by [following the docs](https://docs.gitea.com/usage/actions/quickstart#set-up-runner). I opted for installing it on a separate host as recommended in the docs. I used the systemd unit file to ensure that the runner comes back online after system reboots. I installed tailscale on the gitea runner as well, so that it can be part of the same tailnet as the main instance.
|
||||||
@@ -168,7 +127,7 @@ jobs:
|
|||||||
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}
|
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}
|
||||||
```
|
```
|
||||||
|
|
||||||
And voilà:
|
And the end result:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -182,6 +141,4 @@ One enhancement that I would like to see is the ability to send notifications on
|
|||||||
|
|
||||||
Gitea Actions are fast and the resource footprint is minimal. My gitea instance is currently using around 250mb of memory and a small fraction of a single cpu core (and the runner is using a similar amount of resources). This is impressive since many alternatives tend to require substantially more resources. It likely helps that the codebase is largely written in go.
|
Gitea Actions are fast and the resource footprint is minimal. My gitea instance is currently using around 250mb of memory and a small fraction of a single cpu core (and the runner is using a similar amount of resources). This is impressive since many alternatives tend to require substantially more resources. It likely helps that the codebase is largely written in go.
|
||||||
|
|
||||||
By combining gitea with the networking marvel that is tailscale, running workflows becomes simple and fun. Whether you are working on a team or working alone, this setup ensures that your workflows are securely accessible from anywhere with an internet connection.
|
By combining gitea with tailscale, running workflows becomes simple and fun. Whether you are working on a team or working alone, this setup ensures that your workflows are securely accessible from anywhere with an internet connection.
|
||||||
|
|
||||||
Check out my gitea instance exposed via Funnel [here](https://gitea.snake-cloud.ts.net).
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
<!-- Umami Analytics -->
|
<!-- Umami Analytics -->
|
||||||
<script defer src="https://umami.snake-cloud.ts.net/script.js" data-website-id="e8adafba-b892-4dad-a139-2bd61fe5fab9"></script>
|
<script defer src="https://umami.davegallant.ca/script.js" data-website-id="e8adafba-b892-4dad-a139-2bd61fe5fab9"></script>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
let
|
let
|
||||||
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.11";
|
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-25.11";
|
||||||
pkgs = import nixpkgs { config = { }; overlays = [ ]; };
|
pkgs = import nixpkgs { config = { }; overlays = [ ]; };
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ jobs:
|
|||||||
node-version: "18"
|
node-version: "18"
|
||||||
|
|
||||||
- name: Install Hugo
|
- name: Install Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v3
|
||||||
with:
|
with:
|
||||||
hugo-version: "0.111.3"
|
hugo-version: "0.111.3"
|
||||||
extended: true
|
extended: true
|
||||||
@@ -63,7 +63,7 @@ jobs:
|
|||||||
node-version: "18"
|
node-version: "18"
|
||||||
|
|
||||||
- name: Install Hugo
|
- name: Install Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v3
|
||||||
with:
|
with:
|
||||||
hugo-version: "0.111.3"
|
hugo-version: "0.111.3"
|
||||||
extended: true
|
extended: true
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ jobs:
|
|||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
- name: Install Hugo
|
- name: Install Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v3
|
||||||
with:
|
with:
|
||||||
hugo-version: "0.111.3"
|
hugo-version: "0.111.3"
|
||||||
extended: true
|
extended: true
|
||||||
|
|||||||
Reference in New Issue
Block a user