From 9e47ac86747f6a2381d5c2f09224f988828ee237 Mon Sep 17 00:00:00 2001 From: pablo Date: Sat, 10 Sep 2022 22:18:25 +0200 Subject: [PATCH] "." --- how_to_install_gitea.md | 73 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 how_to_install_gitea.md diff --git a/how_to_install_gitea.md b/how_to_install_gitea.md new file mode 100644 index 0000000..78881b4 --- /dev/null +++ b/how_to_install_gitea.md @@ -0,0 +1,73 @@ +# Gitea + + +I'm following the instructions here: https://docs.gitea.io/en-us/install-with-docker/ + +Make a `gitea` folder in home. +The `docker-compose.yaml`: + +```yaml +version: "3" + +networks: + gitea: + external: false + +services: + server: + image: gitea/gitea:1.17.1 + container_name: gitea + restart: always + environment: + - USER_UID=${UID} + - USER_GID=${GID} + - GITEA__database__DB_TYPE=postgres + - GITEA__database__HOST=db:5432 + - GITEA__database__NAME=gitea + - GITEA__database__USER=gitea + - GITEA__database__PASSWD=notmysqlhehe + networks: + - gitea + volumes: + - ./data:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - "3000:3000" + - "2222:22" + + depends_on: + - db + + db: + image: postgres:14 + restart: always + environment: + - POSTGRES_USER=gitea + - POSTGRES_PASSWORD=${POSTGRES_PASSPHRASE} + - POSTGRES_DB=gitea + networks: + - gitea + volumes: + - ./postgres:/var/lib/postgresql/data +``` + +This needs to go along a `.env` file in the same folder as the `docker-compose.yaml`. + +```dotenv +POSTGRES_PASSPHRASE=notmysqlhehe +UID=1001 +GID=1001 +``` + +## Modifying configuration + +After the first user has been created (acts as the admin user), I don't want anyone +else being able to sign-up. To achieve this, the configuration file (`~/gitea/data/gitea/conf/app.ini`) +must be modified. + +`DISABLE_REGISTRATION = true` + +Also, to prevent any guest from seeing what they shouldn't: + +`REQUIRE_SIGNIN_VIEW = true`