mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
update more documentation
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
3102736b13
commit
fca175ed84
3 changed files with 55 additions and 21 deletions
4
INSTALL
4
INSTALL
|
@ -4,9 +4,7 @@ Setup on Arch Linux
|
|||
For testing aurweb patches before submission, you can use the instructions in
|
||||
TESTING for testing the web interface only.
|
||||
|
||||
Note that you can only do limited testing using the PHP built-in web server.
|
||||
In particular, the cgit interface will be unusable as well as the ssh+git
|
||||
interface. For a detailed description on how to setup a full aurweb server,
|
||||
For a detailed description on how to setup a full aurweb server,
|
||||
read the instructions below.
|
||||
|
||||
1) Clone the aurweb project and install it (via `python-poetry`):
|
||||
|
|
58
TESTING
58
TESTING
|
@ -5,19 +5,47 @@ Note that this setup is only to test the web interface. If you need to have a
|
|||
full aurweb instance with cgit, ssh interface, etc, follow the directions in
|
||||
INSTALL.
|
||||
|
||||
docker-compose
|
||||
--------------
|
||||
|
||||
1) Clone the aurweb project:
|
||||
|
||||
$ git clone git://git.archlinux.org/aurweb.git
|
||||
|
||||
2) Install the necessary packages:
|
||||
|
||||
# pacman -S --needed php php-sqlite sqlite words fortune-mod \
|
||||
python python-sqlalchemy python-alembic \
|
||||
python-fastapi uvicorn nginx \
|
||||
python-authlib python-itsdangerous python-httpx \
|
||||
words fortune-mod
|
||||
# pacman -S docker-compose
|
||||
|
||||
Ensure to enable the pdo_sqlite extension in php.ini.
|
||||
2) Build the aurweb:latest image:
|
||||
|
||||
$ cd /path/to/aurweb/
|
||||
$ docker-compose build
|
||||
|
||||
3) Run local Docker development instance:
|
||||
|
||||
$ cd /path/to/aurweb/
|
||||
$ docker-compose up -d nginx
|
||||
|
||||
4) Browse to local aurweb development server.
|
||||
|
||||
Python: https://localhost:8444/
|
||||
PHP: https://localhost:8443/
|
||||
|
||||
Bare Metal
|
||||
----------
|
||||
|
||||
1) Clone the aurweb project:
|
||||
|
||||
$ git clone git://git.archlinux.org/aurweb.git
|
||||
|
||||
2) Install the necessary packages:
|
||||
|
||||
# pacman -S python-poetry
|
||||
|
||||
4) Install the package/dependencies via `poetry`:
|
||||
|
||||
$ cd /path/to/aurweb/
|
||||
$ poetry install
|
||||
|
||||
3) Copy conf/config.dev to conf/config and replace YOUR_AUR_ROOT by the absolute
|
||||
path to the root of your aurweb clone. sed can do both tasks for you:
|
||||
|
@ -27,15 +55,23 @@ INSTALL.
|
|||
Note that when the upstream config.dev is updated, you should compare it to
|
||||
your conf/config, or regenerate your configuration with the command above.
|
||||
|
||||
4) Prepare the testing database:
|
||||
4) Prepare a database:
|
||||
|
||||
$ cd /path/to/aurweb/
|
||||
|
||||
$ AUR_CONFIG=conf/config python -m aurweb.initdb
|
||||
$ AUR_CONFIG=conf/config poetry run python -m aurweb.initdb
|
||||
|
||||
$ schema/gendummydata.py data.sql
|
||||
$ sqlite3 aurweb.sqlite3 < data.sql
|
||||
$ poetry run schema/gendummydata.py dummy_data.sql
|
||||
$ mysql -uaur -paur aurweb < dummy_data.sql
|
||||
|
||||
5) Run the test server:
|
||||
|
||||
$ AUR_CONFIG=conf/config python -m aurweb.spawn
|
||||
## set AUR_CONFIG to our locally created config
|
||||
$ export AUR_CONFIG=conf/config
|
||||
|
||||
## with aurweb.spawn
|
||||
$ poetry run python -m aurweb.spawn
|
||||
|
||||
## with systemd service
|
||||
$ sudo install -m644 examples/aurweb.service /etc/systemd/system/
|
||||
$ systemctl enable --now aurweb.service
|
||||
|
|
|
@ -76,16 +76,16 @@ computations and clean up the database:
|
|||
* aurweb-usermaint removes the last login IP address of all users that did not
|
||||
login within the past seven days.
|
||||
|
||||
These scripts can be installed by running `python3 setup.py install` and are
|
||||
These scripts can be installed by running `poetry install` and are
|
||||
usually scheduled using Cron. The current setup is:
|
||||
|
||||
----
|
||||
*/5 * * * * aurweb-mkpkglists [--extended]
|
||||
1 */2 * * * aurweb-popupdate
|
||||
2 */2 * * * aurweb-aurblup
|
||||
3 */2 * * * aurweb-pkgmaint
|
||||
4 */2 * * * aurweb-usermaint
|
||||
5 */12 * * * aurweb-tuvotereminder
|
||||
*/5 * * * * poetry run aurweb-mkpkglists [--extended]
|
||||
1 */2 * * * poetry run aurweb-popupdate
|
||||
2 */2 * * * poetry run aurweb-aurblup
|
||||
3 */2 * * * poetry run aurweb-pkgmaint
|
||||
4 */2 * * * poetry run aurweb-usermaint
|
||||
5 */12 * * * poetry run aurweb-tuvotereminder
|
||||
----
|
||||
|
||||
Advanced Administrative Features
|
||||
|
|
Loading…
Add table
Reference in a new issue