mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
First off: This commit changes the default development database backend to mysql. sqlite, however, is still completely supported with the caveat that a user must now modify config.dev to use the sqlite backend. While looking into this, it was discovered that our SQLAlchemy backend for mysql (mysql-connector) completely broke model attributes when we switched to utf8mb4_bin (binary) -- it does not correct the correct conversion to and from binary utf8mb4. The new, replacement dependency mysqlclient does. mysqlclient is also recommended in SQLAlchemy documentation as the "best" one available. The mysqlclient backend uses a different exception flow then sqlite, and so tests expecting IntegrityError has to be modified to expect OperationalError from sqlalchemy.exc. So, for each model that we define, check keys that can't be NULL and raise sqlalchemy.exc.IntegrityError if we have to. This way we keep our exceptions uniform. Signed-off-by: Kevin Morris <kevr@0cost.org>
54 lines
1.5 KiB
Text
54 lines
1.5 KiB
Text
; Configuration file for aurweb development.
|
|
;
|
|
; Options are implicitly inherited from conf/config.defaults, which lists all
|
|
; available options for productions, and their default values. This current file
|
|
; overrides only options useful for development, and introduces
|
|
; development-specific options too.
|
|
|
|
[database]
|
|
; Options: mysql, sqlite.
|
|
backend = mysql
|
|
|
|
; If using sqlite, set name to the database file path.
|
|
name = aurweb
|
|
|
|
; MySQL database information. User defaults to root for containerized
|
|
; testing with mysqldb. This should be set to a non-root user.
|
|
user = root
|
|
;password = non-root-user-password
|
|
host = localhost
|
|
;port = 3306
|
|
socket = /var/run/mysqld/mysqld.sock
|
|
|
|
[options]
|
|
aurwebdir = YOUR_AUR_ROOT
|
|
aur_location = http://127.0.0.1:8080
|
|
disable_http_login = 0
|
|
enable-maintenance = 0
|
|
localedir = YOUR_AUR_ROOT/web/locale
|
|
|
|
[notifications]
|
|
; For development/testing, use /usr/bin/sendmail
|
|
sendmail = YOUR_AUR_ROOT/util/sendmail
|
|
sender = notify@localhost
|
|
reply-to = noreply@localhost
|
|
|
|
; Single sign-on; see doc/sso.txt.
|
|
[sso]
|
|
openid_configuration = http://127.0.0.1:8083/auth/realms/aurweb/.well-known/openid-configuration
|
|
client_id = aurweb
|
|
client_secret =
|
|
|
|
[php]
|
|
; Address PHP should bind when spawned in development mode by aurweb.spawn.
|
|
bind_address = 127.0.0.1:8081
|
|
|
|
; Directory containing aurweb's PHP code, required by aurweb.spawn.
|
|
htmldir = YOUR_AUR_ROOT/web/html
|
|
|
|
[fastapi]
|
|
; Address uvicorn should bind when spawned in development mode by aurweb.spawn.
|
|
bind_address = 127.0.0.1:8082
|
|
|
|
; Passphrase FastAPI uses to sign client-side sessions.
|
|
session_secret = secret
|