mirror of
https://github.com/casjaysdevdocker/gitea
synced 2025-12-14 08:07:07 -05:00
🗃️ Update codebase 🗃️
rootfs/root/docker/setup/05-custom.sh rootfs/usr/local/bin/entrypoint.sh rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh
This commit is contained in:
@@ -45,7 +45,8 @@ if curl -q -LSsf "$GITEA_URL" -o "/tmp/gitea.$$"; then
|
||||
echo "gitea has been installed to: $GITEA_BIN_FILE"
|
||||
chmod +x "$GITEA_BIN_FILE"
|
||||
if [ -d "/etc/sudoers.d" ]; then
|
||||
echo "gitea ALL=(ALL) NOPASSWD: ALL" >"/etc/sudoers.d/gitea"
|
||||
echo "root ALL=(ALL) NOPASSWD: ALL" >"/etc/sudoers.d/root"
|
||||
echo "git ALL=(ALL) NOPASSWD: ALL" >"/etc/sudoers.d/git"
|
||||
echo "docker ALL=(ALL) NOPASSWD: ALL" >"/etc/sudoers.d/docker"
|
||||
fi
|
||||
else
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck shell=bash
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
##@Version : 202511290736-git
|
||||
# @@Author : Jason Hempstead
|
||||
# @@Contact : jason@casjaysdev.pro
|
||||
# @@License : WTFPL
|
||||
##@Version : GEN_SCRIPT_REPLACE_VERSION
|
||||
# @@Author : GEN_SCRIPT_REPLACE_AUTHOR
|
||||
# @@Contact : GEN_SCRIPT_REPLACE_EMAIL
|
||||
# @@License : GEN_SCRIPT_REPLACE_LICENSE
|
||||
# @@ReadME : entrypoint.sh --help
|
||||
# @@Copyright : Copyright: (c) 2025 Jason Hempstead, Casjays Developments
|
||||
# @@Created : Saturday, Nov 29, 2025 07:36 EST
|
||||
# @@Copyright : GEN_SCRIPT_REPLACE_COPYRIGHT
|
||||
# @@Created : GEN_SCRIPT_REPLACE_DATE
|
||||
# @@File : entrypoint.sh
|
||||
# @@Description : Entrypoint file for gitea
|
||||
# @@Changelog : New script
|
||||
# @@TODO : Better documentation
|
||||
# @@Other :
|
||||
# @@Resource :
|
||||
# @@Terminal App : no
|
||||
# @@sudo/root : no
|
||||
# @@Description : Entrypoint file for GEN_SCRIPT_REPLACE_APPNAME
|
||||
# @@Changelog : GEN_SCRIPT_REPLACE_CHANGELOG
|
||||
# @@TODO : GEN_SCRIPT_REPLACE_TODO
|
||||
# @@Other : GEN_SCRIPT_REPLACE_OTHER
|
||||
# @@Resource : GEN_SCRIPT_REPLACE_RES
|
||||
# @@Terminal App : GEN_SCRIPT_REPLACE_TERMINAL
|
||||
# @@sudo/root : GEN_SCRIPT_REPLACE_SUDO
|
||||
# @@Template : other/docker-entrypoint
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2090,SC2115,SC2120,SC2155,SC2199,SC2229,SC2317,SC2329
|
||||
@@ -31,7 +31,7 @@ PATH="/usr/local/etc/docker/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set bash options
|
||||
SCRIPT_FILE="$0"
|
||||
CONTAINER_NAME="gitea"
|
||||
CONTAINER_NAME="GEN_SCRIPT_REPLACE_APPNAME"
|
||||
SCRIPT_NAME="$(basename -- "$SCRIPT_FILE" 2>/dev/null)"
|
||||
CONTAINER_NAME="${ENV_CONTAINER_NAME:-$CONTAINER_NAME}"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
@@ -84,8 +84,8 @@ SERVICE_UID="${SERVICE_UID:-0}" # set the user id
|
||||
SERVICE_GID="${SERVICE_GID:-0}" # set the group id
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# User and group in which the service switches to - IE: nginx,apache,mysql,postgres
|
||||
SERVICE_USER="${SERVICE_USER:-git}" # execute command as another user
|
||||
SERVICE_GROUP="${SERVICE_GROUP:-git}" # Set the service group
|
||||
SERVICE_USER="${SERVICE_USER:-GEN_SCRIPT_REPLACE_APPNAME}" # execute command as another user
|
||||
SERVICE_GROUP="${SERVICE_GROUP:-GEN_SCRIPT_REPLACE_APPNAME}" # Set the service group
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Secondary ports
|
||||
SERVER_PORTS="" # specifiy other ports
|
||||
@@ -95,7 +95,7 @@ WEB_SERVER_PORT="" # port : 80,443
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Healthcheck variables
|
||||
HEALTH_ENABLED="yes" # enable healthcheck [yes/no]
|
||||
SERVICES_LIST="tini" # comma separated list of processes for the healthcheck
|
||||
SERVICES_LIST="tini,gitea,dockerd" # comma separated list of processes for the healthcheck
|
||||
HEALTH_ENDPOINTS="" # url endpoints: [http://localhost/health,http://localhost/test]
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Update path var
|
||||
@@ -258,7 +258,7 @@ fi
|
||||
if [ "$ENTRYPOINT_FIRST_RUN" != "no" ]; then
|
||||
# Show start message
|
||||
if [ "$CONFIG_DIR_INITIALIZED" = "no" ] || [ "$DATA_DIR_INITIALIZED" = "no" ]; then
|
||||
[ "$ENTRYPOINT_MESSAGE" = "yes" ] && echo "Executing entrypoint script for gitea"
|
||||
[ "$ENTRYPOINT_MESSAGE" = "yes" ] && echo "Executing entrypoint script for GEN_SCRIPT_REPLACE_APPNAME"
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set reusable variables
|
||||
|
||||
@@ -133,8 +133,8 @@ SERVICE_PORT="44015"
|
||||
RUNAS_USER="root" # normally root
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# User and group in which the service switches to - IE: nginx,apache,mysql,postgres
|
||||
SERVICE_USER="gitea" # execute command as another user
|
||||
SERVICE_GROUP="gitea" # Set the service group
|
||||
SERVICE_USER="git" # execute command as another user
|
||||
SERVICE_GROUP="git" # Set the service group
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set password length
|
||||
RANDOM_PASS_USER=""
|
||||
@@ -196,6 +196,7 @@ GITEA_PORT="${GITEA_PORT:-80}"
|
||||
SYS_AUTH_TOKEN="$(__gen_auth_token)"
|
||||
GITEA_USER="${GITEA_USER:-SERVICE_USER}"
|
||||
INSTANCE_HOSTNAME="${GITEA_HOSTNAME:-$HOSTNAME}"
|
||||
RUNNER_CACHE_PORT="${RUNNER_CACHE_PORT:-$SERVICE_PORT}"
|
||||
RUNNER_LABELS="linux:host,"
|
||||
RUNNER_LABELS+="node14:docker://node:14,"
|
||||
RUNNER_LABELS+="node16:docker://node:16,"
|
||||
@@ -356,8 +357,8 @@ __pre_execute() {
|
||||
__post_execute() {
|
||||
local pid="" # init pid var
|
||||
local retVal=0 # set default exit code
|
||||
local ctime=${POST_EXECUTE_WAIT_TIME:-1} # how long to wait before executing
|
||||
local waitTime=$((ctime * 60)) # convert minutes to seconds
|
||||
local ctime=${POST_EXECUTE_WAIT_TIME:-1} # how long to wait before executing
|
||||
local postMessageST="Running post commands for $SERVICE_NAME" # message to show at start
|
||||
local postMessageEnd="Finished post commands for $SERVICE_NAME" # message to show at completion
|
||||
# wait
|
||||
|
||||
Reference in New Issue
Block a user