From d6372bd0933d9774ec9e206794c8a094969611ab Mon Sep 17 00:00:00 2001 From: Ariel Rin Date: Sat, 24 Feb 2024 16:05:50 +1000 Subject: [PATCH] add notes to building custom image --- .../v4_docker_migration.md | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/docs/installation-containerized/v4_docker_migration.md b/docs/installation-containerized/v4_docker_migration.md index 91505e94..3d210fe6 100644 --- a/docs/installation-containerized/v4_docker_migration.md +++ b/docs/installation-containerized/v4_docker_migration.md @@ -78,7 +78,27 @@ You will also need to update the `AA_DOCKER_TAG` to the version of V4.x you want ## (Optional) Build Custom Container -If you are using a docker container with a requirements.txt, build one for v4.x as follows +If you are using a docker container with a requirements.txt, You will need to reinstate some customizations. + +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 + ... + ``` + +Now build your custom image ```shell docker compose pull @@ -88,9 +108,9 @@ docker compose build ## Bring docker back up, migrate, collect static ```shell -docker compose --env-file=.env up -d +docker compose --env-file=.env up -d --remove-orphans docker compose exec allianceauth_gunicorn bash auth migrate -auth collectstatic +auth collectstatic --clear ```