scripts/fogcutter/docker/gitea.sh

40 lines
838 B
Bash
Raw Normal View History

2020-12-26 23:16:52 -05:00
#!/bin/bash
set -e
up () {
2021-05-16 21:41:38 -04:00
docker network create 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 \
2021-07-07 23:45:14 -04:00
docker.io/gitea/gitea:1.14.4
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
}
$@