Difference between revisions of "Talk:Gitea"
Jump to navigation
Jump to search
(PostgreSQL db configuration, without password) |
(Code markup in style with the previous guide, need's work) |
||
Line 2: | Line 2: | ||
Install and configure and start the [[PostgreSQL]], then do this to create gitea user and db: | Install and configure and start the [[PostgreSQL]], then do this to create gitea user and db: | ||
− | Switch to | + | {{hc|Switch to postgres user:|2= |
$ $ sudo -u postgres -i | $ $ sudo -u postgres -i | ||
Start create db wizzard: | Start create db wizzard: | ||
Line 11: | Line 11: | ||
then try access the the DB via localhost, cause that's how the gittea will try to access it | then try access the the DB via localhost, cause that's how the gittea will try to access it | ||
$ psql -d gitea -h 127.0.0.1 -W (host localhost and -W without anything for empty password) | $ psql -d gitea -h 127.0.0.1 -W (host localhost and -W without anything for empty password) | ||
+ | }} | ||
Now to edit the /etc/gitea/app.ini | Now to edit the /etc/gitea/app.ini | ||
− | + | ||
Default PostgreSQL port is 5432 if you haven't changed it | Default PostgreSQL port is 5432 if you haven't changed it | ||
+ | {{hc|/etc/gitea/app.ini|2= | ||
[database] | [database] | ||
DB_TYPE = postgres | DB_TYPE = postgres | ||
Line 23: | Line 25: | ||
USER = postgres | USER = postgres | ||
SSL_MODE = disable | SSL_MODE = disable | ||
− | + | }} | |
TODO setup a password, SSL_MODE wanted? | TODO setup a password, SSL_MODE wanted? |
Revision as of 11:30, 22 June 2018
PostgreSQL
Install and configure and start the PostgreSQL, then do this to create gitea user and db:
Switch to postgres user:
$ $ sudo -u postgres -i Start create db wizzard: $ createuser --interactive name gitea, superuser: yes (no idea if its needed) then createdb named gitea using gitea user (its ok to launch the createdb command as regular user as well) $ createdb gitea -U gitea then try access the the DB via localhost, cause that's how the gittea will try to access it $ psql -d gitea -h 127.0.0.1 -W (host localhost and -W without anything for empty password)
Now to edit the /etc/gitea/app.ini
Default PostgreSQL port is 5432 if you haven't changed it
/etc/gitea/app.ini
[database] DB_TYPE = postgres HOST = 127.0.0.1;5432 NAME = gitea PASSWD = USER = postgres SSL_MODE = disable
TODO setup a password, SSL_MODE wanted?