#! /bin/bash source .env git_data=${STORAGE_VOLUME}/${GITEA_NAME} for p in "${git_data}"; do if ! ls ${p} >/dev/null 2>&1; then echo "Creating ${p} directory..." mkdir -p ${p} else echo "directory exists ${p}" fi done podman run -d --replace \ --name ${GITEA_NAME} \ --hostname ${GITEA_NAME} \ --restart=always \ --network container-bridge \ -p ${GITEA_PORT}:3000 \ -p ${GITEA_PORT2}:2222 \ -v ${git_data}:/data \ -v /etc/timezone:/etc/timezone:ro \ -v /etc/localtime:/etc/localtime:ro \ -e USER_UID=1000 \ -e USER_GID=1000 \ --health-cmd="curl -f ${LOCAL_IP}:${GITEA_PORT}/api/healthz" \ --health-interval=30s \ --health-timeout=10s \ --health-retries=5 \ docker.gitea.com/gitea:latest