Commit graph

28 commits

Author SHA1 Message Date
Joakim Saario
9c6c13b78a
style: Run pre-commit 2022-08-22 22:40:45 +02:00
Kevin Morris
60f63876c4
change(.gitignore): ignore archives
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-17 01:36:18 -08:00
Kevin Morris
0c37216626
change(gitignore): add various exclusions
Three new root directories are ignored by git:

- /personal/
    - Personal tools excluded by git.
- /notes/
    - Personal notes excluded by git.
- /vendor/
    - PHP Composer vendor directory. We don't want to commit this
      to git.

And one specific root file:

- /taskell.md
    - Data file for the `taskell` program, used for task tracking.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-10-16 15:08:42 -07:00
Hunter Wittenborn
e61050adcf Added env/ to .gitignore
Folder will be used under virtualenv for pip dependencies
2021-08-28 19:31:11 -05:00
Hunter Wittenborn
e69004bc4a Alphabetized .gitignore file so it looks prettier 2021-08-28 19:29:44 -05:00
Hunter Wittenborn
0075ba3c33 Added .python-version from Pyenv 2021-08-28 19:27:36 -05:00
Kevin Morris
7542798335 .gitignore: add more user configs and Python build files
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-07-10 14:57:19 -07:00
Kevin Morris
80ce10eb0f add /pyrightconfig.json to .gitignore
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-07-02 11:29:00 -07:00
Kevin Morris
7d695f0c6a Update .gitignore
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-06-28 09:53:05 -07:00
Kevin Morris
2a3df086d3 Docker: add [c]git, nginx, fastapi, php-fpm, ca
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 the following in a shell to run PHP and FastAPI
servers on port **8443** and **8444**, respectively.

    $ docker-compose up nginx

This will host the PHP, FastAPI, CGit and Git ecosystems.

Git SSH can be knocked at `aur@localhost:2222` as long as you have a
valid public key in the aurweb database.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-06-24 19:02:35 -07:00
Kevin Morris
5bd46d18a3 Improve Docker ecosystem
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>
2021-06-24 19:02:35 -07:00
Leonidas Spyropoulos
64bc93926f Add support for configuring database with port instead of socket
Signed-off-by: Leonidas Spyropoulos <artafinde@gmail.com>
2021-06-05 20:11:17 -07:00
Kevin Morris
4230772e3b add .coveragerc, update .gitignore
Now, .coveragerc enforces a minimum overall 82% coverage, as is
the current standing. Providing less than 100% coverage for added
code should reduce the overall coverage and eventually reach 81%
or below, causing coverage report to fail on execution.

Developers should increase the failure minimum as they increase
coverage across the uncovered code.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-06-05 19:49:19 -07:00
Lukas Fleischer
62b413f6b7 .gitignore: add test/trash directory*
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2021-02-20 11:25:21 -05:00
Lukas Fleischer
f7f5152be5 .gitignore: add schema/aur-schema-sqlite.sql
The SQLite schema is generated automatically from the main schema and
used in the test suite.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2019-11-24 14:01:28 -05:00
Lukas Fleischer
85866796a4 Move configuration to /etc/aurweb/config
Since d4fe77a (Reorganize Git interface scripts, 2016-10-08), the key
components of the aurweb SSH interface are installed system-wide. Update
the default configuration path to point to a central location.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-17 15:13:05 +02:00
Lukas Fleischer
fdccd272f0 Update .gitignore
Remove obsolete files. Add byte-compiled Python files and test results.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-08 14:35:37 +02:00
Leonidas Spyropoulos
684f95bea1 .gitignore: Add aur-git/ and git-interface/git-auth.sh
Signed-off-by: Leonidas Spyropoulos <artafinde@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-17 10:40:13 +02:00
Lukas Fleischer
84061604aa Update .gitignore
* Remove user-specific configuration.
* Update with latest changes to the configuration file and templates.
* Order entries alphabetically.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-02-04 18:46:55 +01:00
Lukas Fleischer
35e6388fad Auto-generate po/POTFILES
Reduce maintenance costs by auto-generating po/POTFILES in the Makefile.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-27 21:54:38 +02:00
elij
888db089c5 rename *.inc files to *.inc.php and adjust imports and references
Lukas: Add note to "UPGRADING".

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-06-22 15:15:04 +02:00
Lukas Fleischer
a85f140ace Add ".mo" and ".po~" files to ".gitignore".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10 16:27:49 +02:00
Lukas Fleischer
b2a04c1238 Add locale directories to ".gitignore".
Ensure we never `git add` any of those by accident.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10 15:40:50 +02:00
Loui Chang
5454347fe9 Make git ignore .htaccess, robots.txt and dummy-data.sql.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-23 02:47:04 -05:00
Nathan Jones
b87c8a4ba8 Document how to generate the test data.
Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-03 14:50:04 -05:00
Simo Leone
675e5fc841 Added rss caches to gitignore 2008-01-20 03:48:09 -06:00
eliott
0cda12132d Updated .gitignore again 2008-01-19 23:49:35 -06:00
eliott
ac8291a5dc Changes to bring the main arch site theme to the aur. 2007-09-22 12:09:00 -07:00