add notes to building custom image

This commit is contained in:
Ariel Rin 2024-02-24 16:05:50 +10:00
parent f4d8ead54e
commit d6372bd093
No known key found for this signature in database

View File

@ -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 ## (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 ```shell
docker compose pull docker compose pull
@ -88,9 +108,9 @@ docker compose build
## Bring docker back up, migrate, collect static ## Bring docker back up, migrate, collect static
```shell ```shell
docker compose --env-file=.env up -d docker compose --env-file=.env up -d --remove-orphans
docker compose exec allianceauth_gunicorn bash docker compose exec allianceauth_gunicorn bash
auth migrate auth migrate
auth collectstatic auth collectstatic --clear
``` ```