aurweb/docker
Kevin Morris a2d08e441e
fix(docker): run pre-commit run -a once
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-09-11 17:59:45 -07:00
..
config style: Run pre-commit 2022-08-22 22:40:45 +02:00
health fix(docker): fix ca entrypoint logic and healthcheck 2022-08-13 23:43:04 -07:00
scripts fix(docker): run pre-commit run -a once 2022-09-11 17:59:45 -07:00
ca-entrypoint.sh fix(docker): fix ca entrypoint logic and healthcheck 2022-08-13 23:43:04 -07:00
cgit-entrypoint.sh change(docker): use ./data instead of ./cache 2021-11-20 20:05:32 -08:00
cron-entrypoint.sh change(fastapi): setup live database in mariadb-init-entrypoint.sh 2021-11-27 23:29:49 -08:00
fastapi-entrypoint.sh change(fastapi): setup live database in mariadb-init-entrypoint.sh 2021-11-27 23:29:49 -08:00
git-entrypoint.sh change(fastapi): setup live database in mariadb-init-entrypoint.sh 2021-11-27 23:29:49 -08:00
hypercorn.env Docker: add .env configurable FASTAPI_BACKEND 2021-06-24 21:31:49 -07:00
localhost.ext fix(Docker): use cert chain for nginx 2021-09-13 14:19:48 -07:00
logging.conf Docker: add [c]git, nginx, fastapi, php-fpm, ca 2021-06-24 19:02:35 -07:00
mariadb-entrypoint.sh fix(docker): modify db configuration for new tests 2021-11-17 01:36:16 -08:00
mariadb-init-entrypoint.sh change(fastapi): setup live database in mariadb-init-entrypoint.sh 2021-11-27 23:29:49 -08:00
nginx-entrypoint.sh change(docker): use step-ca for CA + cert generation 2021-11-27 16:43:29 -08:00
php-entrypoint.sh change(fastapi): setup live database in mariadb-init-entrypoint.sh 2021-11-27 23:29:49 -08:00
README.md fix(docker): document runtime deps 2022-07-04 21:35:41 +02:00
redis-entrypoint.sh fix(docker): don't run redis with protected mode 2022-06-28 22:14:01 +02:00
sharness-entrypoint.sh feat: support LOG_CONFIG environment variable 2022-01-18 07:27:36 -08:00
smartgit-entrypoint.sh Docker: Fix git sshd 2021-06-27 05:16:12 -07:00
test-mysql-entrypoint.sh feat: support LOG_CONFIG environment variable 2022-01-18 07:27:36 -08:00
tests-entrypoint.sh fix(docker): modify db configuration for new tests 2021-11-17 01:36:16 -08:00

Aurweb and Docker

The INSTALL document details a manual Aurweb setup, but Docker images are also provided here to avoid the complications of database configuration (and so forth).

Setup

Naturally, both docker and docker-compose must be installed, and your Docker service must be started:

systemctl start docker.service

The main image - aurweb - must be built manually:

docker compose build

Starting and Stopping the Services

With the above steps complete, you can bring up an initial cluster:

docker compose up

Subsequent runs will be done with start instead of up. The cluster can be stopped with docker compose stop.

Testing

With a running cluster, execute the following in a new terminal:

docker compose run test

Generating Dummy Data

Before you can make meaningful queries to the cluster, it needs some data. Luckily such data can be generated. First, docker ps to discover the ID of the container running the FastAPI. Then:

docker exec -it <id> /bin/bash
pacman -S words fortune-mod
./schema/gendummydata.py dummy.sql
mysql aurweb < dummy.sql

The generation script may prompt you to install other Arch packages before it can proceed.

Querying the RPC

The Fast (Python) API runs on Port 8444, while the legacy PHP version runs on 8443. You can query one like so:

curl -k "https://localhost:8444/rpc/?v=5&type=search&arg=python"

-k bypasses local certificate issues that curl will otherwise complain about.