scripts/fogcutter/docker/gitea.sh

42 lines
992 B
Bash
Raw Normal View History

2020-12-26 23:16:52 -05:00
#!/bin/bash
set -e
up () {
2022-12-23 19:30:06 -05:00
# Ensure iptables rules exist
# https://askubuntu.com/questions/1052919/iptables-reload-restart-on-ubuntu/1072948#1072948
docker network create --ipv6 --subnet "fd01::/80" pew-net || true
2020-12-26 23:16:52 -05:00
# Exposed on port 3000 in pew-net
2021-05-16 21:41:38 -04:00
docker run \
--detach \
2020-12-26 23:16:52 -05:00
--name gitea \
2021-05-16 21:41:38 -04:00
--restart unless-stopped \
2020-12-26 23:16:52 -05:00
--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 \
2021-05-16 21:41:38 -04:00
--publish 2222:2222 \
2020-12-26 23:16:52 -05:00
--network pew-net \
2022-02-26 12:14:35 -05:00
docker.io/gitea/gitea:latest
2020-12-26 23:16:52 -05:00
}
down () {
2021-05-16 21:41:38 -04:00
docker stop gitea || true
docker rm gitea || true
2020-12-26 23:16:52 -05:00
}
logs () {
2021-05-16 21:41:38 -04:00
docker logs --follow gitea
2020-12-26 23:16:52 -05:00
}
$@