use docker compose instead of dash, add hint

This commit is contained in:
Ariel Rin 2023-12-26 19:35:11 +10:00
parent ca0cdd6e15
commit 8184461b48
No known key found for this signature in database

View File

@ -8,13 +8,17 @@ You should have the following available on the system you are using to set this
* git
* curl
:::{hint}
If at any point `docker compose` does not work, but `docker-compose` does, you have an older version of Docker (and Compose), please update before continuing. Be cautious of these two commands and any suggestions copy and pasted from the internet
:::
## Setup Guide
1. run `bash <(curl -s https://gitlab.com/allianceauth/allianceauth/-/raw/master/docker/scripts/download.sh)`. This will download all the files you need to install Alliance Auth and place them in a directory named `aa-docker`. Feel free to rename/move this folder.
1. run `./scripts/prepare-env.sh` to set up your environment
1. (optional) Change `PROTOCOL` to `http://` if not using SSL in `.env`
1. run `docker-compose --env-file=.env up -d` (NOTE: if this command hangs, follow the instructions [here](https://www.digitalocean.com/community/tutorials/how-to-setup-additional-entropy-for-cloud-servers-using-haveged))
1. run `docker compose exec allianceauth-gunicorn bash` to open up a terminal inside your auth container
1. run `docker compose --env-file=.env up -d` (NOTE: if this command hangs, follow the instructions [here](https://www.digitalocean.com/community/tutorials/how-to-setup-additional-entropy-for-cloud-servers-using-haveged))
1. run `docker compose exec allianceauth_gunicorn bash` to open up a terminal inside an auth container
1. run `auth migrate`
1. run `auth collectstatic`
1. run `auth createsuperuser`
@ -46,7 +50,7 @@ That's it! You should now be able to access your auth install at <https://auth.y
There are a handful of ways to add packages:
* Running `pip install` in the container
* Running `pip install` in the containers
* Modifying the container's initial command to install packages
* Building a custom Docker image (recommended, and less scary than it sounds!)
@ -55,8 +59,8 @@ 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 <https://package.wiki>, 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. 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. In `docker compose.yml`, comment out the `image` line under `allianceauth` (line 36... ish) and uncomment the `build` section
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`
1. run `auth migrate`
@ -71,9 +75,9 @@ _NOTE: It is recommended that you put any secret values (API keys, database cred
Whether you're using a custom image or not, the version of auth is dictated by $AA_DOCKER_TAG in your `.env` file.
1. To update to a new version of auth, update the version number at the end (or replace the whole value with the tag in the release notes).
1. run `docker-compose pull`
1. run `docker-compose --env-file=.env up -d`
1. run `docker-compose exec allianceauth bash` to open up a terminal inside your auth container
1. run `docker compose pull`
1. run `docker compose --env-file=.env up -d`
1. run `docker compose exec allianceauth_gunicorn bash` to open up a terminal inside your auth container
1. run `allianceauth update myauth`
1. run `auth migrate`
1. run `auth collectstatic`
@ -83,5 +87,5 @@ _NOTE: If you specify a version of allianceauth in your `requirements.txt` in a
### Custom Packages
1. Update the versions in your `requirements.txt` file
1. Run `docker-compose build`
1. Run `docker-compose --env-file=.env up -d`
1. Run `docker compose build`
1. Run `docker compose --env-file=.env up -d`