root: allow customisation of ports in compose without override

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-01-17 14:48:02 +01:00
parent 94baaaa5a5
commit 01bb18b8c4
2 changed files with 8 additions and 13 deletions

View file

@ -35,8 +35,8 @@ services:
env_file:
- .env
ports:
- "0.0.0.0:9000:9000"
- "0.0.0.0:9443:9443"
- "0.0.0.0:${AUTHENTIK_PORT_HTTP:-9000}:9000"
- "0.0.0.0:${AUTHENTIK_PORT_HTTPS:-9443}:9443"
worker:
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2021.12.5}
restart: unless-stopped

View file

@ -67,20 +67,15 @@ The GeoIP database will automatically be updated every 8 hours.
## Running on Port 80/443
By default, authentik listens on port 9000 for HTTP and 9443 for HTTPS. To change this, you can use a [docker-compose override file](https://docs.docker.com/compose/extends/#adding-and-overriding-configuration).
By default, authentik listens on port 9000 for HTTP and 9443 for HTTPS. To change this, you can set the following variables in `.env`:
Create a file called `docker-compose.override.yml` with the following contents:
```yaml
version: '3.2'
services:
server:
ports:
- "0.0.0.0:80:9000"
- "0.0.0.0:443:9443"
```shell
AUTHENTIK_PORT_HTTP=80
AUTHENTIK_PORT_HTTPS=443
```
Afterwards, make sure to run `docker-compose up -d`.
## Startup
Afterwards, run these commands to finish