scripts/fogcutter/podman/gitea.sh

45 lines
1.1 KiB
Bash
Raw Normal View History

2020-12-26 23:16:52 -05:00
#!/bin/bash
set -e
up () {
2020-12-28 19:38:09 -05:00
loginctl enable-linger $USER
2020-12-26 23:16:52 -05:00
podman network create pew-net || true
# Exposed on port 3000 in pew-net
podman create \
--name gitea \
--env RUN_MODE=prod \
--env DOMAIN=git.seaturtle.pw \
--env SSH_DOMAIN=git.seaturtle.pw \
--env SSH_PORT=2222 \
--env ROOT_URL=https://git.seaturtle.pw \
--env LFS_START=true \
--env DISABLE_REGISTRATION=true \
--env REQUIRE_SIGNIN_VIEW=false \
--env USER_UID=1000 \
--volume /bigdata/k8s-config/gitea/data:/data:rw \
--volume /etc/localtime:/etc/localtime:ro \
--volume /etc/timezone:/etc/timezone:ro \
--publish 127.0.0.1:2222:2222 \
--network pew-net \
gitea/gitea:1.12.5
2020-12-28 19:38:09 -05:00
podman generate systemd gitea --restart-policy=always --name > $HOME/.config/systemd/user/gitea.service
2020-12-26 23:16:52 -05:00
systemctl --user daemon-reload
2020-12-27 03:14:45 -05:00
systemctl start --user gitea || systemctl restart --user gitea
2020-12-26 23:16:52 -05:00
systemctl enable --user gitea
}
down () {
systemctl stop --user gitea || true
systemctl disable --user gitea || true
podman rm gitea || true
}
logs () {
podman logs --follow gitea
}
$@