mirror of
https://github.com/daylinmorgan/git-server.git
synced 2024-11-14 16:17:53 -06:00
add soft-serve information to configuration
This commit is contained in:
parent
f9e3b84aa2
commit
55712d78ef
4 changed files with 62 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,6 +1,8 @@
|
||||||
|
soft/*
|
||||||
gitea/*
|
gitea/*
|
||||||
!gitea/gitea/
|
!gitea/gitea/
|
||||||
|
|
||||||
gitea/gitea/*
|
gitea/gitea/*
|
||||||
!gitea/gitea/templates/
|
!gitea/gitea/templates/
|
||||||
!gitea/gitea/public/
|
!gitea/gitea/public/
|
||||||
|
|
||||||
|
|
24
README.md
24
README.md
|
@ -1,7 +1,18 @@
|
||||||
# Server Config
|
# 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
|
```dosini
|
||||||
APP_NAME = Daylin's Git Server
|
APP_NAME = Daylin's Git Server
|
||||||
|
@ -19,9 +30,18 @@ NO_REPLY_ADDRESS = noreply.git.dayl.in
|
||||||
|
|
||||||
[ui]
|
[ui]
|
||||||
DEFAULT_THEME = arc-green
|
DEFAULT_THEME = arc-green
|
||||||
THEMES = auto,gitea,arc-green
|
THEMES = arc-green
|
||||||
|
|
||||||
[openid]
|
[openid]
|
||||||
ENABLE_OPENID_SIGNIN = false
|
ENABLE_OPENID_SIGNIN = false
|
||||||
ENABLE_OPENID_SIGNUP = 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`!
|
||||||
|
|
|
@ -39,6 +39,15 @@ services:
|
||||||
- caddy_data:/data
|
- caddy_data:/data
|
||||||
- caddy_config:/config
|
- 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:
|
volumes:
|
||||||
caddy_data:
|
caddy_data:
|
||||||
external: true
|
external: true
|
||||||
|
|
29
update-soft-serve-repos.py
Executable file
29
update-soft-serve-repos.py
Executable file
|
@ -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()
|
Loading…
Reference in a new issue