#!/bin/bash set -e up () { loginctl enable-linger paul 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 podman generate systemd gitea --restart-policy=always --name > ~/.config/systemd/user/gitea.service systemctl --user daemon-reload systemctl restart --user gitea || systemctl start --user gitea systemctl enable --user gitea } down () { systemctl stop --user gitea || true systemctl disable --user gitea || true podman rm gitea || true } logs () { podman logs --follow gitea } $@