Browse Source

initial commit

Gogs 4 years ago
commit
989c8a4e12
4 changed files with 97 additions and 0 deletions
  1. 10 0
      README.md
  2. 54 0
      gogs/app.ini
  3. 7 0
      gogs/gogs-vhost.conf
  4. 26 0
      gogs/gogs.service

+ 10 - 0
README.md

@@ -0,0 +1,10 @@
+Documentation about things done to set up server. 
+
+# Gogs
+Use binary distribution of Gogs. Only thing changed was the `LANDING_PAGE` directive so that the user will always be taken to the explore page.oSet up Apache2 and systemd for Gogs. A copy of the configuration file is in the gogs folder. 
+
+## Gogs systemd 
+The init [script](gogs/gogs.service) is registered with systemd so it starts server on boot and allows restarting for config changes.
+
+## Gogs Apache2
+The site configuration [file](gogs/gogs-vhost.conf) tells Apache2 to proxy the domain to gogs that is set up by default listening on localhost on port 3000.

+ 54 - 0
gogs/app.ini

@@ -0,0 +1,54 @@
+APP_NAME = tsf
+RUN_USER = wesley
+RUN_MODE = prod
+
+[database]
+DB_TYPE  = sqlite3
+HOST     = 127.0.0.1:3306
+NAME     = gogs
+USER     = root
+PASSWD   = 
+SSL_MODE = disable
+PATH     = data/gogs.db
+
+[repository]
+ROOT = /home/wesley/gogs-repositories
+
+[server]
+DOMAIN           = dusty.thestrengthfoundry.com
+HTTP_PORT        = 3000
+ROOT_URL         = http://dusty.thestrengthfoundry.com/
+DISABLE_SSH      = false
+SSH_PORT         = 22
+START_SSH_SERVER = false
+OFFLINE_MODE     = false
+EXTERNAL_URL 	 = http://git.thestrengthfoundry.com/
+#  when going to root url, the landing page will now be redirected to explore. Home no longer available.
+LANDING_PAGE	 = explore
+
+[mailer]
+ENABLED = false
+
+[service]
+REGISTER_EMAIL_CONFIRM = false
+ENABLE_NOTIFY_MAIL     = false
+DISABLE_REGISTRATION   = false
+ENABLE_CAPTCHA         = true
+REQUIRE_SIGNIN_VIEW    = false
+
+[picture]
+DISABLE_GRAVATAR        = false
+ENABLE_FEDERATED_AVATAR = false
+
+[session]
+PROVIDER = file
+
+[log]
+MODE      = file
+LEVEL     = Info
+ROOT_PATH = /home/wesley/gogs/log
+
+[security]
+INSTALL_LOCK = true
+SECRET_KEY   = ohvgKkfPxkqyun9
+

+ 7 - 0
gogs/gogs-vhost.conf

@@ -0,0 +1,7 @@
+<VirtualHost *:80>
+    ServerName git.thestrengthfoundry.com
+    ProxyPreserveHost On
+    ProxyRequests off
+    ProxyPass / http://127.0.0.1:3000/
+    ProxyPassReverse / http://127.0.0.1:3000/
+</VirtualHost>

+ 26 - 0
gogs/gogs.service

@@ -0,0 +1,26 @@
+[Unit]
+Description=The Wesleys Gogs Service
+
+After=network.target syslog.target nss-lookup.target
+
+[Service]
+# Modify these two values and uncomment them if you have repos with
+# lots of files and get an HTTP error 500 because of that
+#LimitMEMLOCK=infinity
+#LimitNOFILE=65535
+Type=simple
+User=wesley
+Group=wesley
+WorkingDirectory=/home/wesley/gogs
+ExecStart=/home/wesley/gogs/gogs web
+Restart=always
+Environment=USER=wesley HOME=/home/wesley
+# Some distributions may not support these hardening directives. If you cannot start the service due
+# to an unknown option, comment out the ones not supported by your version of systemd.
+ProtectSystem=full
+PrivateDevices=yes
+PrivateTmp=yes
+NoNewPrivileges=true
+
+[Install]
+WantedBy=multi-user.target