From 843f2e2c2aaf11524fc62cc69555cbc534d1336d Mon Sep 17 00:00:00 2001 From: David Boreham Date: Sun, 12 Feb 2023 22:15:47 +0000 Subject: [PATCH] Basic unattended install --- gitea/docker-compose.yml | 3 ++- gitea/initialize-gitea.sh | 3 +++ gitea/run-this-first.sh | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100755 gitea/initialize-gitea.sh diff --git a/gitea/docker-compose.yml b/gitea/docker-compose.yml index 1af55e9..89888f4 100644 --- a/gitea/docker-compose.yml +++ b/gitea/docker-compose.yml @@ -6,7 +6,7 @@ networks: services: server: - image: gitea/gitea:1.17.1 + image: gitea/gitea:1.18.3 container_name: gitea environment: - USER_UID=1000 @@ -19,6 +19,7 @@ services: - GITEA__server__HTTP_PORT=3000 - GITEA__server__LOCAL_ROOT_URL=http://gitea.local:3000/ - GITEA__server__ROOT_URL=http://gitea.local:3000/ + - GITEA__security__INSTALL_LOCK=true restart: always networks: - gitea diff --git a/gitea/initialize-gitea.sh b/gitea/initialize-gitea.sh new file mode 100755 index 0000000..01bb5c2 --- /dev/null +++ b/gitea/initialize-gitea.sh @@ -0,0 +1,3 @@ +#!/bin/env bash +# Run this script once after bringing up gitea in docker compose +docker compose exec --user git server gitea admin user create --admin --username gitea_admin --password admin1234 --email gitea_admin@example.com diff --git a/gitea/run-this-first.sh b/gitea/run-this-first.sh index a8f6290..efdfc5a 100755 --- a/gitea/run-this-first.sh +++ b/gitea/run-this-first.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/env bash mkdir -p ./gitea mkdir -p ./gitea/ssh mkdir -p ./postgres