From 9f4bf13cc9c136a9d62a209735c91f91be8f4061 Mon Sep 17 00:00:00 2001 From: Ariel Rin Date: Fri, 5 Jan 2024 15:42:39 +1000 Subject: [PATCH] Expand documentation on building a custom image, provide example --- docs/installation-containerized/docker.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/installation-containerized/docker.md b/docs/installation-containerized/docker.md index d75ee3cb..74372c36 100644 --- a/docs/installation-containerized/docker.md +++ b/docs/installation-containerized/docker.md @@ -28,7 +28,7 @@ If at any point `docker compose` does not work, but `docker-compose` does, you h 1. click "Add Proxy Host", with the following settings for auth. The example uses `auth.localhost` for the domain, but you'll want to use whatever address you have auth configured on ![nginx-host](/_static/images/installation/docker/nginx-host.png) 1. click "Add Proxy Host", with the following settings for grafana. The example uses `grafana.localhost` for the domain - ![grafana-host](/_static/images/installation/docker/grafana-host.png)) + ![grafana-host](/_static/images/installation/docker/grafana-host.png) Congrats! You should now see auth running at and grafana at ! @@ -59,7 +59,23 @@ There are a handful of ways to add packages: Using a custom docker image is the preferred approach, as it gives you the stability of packages only changing when you tell them to, along with packages not having to be downloaded every time your container restarts 1. Add each additional package that you want to install to a single line in `conf/requirements.txt`. It is recommended, but not required, that you include a version number as well. This will keep your packages from magically updating. You can lookup packages on , and copy everything after `pip install` from the top of the page to use the most recent version. It should look something like `allianceauth-signal-pings==0.0.7`. Every entry in this file should be on a separate line -1. In `docker compose.yml`, comment out the `image` line under `allianceauth` (line 36... ish) and uncomment the `build` section +1. Modify `docker-compose.yml`, as follows. + * Comment out the `image` line under `allianceauth` + * Uncomment the `build` section + * e.g. + + ```docker + x-allianceauth-base: &allianceauth-base + # image: ${AA_DOCKER_TAG?err} + build: + context: . + dockerfile: custom.dockerfile + args: + AA_DOCKER_TAG: ${AA_DOCKER_TAG?err} + restart: always + ... + ``` + 1. run `docker compose --env-file=.env up -d`, your custom container will be built, and auth will have your new packages. Make sure to follow the package's instructions on config values that go in `local.py` 1. run `docker compose exec allianceauth_gunicorn bash` to open up a terminal inside your auth container 1. run `allianceauth update myauth`