- Sep 12, 2022
-
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- Aug 23, 2022
-
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- Jan 14, 2022
-
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- Nov 28, 2021
-
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- Nov 10, 2021
-
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- Sep 05, 2021
-
-
Kevin Morris authored
As root, seems that $HOME doesn't work like I expected it to. Tested this before, but I apparently had some cache still holding on. Fixing the issue in this commit here. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- Sep 04, 2021
-
-
Kevin Morris authored
As the new-age Python package manager, Poetry brings a lot of good additions to the table. It allows us to more easily deal with virtualenvs for the project and resolve dependencies. As of this commit, `requirements.txt` is replaced by Poetry, configured at `pyproject.toml`. In Docker and GitLab, we currently use Poetry in a root fashion. We should work toward purely using virtualenvs in Docker, but, for now we'd like to move forward with other things. The project can still be installed to a virtualenv and used on a user's system through Poetry; it is just not yet doing so in Docker. Modifications: * docker/scripts/install-deps.sh * Remove python dependencies. * conf/config.defaults * Script paths have been updated to use '/usr/bin'. * docker/git-entrypoint.sh * Use '/usr/bin/aurweb-git-auth' instead of '/usr/local/bin/aurweb-git-auth'. Additions: * docker/scripts/install-python-deps.sh * A script used purely to install Python dependencies with Poetry. This has to be used within the aurweb project directory and requires system-wide dependencies are installed beforehand. * Also upgrades system-wide pip. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- Aug 29, 2021
-
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Hunter Wittenborn authored
-
- Jun 30, 2021
-
-
Kevin Morris authored
Now, we have `docker/scripts/install-deps.sh`, a script used by both Docker and .gitlab-ci.yml. We can now focus on changing deps in this script along as well as documentation going forward. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- Jun 27, 2021
-
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
This was completely bugged out. This commit fixes git, provides two separate cgit servers for the different URL bases and also supplies a smartgit service for $AURWEB_URL/repo.git interaction. Docker image needs to be rebuilt with this change: $ docker build -t aurweb:latest . Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- Jun 26, 2021
-
-
Kevin Morris authored
This caused a bug where generated locale would not be used. Also, removed appending to /etc/hosts which was bugging out on Mac OS X. archlinux:base-devel seems to come with a valid /etc/hosts. Additionally, remove AUR_CONFIG from Dockerfile. We don't set it up; just use the defaults during installation. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- Jun 25, 2021
-
-
Kevin Morris authored
By default we now use uvicorn because it has a much better developer feedback out of the box. We'll work on hypercorn logging, but for now, hypercorn is usable via: `docker-compose --env-file docker/hypercorn.env up nginx`. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Now, we have a full collection of services used to run aurweb over HTTPS using a self-signed CA. New Docker services: - `ca` - Certificate authority services - When the `ca` service is run, it will (if needed) generate a CA certificate and leaf certificate for localhost AUR access. This ca is then shared with things like nginx to use the leaf certificate. Users can import `./cache/ca.root.pem` into their browser or ca-certificates as a root CA who issued aurweb's certificate. - `git` - Start sshd and set it up for aur git access - `cgit` - Serve cgit with uwsgi on port 3000 - `fastapi` - Serve our FastAPI app with `hypercorn` on port 8000 - `php-fpm` - Serve our PHP-wise aurweb - `nginx` - Serve FastAPI, PHP and CGit with an HTTPS certificate. - PHP: https://localhost:8443 - PHP CGit: https://localhost:8443/cgit - FastAPI: https://localhost:8444 - FastAPI CGit: https://localhost:8444/cgit Short of it: Run ...
-
Kevin Morris authored
Instead of using Dockerfile for everything, we've introduced a docker-compose.yml file and kept the Dockerfile to producing a pure base image for the services defined. docker-compose services: - `mariadb` - Setup mariadb - `sharness` - Run sharness suites - `pytest-mysql` - Run pytest suites with MariaDB - `pytest-sqlite` - Run pytest suites with SQLite - `test` - Run all tests and produce a collective coverage report - This target mounts a cache volume and copies any successful coverage report back to `./cache/.coverage`. Users can run `./util/fix-coverage ./cache/.coverage` to rewrite source code paths and move coverage into place to view reports on your local system. == Get Started == Build `aurweb:latest`. $ docker build -t aurweb:latest . Run all tests via `docker-compose`. $ docker-compose up test You can also purely run `pytest` in SQLite or MariaDB modes. $ docker-compose up pytest-sqlite $ docker-compose up pytest-mysql Or `sharness` alone, which only uses SQLite internally. $ docker-compose up sharness After running tests, coverage reports are stored in `./cache/.coverage`. This database was most likely created in a different path, and so it needs to be sanitized with `./util/fix-coverage`. $ ./util/fix-coverage cache/.coverage Copied coverage db to /path/to/aurweb/.coverage. $ coverage report ... $ coverage html $ coverage xml ... Defined components: **Entrypoints** - mariadb-entrypoint.sh - setup mariadb and run its daemon - test-mysql-entrypoint.sh - setup mysql configurations - test-sqlite-entrypoint.sh - setup sqlite configurations - tests-entrypoint.sh - setup mysql and sqlite configurations **Scripts** - run-mariadb.sh - setup databases - run-pytests.sh - run pytest suites - run-sharness.sh - run sharness suites - run-tests.sh - run both pytests and sharness **Health** - mariadb.sh - A healthcheck script for the mariadb service - pytest.sh - A healthcheck script for the pytest-* services - sharness.sh - A healthcheck script for the sharness service This Docker configuration is setup for tests, but should be extendable for web and git servers. **Changes to Makefile** - Remove `.coverage` in the `clean` target - Add a `coverage` target which prints a report and outputs xml Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- Jun 06, 2021
-
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
This docker file downloads deps, sets up some things beforehand and finishes with running our entire collection of tests. Signed-off-by:
Kevin Morris <kevr@0cost.org> Signed-off-by:
Lukas Fleischer <lfleischer@archlinux.org>
-