aurweb/docker
Levente Polyak 439ccd4aa3
feat(docker): add full grafana, prometheus, tempo setup for local dev
This is a very useful stack for local development as well, by allowing
to easily access a local grafana instance and look at the accessed
endpoints, query usage and durations etc.
As a nice side effect this also makes sure we have an easy way to
actually test any changes to the opentelemetry integration in an actual
environment instead of just listening to a raw socket.
2024-08-19 15:26:29 +02:00
..
config feat(docker): add full grafana, prometheus, tempo setup for local dev 2024-08-19 15:26:29 +02:00
health feat(docker): add full grafana, prometheus, tempo setup for local dev 2024-08-19 15:26:29 +02:00
scripts fix(docker): Suppress error PEP-668 2023-06-15 14:19:02 +02:00
ca-entrypoint.sh fix(docker): fix ca entrypoint logic and healthcheck 2022-08-13 23:43:04 -07:00
cgit-entrypoint.sh fix: restore & move cgit html files 2023-04-29 09:55:54 +02: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 housekeep: remove PHP implementation 2023-04-28 16:10:32 +02: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
README.md housekeep: remove PHP implementation 2023-04-28 16:10:32 +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.

docker compose exec fastapi /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. 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.