Browse Source

Add gitea app

master-prepare
Luke Childs 3 years ago
parent
commit
d62e003539
  1. 0
      apps/gitea/data/db/.gitkeep
  2. 0
      apps/gitea/data/gitea/config/.gitkeep
  3. 0
      apps/gitea/data/gitea/data/.gitkeep
  4. 43
      apps/gitea/docker-compose.yml
  5. 22
      apps/registry.json
  6. 8
      scripts/configure
  7. 4
      templates/.env-sample
  8. 5
      templates/torrc-sample

0
apps/gitea/data/db/.gitkeep

0
apps/gitea/data/gitea/config/.gitkeep

0
apps/gitea/data/gitea/data/.gitkeep

43
apps/gitea/docker-compose.yml

@ -0,0 +1,43 @@
version: "3.7"
services:
server:
image: gitea/gitea:1.14.5-rootless@sha256:6ff3d1e527d65d285fa248920e36b381e08f7c6f408a8883230751ff2a0c0823
user: "1000:1000"
restart: on-failure
ports:
- "${APP_GITEA_PORT}:${APP_GITEA_PORT}"
- "${APP_GITEA_SSH_PORT}:${APP_GITEA_SSH_PORT}"
volumes:
- ${APP_DATA_DIR}/data/gitea/data:/var/lib/gitea
- ${APP_DATA_DIR}/data/gitea/config:/etc/gitea
environment:
GITEA__security__INSTALL_LOCK: "true"
GITEA__server__DOMAIN: "${APP_DOMAIN}"
GITEA__server__HTTP_PORT: "${APP_GITEA_PORT}"
GITEA__server__SSH_DOMAIN: "${APP_DOMAIN}"
GITEA__server__SSH_PORT: "${APP_GITEA_SSH_PORT}"
GITEA__server__SSH_LISTEN_PORT: "${APP_GITEA_SSH_PORT}"
GITEA__server__START_SSH_SERVER: "true"
GITEA__database__DB_TYPE: "mysql"
GITEA__database__HOST: "${APP_GITEA_DB_IP}:3306"
GITEA__database__NAME: "gitea"
GITEA__database__USER: "gitea"
GITEA__database__PASSWD: "moneyprintergobrrr"
networks:
default:
ipv4_address: $APP_GITEA_IP
db:
image: mariadb:10.5.8@sha256:8040983db146f729749081c6b216a19d52e0973134e2e34c0b4fd87f48bc15b0
user: "1000:1000"
restart: on-failure
volumes:
- ${APP_DATA_DIR}/data/db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: "gitea"
MYSQL_USER: "gitea"
MYSQL_PASSWORD: "moneyprintergobrrr"
MYSQL_DATABASE: "gitea"
networks:
default:
ipv4_address: $APP_GITEA_DB_IP

22
apps/registry.json

@ -65,6 +65,28 @@
"defaultPassword": "",
"torOnly": false
},
{
"id": "gitea",
"category": "Development",
"name": "Gitea",
"version": "1.14.3",
"tagline": "A painless self-hosted Git service",
"description": "Gitea is a painless self-hosted Git service. It is similar to GitHub, Bitbucket, and GitLab. It is a community managed lightweight code hosting solution written in Go. Gitea's minimal requirements allow it to run seamlessly on inexpensive hardware like a Raspberry Pi. Features:\n\n- Fully self-hosted and private\n- Issue tracker\n- Account/Organization/Repository management\n- Tor support\n- Repository Git hooks/deploy keys\n- Repository issues, pull requests and wiki\n- Add/Remove repository collaborators\n- Gravatar and custom source\n- Admin panel",
"developer": "Gitea",
"website": "https://gitea.io/en-us/",
"dependencies": [],
"repo": "https://github.com/go-gitea/gitea",
"support": "https://discourse.gitea.io",
"port": 8085,
"gallery": [
"1.jpg",
"2.jpg",
"3.jpg"
],
"path": "",
"defaultPassword": "",
"torOnly": false
},
{
"id": "mempool",
"category": "Explorers",

8
scripts/configure

@ -167,6 +167,10 @@ APP_PIHOLE_PORT="8082"
APP_PIHOLE_IP="10.21.21.36"
APP_HOME_ASSISTANT_PORT="8083"
APP_HOME_ASSISTANT_IP="10.21.21.37"
APP_GITEA_PORT="8085"
APP_GITEA_SSH_PORT="2222"
APP_GITEA_IP="10.21.21.39"
APP_GITEA_DB_IP="10.21.21.40"
# Generate RPC credentials
if [[ -z ${BITCOIN_RPC_USER+x} ]] || [[ -z ${BITCOIN_RPC_PASS+x} ]] || [[ -z ${BITCOIN_RPC_AUTH+x} ]]; then
@ -339,6 +343,10 @@ for template in "${NGINX_CONF_FILE}" "${BITCOIN_CONF_FILE}" "${LND_CONF_FILE}" "
sed -i "s/<app-pihole-ip>/${APP_PIHOLE_IP}/g" "${template}"
sed -i "s/<app-home-assistant-port>/${APP_HOME_ASSISTANT_PORT}/g" "${template}"
sed -i "s/<app-home-assistant-ip>/${APP_HOME_ASSISTANT_IP}/g" "${template}"
sed -i "s/<app-gitea-port>/${APP_GITEA_PORT}/g" "${template}"
sed -i "s/<app-gitea-ssh-port>/${APP_GITEA_SSH_PORT}/g" "${template}"
sed -i "s/<app-gitea-ip>/${APP_GITEA_IP}/g" "${template}"
sed -i "s/<app-gitea-db-ip>/${APP_GITEA_DB_IP}/g" "${template}"
done
##########################################################

4
templates/.env-sample

@ -70,3 +70,7 @@ APP_PIHOLE_PORT=<app-pihole-port>
APP_PIHOLE_IP=<app-pihole-ip>
APP_HOME_ASSISTANT_PORT=<app-home-assistant-port>
APP_HOME_ASSISTANT_IP=<app-home-assistant-ip>
APP_GITEA_PORT=<app-gitea-port>
APP_GITEA_SSH_PORT=<app-gitea-ssh-port>
APP_GITEA_IP=<app-gitea-ip>
APP_GITEA_DB_IP=<app-gitea-db-ip>

5
templates/torrc-sample

@ -96,4 +96,9 @@ HiddenServicePort 80 <app-pihole-ip>:80
HiddenServiceDir /var/lib/tor/app-home-assistant
HiddenServicePort 80 <app-home-assistant-ip>:8123
# gitea Hidden Service
HiddenServiceDir /var/lib/tor/app-gitea
HiddenServicePort 80 <app-gitea-ip>:<app-gitea-port>
HiddenServicePort 22 <app-gitea-ip>:<app-gitea-ssh-port>
HashedControlPassword <password>

Loading…
Cancel
Save