Skip to content

Commit

Permalink
gitea setup fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaofeng1227 committed Oct 18, 2023
1 parent 1cbd60e commit d5d0850
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker/git/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Dockerfile refer to:https://github.com/go-gitea/gitea/blob/main/Dockerfile
# Dockerfile refer to: https://github.com/go-gitea/gitea/blob/main/Dockerfile
FROM gitea/gitea:1.20.4

LABEL maintainer="Websoft9<[email protected]>"
Expand Down
5 changes: 3 additions & 2 deletions docker/git/src/s6/user/setup
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ su -c "

echo "Read credential from tmp"
username=$(grep -o "New user '[^']*" /tmp/credential | sed "s/New user '//")
if [ -z "$username" ]; then
username="websoft9"
if [ -z "$username" ] || [ "$username" != "websoft9" ]; then
echo "username is not websoft9, exit"
fi
password=$(grep -o "generated random password is '[^']*" /tmp/credential | sed "s/generated random password is '//")
rm -rf /tmp/credential

echo "Save to credential"
json="{\"username\":\"$admin_username\",\"password\":\"$password\",\"email\":\"$admin_email\"}"
Expand Down

0 comments on commit d5d0850

Please sign in to comment.