Commit graph

103 commits

Author SHA1 Message Date
moson-mo
32461f28ea
fix(docker): Suppress error PEP-668
When using docker (compose), we don't create a venv and just install
python packages system-wide.

With python 3.11 (PEP 668) we need to explicitly tell pip to allow this.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-06-15 14:19:02 +02:00
moson-mo
ad61c443f4
fix: restore & move cgit html files
restore files accidentally deleted with PHP cleanup.

1325c71712/web/template/cgit
Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-04-29 09:55:54 +02:00
moson-mo
8ca63075e9
housekeep: remove PHP implementation
removal of the PHP codebase

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-04-28 16:10:32 +02:00
Leonidas Spyropoulos
ef2baad7b3
feat: expand on update.py tests and show on Gitlab UI
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-01-27 17:16:25 +00:00
Christian Heusel
f41f090ed7 simplify the docker development setup instructions
use `docker compose exec` instead of `docker ps` and `docker exec`

Signed-off-by: Christian Heusel <christian@heusel.eu>
2023-01-15 09:25:22 +00:00
moson-mo
2150f8bc19
fix(docker): nginx health check
nginx health check always results in "unhealthy":

There is no such option "--no-verify" for curl.
We can use "-k" or "--insecure" for disabling SSL checks.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-01-13 10:26:43 +01:00
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
Leonidas Spyropoulos
310c469ba8
fix: run pre-commit checks instead of flake8 and isort
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2022-09-06 08:07:05 +01:00
Kevin Morris
fbb3e052fe
ci: use cache/virtualenv for test dependencies
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-08-23 02:19:16 -07:00
Joakim Saario
9c6c13b78a
style: Run pre-commit 2022-08-22 22:40:45 +02:00
Kevin Morris
d63615a994
fix(docker): fix ca entrypoint logic and healthcheck
With this commit, it is advised to `rm ./data/root_ca.crt ./data/*.pem`,
as new certificates and a root CA will be generated while utilizing the
step volume.

Closes #367

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-08-13 23:43:04 -07:00
Kevin Morris
829a8b4b81
Revert "fix(docker): apply chown each time sshd is started"
This reverts commit 952c24783b.

The issue found was actually:
- If `./aur.git` exists within the aurweb repository locally,
  it also ends up in the destination, stopping the aurweb_git_data
  volume from being mounted properly.
2022-08-13 20:56:43 -07:00
Kevin Morris
952c24783b
fix(docker): apply chown each time sshd is started
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-08-13 20:13:07 -07:00
Jelle van der Waa
0b03a6871e
fix(docker): document runtime deps 2022-07-04 21:35:41 +02:00
Jelle van der Waa
4a58e1349c
fix(docker): fix typo scheme -> schema 2022-07-04 21:35:06 +02:00
Jelle van der Waa
98f55879d3 fix(docker): don't run redis with protected mode
For our development setup we run a redis container without a
username/password. Redis recently set protected mode by default which
disallows this, turn it off as it has no security implication.
2022-06-28 22:14:01 +02:00
Colin Woodbury
d92f183840
docs(docker): explain how to generate dummy data 2022-02-23 18:12:49 -08:00
Colin Woodbury
27f30212e8
docs(docker): note ports and curl usage 2022-02-21 14:40:18 -08:00
Colin Woodbury
7c36379715
docs(docker): basic usage instructions 2022-02-21 14:18:26 -08:00
Kevin Morris
f7c81ce855
Revert "docker: simplify keyring update"
This reverts commit 2f294480a9.
2022-01-24 14:54:11 -08:00
Kevin Morris
2f294480a9
docker: simplify keyring update
- this wasn't using .pkg-cache before; we should, in case we already
  have the updated package downloaded.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-23 15:47:31 -08:00
Kevin Morris
12f74fc40a
fix: docker cron config timing and doc
This wasn't matching up with what's suggested in doc/maintenance.
This patch resolves that inconsistency.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-18 09:05:47 -08:00
Kevin Morris
7bcc8d7ce7
feat: support LOG_CONFIG environment variable
This variable allows users to override the logging.conf used
for Python logging configuration. By default, this is set
to logging.conf, which is a production config. LOG_CONFIG
is treated relative to [options] aurwebdir.

This patch allows us to specify the logging config as opposed
to copying over logging.conf in our test docker and gitlab
test scripts, as well as ease-of-testing as a developer.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-18 07:27:36 -08:00
Kevin Morris
7f1de72e08
fix(docker): remove logging setup in run-tests.sh
This was left in when we removed logging.prod.conf in a
previous patch. `test-mysql-entrypoint.sh` takes care of
test logging for us now, so this section is unnecessary.

