Update Docker

Kevin Morris 2021-09-09 23:11:23 +00:00
parent b5fe6432df
commit 77125753a3

@ -10,6 +10,7 @@ AURWeb's Docker infrastructure is composed of a [Dockerfile](https://gitlab.arch
| memcached | | Live memcached service |
| redis | 16379 | Live Redis service |
| mariadb | 13306 | Live MariaDB service |
| mariadb_init | | MariaDB initialization |
| git | 2222 | AUR Git repository |
| smartgit | | HTTP Git frontend |
| cgit-php | | CGit backend (PHP) |
@ -29,7 +30,21 @@ To get started, you need to build the `aurweb:latest` Docker image by issuing th
$ docker build -t aurweb:latest .
You can then `docker-compose (up|run)` any one of the services.
You can then `docker-compose (up|run)` any one of the services:
$ docker-compose run test
$ docker-compose up -d nginx
Users will notice initially starting up a service can take some time, especially one with many dependencies. After the initial startup, however, users can run services again without much initialization:
$ docker-compose run test # Takes a while...
$ docker-compose run test # Starts instantly.
## Continued Imaging
After building, users do not need to rebuild the image for code changes in the `aurweb` package. Our `fastapi` Docker service takes advantage of hot reload and has shared volume access to `$aurwebdir/aurweb/`. As a user makes changes to the `aurweb` package, the `fastapi` service automatically reloads with the new code. See the `fastapi` service in `docker-compose.yml` for a complete list of shared local directory volumes.
**NOTE** However, an image rebuild is necessary whenever Docker infrastructure changes. This includes `poetry` dependencies or `$aurwebdir/docker/` modifications.
## Development