From e3f9a5d0c09f0d3778c46feba8ec66bb4296c05c Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Thu, 29 Feb 2024 12:59:35 +0800 Subject: [PATCH] gitea --- docker/git/Dockerfile | 2 +- docker/git/src/s6/user/finish | 8 +------- docker/git/src/s6/user/setup | 3 ++- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/docker/git/Dockerfile b/docker/git/Dockerfile index 9bc418a2..63668129 100644 --- a/docker/git/Dockerfile +++ b/docker/git/Dockerfile @@ -1,4 +1,4 @@ -# modify time: 202402290820, you can modify here to trigger Docker Build action +# modify time: 202402291259, you can modify here to trigger Docker Build action # Dockerfile refer to: https://github.com/go-gitea/gitea/blob/main/Dockerfile FROM gitea/gitea:1.20.4 diff --git a/docker/git/src/s6/user/finish b/docker/git/src/s6/user/finish index f2d73b8d..5662644c 100644 --- a/docker/git/src/s6/user/finish +++ b/docker/git/src/s6/user/finish @@ -1,9 +1,3 @@ #!/bin/bash -cred_path="/data/gitea/credential" -if [ -e "$cred_path" ]; then - echo "File $cred_path exists. disable /etc/s6/user" - exit 125 -else - exit 0 -fi +exit 125 diff --git a/docker/git/src/s6/user/setup b/docker/git/src/s6/user/setup index d48ac840..59c0a0c3 100644 --- a/docker/git/src/s6/user/setup +++ b/docker/git/src/s6/user/setup @@ -10,13 +10,14 @@ admin_username="websoft9" admin_email="admin@mydomain.com" while [ "$response" != "200" ]; do + sleep 3 response=$(curl -s -o /dev/null -w "%{http_code}" localhost:3000) if [ "$response" = "200" ]; then echo "gitea is runing" break fi count=$((count+1)) - if [ $count -gt 10 ]; then + if [ $count -gt 60 ]; then echo "gitea is not runing" break fi