Closes #261

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-18 05:22:00 -08:00
Kevin Morris
bf4662e26f
change(logging): restrict logging.conf & add logging.test.conf
We'll override logging.conf with logging.test.conf for debug logging
needed for tests now, so we can rely on the default logging.conf
for production use.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-17 12:11:08 -08:00
Kevin Morris
42aa12d075
fix(docker): unrestrict --forwarded-allow-ips on (uvi|hyper)corn
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-15 21:04:47 -08:00
Kevin Morris
b092e247fc
fix(docker): update keyring before installing deps
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-15 20:21:40 -08:00
Kevin Morris
34a29df1a8
fix(docker): remove fastapi rewrite rule
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-15 20:19:58 -08:00
Kevin Morris
0f4ead759c
fix(docker): correct proxy configuration
- On non-localhost communication, this whitelists forwarded headers
  on all remote ips
- Add more headers
- Force https X-Forwarded-Proto
- Unset Forwarded header and rely on X-Forwarded-*

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-15 20:11:51 -08:00
Kevin Morris
ec3295ffd4
fix(docker): update archlinux-keyring prior to -Syu
When the Docker image is outdated, we need to fetch updated
archlinux-keyring keys to perform an -Syu without problems.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-15 15:18:23 -08:00
Kevin Morris
88cb1096c0
feat(docker): add more cron scripts
Added the rest:
- aurweb-pkgmaint
- aurweb-usermaint
- aurweb-tuvotereminder
- aurweb-popupdate

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-14 01:02:00 -08:00
Kevin Morris
c4ea1171cd
fix(docker): compile doc during image build
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-13 22:16:17 -08:00
Kevin Morris
1ee8d177b4
fix(docker): rewrite trailing slashes to non-trailing in nginx config
Without this rewriting, we've been running into conversing with
HTTP over HTTPS (400 Bad Request).

TODO: Refactor this entire nginx config to something a bit more
simple and clean.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-10 14:49:53 -08:00
Kevin Morris
9f9b1c1732
change(docker): host fastapi over plain http
We don't need the https certificates being dealt with in the fastapi
service; we will define our certificates in any frontend nginx
running on top.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-10 00:12:01 -08:00
Kevin Morris
a6faf9bd2e
feat(docker): perform migrations when starting the fastapi service
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-06 22:11:03 -08:00
Kevin Morris
e75aa386ea
Merge branch 'pu-cron-fix' into pu
- Removed user specification from cron config.
- Removed logging to /var/log; this commit brings in `-x proc`,
  which logs out to std(out|err).
2021-12-22 14:41:03 -08:00
Hunter Wittenborn
2e12417a6c
Added '-x proc' flag to 'crond' command 2021-12-14 17:02:36 -06:00
Hunter Wittenborn
48973fe036
Fixed incorrect syntax usage and missing environment variables in cron jobs 2021-12-14 16:56:29 -06:00
Kevin Morris
32660881f6
fix(docker): set notifications up in test config
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-09 11:06:29 -08:00
Kevin Morris
7831503c19
fix(docker): use logging.prod.conf for sharness
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-07 15:09:20 -08:00
Kevin Morris
67a6b8360e
fix(docker): remove update and build steps from poetry
`install` includes dependencies present in poetry.lock
and we must stick to them if we wish to pin dependencies.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-28 19:55:12 -08:00
Kevin Morris
dbeebd3b01
change(fastapi): setup live database in mariadb-init-entrypoint.sh
Centralize database setup there and remove all copying of
config.dev from the entrypoint scripts (the Dockerfile
now does it).

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-27 23:29:49 -08:00
Kevin Morris
5b350bc361
change(docker): use aurweb-config to update AUR_CONFIG
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-27 22:49:48 -08:00
Kevin Morris
0726a08677
fix(docker): remove sqlite scripts
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-27 22:46:11 -08:00
Kevin Morris
f3efc18b50
feat(docker): force test db configuration
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-27 22:42:12 -08:00
Kevin Morris
b98159d5b9
change(docker): use step-ca for CA + cert generation
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-27 16:43:29 -08:00
Kevin Morris
e891d7c8e8
change(docker): allow run-pytests to collect coverage
Additionally fix up the argument parsing to be a bit less
flexible.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-22 10:22:01 -08:00
Kevin Morris
d4d9f50b8f
change(docker): use ./data instead of ./cache
For the `git` service, ./data is always used to provide an
optional overriding of ssh host keys. In aur-dev production
containers, most services which use the data mount use an
internal Docker `data` volume instead.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-20 20:05:32 -08:00
Kevin Morris
604901fe74
fix(docker): fix nginx .gz match against cgit snapshots
This only deals with .gz files in the root of the request_uri
and now more. That is: /packages.gz goes through the nginx regex,
but now /cgit/.../snapshot/package.tar.gz is served by the cgit
block.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-20 20:00:53 -08:00
Kevin Morris
c7feecd4b8
housekeep(docker): remove configuration regexes in the nginx service
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-20 19:34:33 -08:00