2023-09-05 11:40:31 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
up () {
|
|
|
|
# Exposed on port 3000 in pew-net
|
|
|
|
docker run \
|
|
|
|
--detach \
|
|
|
|
--name gitea \
|
|
|
|
--restart unless-stopped \
|
|
|
|
--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 \
|
2023-09-07 21:08:48 -04:00
|
|
|
--volume /mammoth/gitea/data:/data:rw \
|
2023-09-05 11:40:31 -04:00
|
|
|
--volume /etc/localtime:/etc/localtime:ro \
|
|
|
|
--volume /etc/timezone:/etc/timezone:ro \
|
|
|
|
--publish 2222:2222 \
|
|
|
|
--network pew-net \
|
|
|
|
docker.io/gitea/gitea:1.20
|
|
|
|
}
|
|
|
|
|
|
|
|
down () {
|
|
|
|
docker stop gitea || true
|
|
|
|
docker rm gitea || true
|
|
|
|
}
|
|
|
|
|
|
|
|
logs () {
|
|
|
|
docker logs --follow gitea
|
|
|
|
}
|
|
|
|
|
|
|
|
$@
|