diff --git a/.gitignore b/.gitignore index f44da18..5417622 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ +soft/* gitea/* !gitea/gitea/ gitea/gitea/* !gitea/gitea/templates/ !gitea/gitea/public/ + diff --git a/README.md b/README.md index 145c654..d3c924b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,18 @@ # Server Config +## Important Setup Steps -Important Changes to `app.ini` +To keep `soft-serve` version up to date +add the following lines to `sudo crontab`. + +``` +# update repos +* */4 * * * /home/daylin/git/update-soft-serve-repos.py +# update container so home page is semi-accurate +0 1 * * * docker compose --project-directory /home/daylin/git restart soft-serve +``` + +Notable changes to `app.ini` ```dosini APP_NAME = Daylin's Git Server @@ -19,9 +30,18 @@ NO_REPLY_ADDRESS = noreply.git.dayl.in [ui] DEFAULT_THEME = arc-green -THEMES = auto,gitea,arc-green +THEMES = arc-green [openid] ENABLE_OPENID_SIGNIN = false ENABLE_OPENID_SIGNUP = false ``` + +## Where is this repo? + +github < mirror > gitea < mirror > soft-serve + +This repo is hosted on github but mirrored to my self-hosted [`gitea`](https://gitea.io/en-us/) instance. +Once there it will be mirrored to an instance of [`soft-serve`](https://github.com/charmbracelet/soft-serve). + +Check it out with `ssh -p 23231 git.dayl.in`! diff --git a/docker-compose.yml b/docker-compose.yml index ac52263..90a20d8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -39,6 +39,15 @@ services: - caddy_data:/data - caddy_config:/config + soft-serve: + image: charmcli/soft-serve:latest + restart: unless-stopped + container_name: soft-serve + volumes: + - ./soft:/soft-serve + ports: + - 23231:23231 + volumes: caddy_data: external: true diff --git a/update-soft-serve-repos.py b/update-soft-serve-repos.py new file mode 100755 index 0000000..59954e3 --- /dev/null +++ b/update-soft-serve-repos.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 + +from pathlib import Path +import shutil + +GITEA_REPOS = Path(__file__).parent / "gitea/git/repositories/daylin" +SOFT_REPOS = Path(__file__).parent / "soft/repos" + +allowed = ["dotfiles", "gitea-server"] + + +def main(): + + for repo in GITEA_REPOS.iterdir(): + name = repo.name.replace(".git", "") + if name not in allowed: + continue + print(repo) + + dest = SOFT_REPOS / name + print(f">> {dest}") + + if dest.is_dir(): + shutil.rmtree(dest) + shutil.copytree(repo, dest) + + +if __name__ == "__main__": + main()