소스 검색

* moved Repository to https://gogs.2dz.fi/InstallAndUse /A

Anton TETERIN 4 달 전
부모
커밋
8849366429
2개의 변경된 파일106개의 추가작업 그리고 8개의 파일을 삭제
  1. 16 2
      README.md
  2. 90 6
      version-control/gogs@Debian12.md

+ 16 - 2
README.md

@@ -1,8 +1,22 @@
 # mgmt
 Management tools (for tasks, inventory (IPM), organizing)
 
+
+
+History
+```
 2023-09-21  + monitoring notes (icinga) from og2k.com /A
+2024-05-23  * moved to https://gogs.2dz.fi/InstallAndUse/mgmt/ /A
+```
+
+
+
 
 
-Books:
-- [Anton's bookshelf](https://og2k.com/books/)
+InstallAndUse on social platforms:
+- Website https://InstallAndUse.com/
+- YouTube https://www.youtube.com/@Install-And-Use
+- Instagram https://instagram.com/InstallAndUse/
+- Repository https://gogs.2dz.fi/InstallAndUse/
+- vKontakte https://vk.com/InstallAndUse/
+- Telegram https://t.me/InstallAndUse/

+ 90 - 6
version-control/gogs@Debian12.md

@@ -47,6 +47,8 @@ server {
         proxy_pass http://localhost:6000;
     }
 }
+
+# Redirection HTTP>HTTPS and Certbot parts will be added later.
 ```
 Enable config, test and restart
 ```bash
@@ -58,10 +60,17 @@ Navigate to http://host/install using WebBrowser
 connect to DB using gogs's user
 
 
+To reset admin's password:
 ```bash
-$ ./gogs admin create-user --name tmpuser --password tmppassword --admin --email email@example.com
+sudo su
+systemctl stop gogs-web-1
+su - gogs
+cd /opt/gogs/
+./gogs admin create-user --name tmpuser --password tmppassword --admin --email email@example.com --config /etc/gogs/conf/app.ini
+exit
+systemctl start gogs-web-1
 ```
-
+Login as tmpuser:tmppassword, Top-Right icon, Admin Panel, Users, do changes, logout-login, remove temp user.
 
 Make config backup and configure:
 ```bash
@@ -74,8 +83,78 @@ edit configuration file
 vi app.ini
 ```
 
-```
-# TODO: include recent config file
+```ini
+BRAND_NAME = gogs.2dz.fi
+RUN_USER   = gogs
+RUN_MODE   = prod
+
+[database]
+TYPE     = mysql
+HOST     = localhost:3306
+NAME     = gogs
+SCHEMA   = public
+USER     = gogs
+PASSWORD = superpass
+SSL_MODE = disable
+PATH     = /opt/gogs/data/gogs.db
+
+[repository]
+ROOT           = /home/gogs/gogs-repositories
+DEFAULT_BRANCH = master
+
+[server]
+DOMAIN           = gogs.2dz.fi
+HTTP_PORT        = 443
+EXTERNAL_URL     = https://gogs.2dz.fi/
+DISABLE_SSH      = false
+SSH_PORT         = 22maybe22
+START_SSH_SERVER = true
+OFFLINE_MODE     = false
+
+# not [mailer], but
+[email]
+ENABLED = true
+# HOST    = external-service:2525
+# USER    = external-auth-user
+# PASSWD  = external-auth-pass
+SUBJECT = [gogs.2dz.fi]
+HOST    = 127.0.0.1:25
+SKIP_VERIFY = true
+FROM    = gogs@2dz.fi
+USE_PLAIN_TEXT = true
+ENABLE_HTML_ALTERNATIVE = false
+
+# not [service], but
+[auth]
+REQUIRE_EMAIL_CONFIRMATION  = true
+DISABLE_REGISTRATION        = false
+ENABLE_REGISTRATION_CAPTCHA = true
+REQUIRE_SIGNIN_VIEW         = false
+REGISTER_EMAIL_CONFIRM      = true
+SHOW_REGISTRATION_BUTTON    = true
+ENABLE_CACHE_AVATAR         = false
+ENABLE_NOTIFY_MAIL          = true
+ENABLE_CAPTCHA              = true
+
+[user]
+ENABLE_EMAIL_NOTIFICATION = true
+
+[picture]
+DISABLE_GRAVATAR        = true
+ENABLE_FEDERATED_AVATAR = false
+
+[session]
+PROVIDER = file
+
+[log]
+MODE      = file
+# LEVEL     = Trace
+LEVEL = Info
+ROOT_PATH = /opt/gogs/log
+
+[security]
+INSTALL_LOCK = true
+SECRET_KEY   = this-is-random
 ```
 
 
@@ -103,7 +182,7 @@ after looking into
 turns out, that:
 ```
 [...]
-./CHANGELOG.md:50:- Configuration section `[mailer]` is no longer used, please use `[email]`.
+./CHANGELOG.md:50:-  Configuration section `[mailer]` is no longer used, please use `[email]`.
 ./CHANGELOG.md:190:- Configuration section `[mailer]` is deprecated and will end support in 0.13.0, please start using `[email]`.
 ```
 begin to understand, that configuration's variables' names are outdated
@@ -119,11 +198,16 @@ https://github.com/gogs/docs/pull/268
 ```
 
 
+# Known issues:
 
+Can not start gogs-web-1. Log directory is not writable for gogs user.
+```
+chown -R gogs:gogs /opt/gogs/log/
+```
 
 
 
-Ref:
+# Ref:
 ```
 https://gogs.io/docs/installation
 https://gogs.io/docs/installation/install_from_packages