deploy: a79b21feb5388f4bc54d4cc12170350cd6172e32

This commit is contained in:
davegallant
2024-02-10 15:25:52 +00:00
parent 9ffb7f8dd6
commit 361cf93e8c
70 changed files with 72 additions and 72 deletions

View File

@@ -12,8 +12,8 @@ docker-compose is installed tailscale magic dns is enabled My preferred approach
The docker-compose.yaml file looks like:
version: "3.7" services: gitea: image: gitea/gitea:1.21.1 container_name: gitea network_mode: service:ts-gitea environment: - USER_UID=1000 - USER_GID=1000 - GITEA__server__DOMAIN=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__LFS_JWT_SECRET=my-secret-jwt restart: always volumes: - ./data:/data - /etc/timezone:/etc/timezone: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.
config/gitea.json:
{ "TCP": { "443": { "HTTPS": true } }, "Web": { "\${TS_CERT_DOMAIN}:443": { "Handlers": { "/": { "Proxy": "http://127.0.0.1:3000" } } }, }, "AllowFunnel": { "\${TS_CERT_DOMAIN}:443": true }, } 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. I decided to keep it simple and not use ssh, since communicating over https is perfectly fine for my use case.
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 from within the tailnet.
{ "TCP": { "443": { "HTTPS": true } }, "Web": { "\${TS_CERT_DOMAIN}:443": { "Handlers": { "/": { "Proxy": "http://127.0.0.1:3000" } } }, }, "AllowFunnel": { "\${TS_CERT_DOMAIN}:443": true }, } 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 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. 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 and decided to try out gruvbox.
I added the theme by cloning theme-gruvbox-auto.css into ./data/gitea/public/assets/css. I then added the following to environment in docker-compose.yml:
- GITEA__ui__DEFAULT_THEME=gruvbox-auto - GITEA__ui__THEMES=gruvbox-auto After restarting the gitea instance, the default theme was applied.