From 01bb18b8c4d287ef710b0513f7f68759b55adcc1 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 17 Jan 2022 14:48:02 +0100 Subject: [PATCH] root: allow customisation of ports in compose without override Signed-off-by: Jens Langhammer --- docker-compose.yml | 4 ++-- website/docs/installation/docker-compose.md | 17 ++++++----------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 9cbc8cead..3aa89bbaf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 diff --git a/website/docs/installation/docker-compose.md b/website/docs/installation/docker-compose.md index d2e9f29f0..716af6204 100644 --- a/website/docs/installation/docker-compose.md +++ b/website/docs/installation/docker-compose.md @@ -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