With mysql/mysqli connections you must use ‘utf8’ without the This defaults to the database’s default encoding forĪll databases other than DB2. Indicates the character set to use when sending SQL statements to The TCP port or Unix socket used to connect to the server. Tables don’t have prefixes, set this to an empty string. The string that prefixes every table name in the database. The name of the database for this connection to use. The database server’s hostname (or IP address). SQLServer you should not enable persistent connections as it causesĭifficult to diagnose crashes in older versions of CakePHP or, as of versionĢ.10.2, an exception will be thrown. Whether or not to use a persistent connection to the database. You can use plugin syntax to indicate plugin datasource to use. The name of the datasource this configuration array is for.Įxamples: Database/Mysql, Database/Sqlserver, Database/Postgres, Database/Sqlite. Setting public $useDbConfig = 'legacy' in the appropriate models.įill out the key/value pairs in the configuration array to best My application has an additional legacy database in addition to theĭefault one, I could use it in my models by creating a new $legacyĭatabase connection array similar to the $default array, and by Specified by the $useDbConfig property in a model. The $default connection array is used unless another connection is etc/nginx/servers-available/gitea.Class DATABASE_CONFIG The following is an example of using nginx as reverse proxy for Gitea over unix socket (you need to provide the SSL certificate): Gitea needs to be restarted after any changes to these files.įor additional information and examples, see the Reverse Proxies section on the Gitea documentation website. In addition, the logo and favicon can be changed by creating the following files: /var/lib/gitea/custom/public/img/logo.svg and /var/lib/gitea/custom/public/img/favicon.svg For instance, to customize the home page, copy templates/home.tmpl from the source code to /var/lib/gitea/custom/templates/home.tmpl and edit the template as desired. The default templates can be found in the Gitea source code under the templates directory. Templates can be overridden by editing files in /var/lib/gitea/custom/templates. The appearance of gitea is highly customizable using Go templates.įirst, create the /var/lib/gitea/custom directory. In the ui section, you can set the DEFAULT_THEME to arc-green for making the web interface use a dark background. etc/systemd/system//nf ĬapabilityBoundingSet=CAP_NET_BIND_SERVICE If you use the built-in SSH server and want Gitea to bind it on port 22, or if you want to bind Gitea webserver directly on ports 80/443 (that is in a setup without proxy), you will need to add a drop-in systemd unit override: You may want to disable HTTP-support if using SSH, by setting DISABLE_HTTP_GIT to true. Restart rvice if you use it (nothing to do if you use sshd.socket).īy default, the ability to interact with repositories by HTTP protocol is enabled. If you use AllowUsers in your SSH configuration, add AllowUsers gitea to it, e.g.: Alternatively, you might have to unlock service account. For ssh access to work, you have to enable PAM. Note: If you set the PROTOCOL to be unix, then you need to unset LOCAL_ROOT_URL or set it to See this comment Configure SSHīy default, Gitea will run as the user gitea this account will also be used for ssh repository access. var/lib/postgres/data/pg_hba.conf local gitea gitea peer Setup the Unix socket by adding the following line to /var/lib/postgres/data/pg_hba.conf: Use PASSWD = `your password` for quoting if you use special characters in the password.Ĭreate the new user while connecting to the server as postgres user: $ psql -host= ip_address -dbname=gitea -username=gitea -passwordĬonfigure Gitea either through the first-run installer or update app.ini: PostgreSQL#Configure PostgreSQL to be accessible from remote hosts With TCP socketĬreate the new user while connecting to the server as postgres user (you will be prompted for a password for the new user):Ĭreate the Gitea database, owned by gitea user: Note: When Gitea and PostgreSQL are on the same machine, you should use a Unix socket, as it is faster and more secure.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |