aurweb/docker
moson 5e803283ec
feat: Switch to postgres
WIP!

Signed-off-by: moson <moson@archlinux.org>
2023-11-12 21:05:38 +01:00
..
config housekeep: TU rename - Table/Column names, scripts 2023-09-30 16:45:05 +02:00
health feat: Switch to postgres 2023-11-12 21:05:38 +01:00
scripts feat: Switch to postgres 2023-11-12 21:05:38 +01:00
ca-entrypoint.sh feat: Switch to postgres 2023-11-12 21:05:38 +01:00
cgit-entrypoint.sh fix: restore & move cgit html files 2023-04-29 09:55:54 +02:00
cron-entrypoint.sh feat: Switch to postgres 2023-11-12 21:05:38 +01:00
fastapi-entrypoint.sh feat: Switch to postgres 2023-11-12 21:05:38 +01:00
git-entrypoint.sh feat: Switch to postgres 2023-11-12 21:05:38 +01: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
nginx-entrypoint.sh change(docker): use step-ca for CA + cert generation 2021-11-27 16:43:29 -08:00
postgres-entrypoint.sh feat: Switch to postgres 2023-11-12 21:05:38 +01:00
postgres-init-entrypoint.sh feat: Switch to postgres 2023-11-12 21:05:38 +01:00
README.md feat: Switch to postgres 2023-11-12 21:05:38 +01: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-postgres-entrypoint.sh feat: Switch to postgres 2023-11-12 21:05:38 +01:00
tests-entrypoint.sh feat: Switch to postgres 2023-11-12 21:05:38 +01: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
su postgres -q -c 'psql 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.