Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: authentik default template doesn't expose port in docker-compose #4849

Open
renepanke opened this issue Jan 16, 2025 · 0 comments
Open
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.

Comments

@renepanke
Copy link

Error Message and Logs

The default compose file doesn't expose a port which leads to the initial setup of the app not being possible.

services:
  authentik-server:
    image: 'ghcr.io/goauthentik/server:${AUTHENTIK_TAG:-2024.8.0}'
    restart: unless-stopped
    command: server
    environment:
      - SERVICE_FQDN_AUTHENTIKSERVER_9000
      - 'AUTHENTIK_REDIS__HOST=${REDIS_HOST:-redis}'
      - 'AUTHENTIK_POSTGRESQL__HOST=${POSTGRES_HOST:-postgresql}'
      - 'AUTHENTIK_POSTGRESQL__USER=${SERVICE_USER_POSTGRESQL}'
      - 'AUTHENTIK_POSTGRESQL__NAME=${POSTGRES_DB:-authentik}'
      - 'AUTHENTIK_POSTGRESQL__PASSWORD=${SERVICE_PASSWORD_POSTGRESQL}'
      - 'AUTHENTIK_SECRET_KEY=${SERVICE_PASSWORD_64_AUTHENTIKSERVER}'
      - 'AUTHENTIK_ERROR_REPORTING__ENABLED=${AUTHENTIK_ERROR_REPORTING__ENABLED:-true}'
      - 'AUTHENTIK_EMAIL__HOST=${AUTHENTIK_EMAIL__HOST}'
      - 'AUTHENTIK_EMAIL__PORT=${AUTHENTIK_EMAIL__PORT}'
      - 'AUTHENTIK_EMAIL__USERNAME=${AUTHENTIK_EMAIL__USERNAME}'
      - 'AUTHENTIK_EMAIL__PASSWORD=${AUTHENTIK_EMAIL__PASSWORD}'
      - 'AUTHENTIK_EMAIL__USE_TLS=${AUTHENTIK_EMAIL__USE_TLS}'
      - 'AUTHENTIK_EMAIL__USE_SSL=${AUTHENTIK_EMAIL__USE_SSL}'
      - 'AUTHENTIK_EMAIL__TIMEOUT=${AUTHENTIK_EMAIL__TIMEOUT}'
      - 'AUTHENTIK_EMAIL__FROM=${AUTHENTIK_EMAIL__FROM}'
    volumes:
      - './media:/media'
      - './custom-templates:/templates'
    depends_on:
      postgresql:
        condition: service_healthy
      redis:
        condition: service_healthy
  authentik-worker:
    image: 'ghcr.io/goauthentik/server:${AUTHENTIK_TAG:-2024.8.0}'
    restart: unless-stopped
    command: worker
    environment:
      - 'AUTHENTIK_REDIS__HOST=${REDIS_HOST:-redis}'
      - 'AUTHENTIK_POSTGRESQL__HOST=${POSTGRES_HOST:-postgresql}'
      - 'AUTHENTIK_POSTGRESQL__USER=${SERVICE_USER_POSTGRESQL}'
      - 'AUTHENTIK_POSTGRESQL__NAME=${POSTGRES_DB:-authentik}'
      - 'AUTHENTIK_POSTGRESQL__PASSWORD=${SERVICE_PASSWORD_POSTGRESQL}'
      - 'AUTHENTIK_SECRET_KEY=${SERVICE_PASSWORD_64_AUTHENTIKSERVER}'
      - 'AUTHENTIK_ERROR_REPORTING__ENABLED=${AUTHENTIK_ERROR_REPORTING__ENABLED}'
      - 'AUTHENTIK_EMAIL__HOST=${AUTHENTIK_EMAIL__HOST}'
      - 'AUTHENTIK_EMAIL__PORT=${AUTHENTIK_EMAIL__PORT}'
      - 'AUTHENTIK_EMAIL__USERNAME=${AUTHENTIK_EMAIL__USERNAME}'
      - 'AUTHENTIK_EMAIL__PASSWORD=${AUTHENTIK_EMAIL__PASSWORD}'
      - 'AUTHENTIK_EMAIL__USE_TLS=${AUTHENTIK_EMAIL__USE_TLS}'
      - 'AUTHENTIK_EMAIL__USE_SSL=${AUTHENTIK_EMAIL__USE_SSL}'
      - 'AUTHENTIK_EMAIL__TIMEOUT=${AUTHENTIK_EMAIL__TIMEOUT}'
      - 'AUTHENTIK_EMAIL__FROM=${AUTHENTIK_EMAIL__FROM}'
    user: root
    volumes:
      - '/var/run/docker.sock:/var/run/docker.sock'
      - './media:/media'
      - './certs:/certs'
      - './custom-templates:/templates'
    depends_on:
      postgresql:
        condition: service_healthy
      redis:
        condition: service_healthy
  postgresql:
    image: 'postgres:16-alpine'
    restart: unless-stopped
    healthcheck:
      test:
        - CMD-SHELL
        - 'pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}'
      interval: 2s
      timeout: 10s
      retries: 15
    volumes:
      - 'authentik-db:/var/lib/postgresql/data'
    environment:
      - 'POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL}'
      - 'POSTGRES_USER=${SERVICE_USER_POSTGRESQL}'
      - POSTGRES_DB=authentik
  redis:
    image: 'redis:alpine'
    command: '--save 60 1 --loglevel warning'
    restart: unless-stopped
    healthcheck:
      test:
        - CMD-SHELL
        - 'redis-cli ping | grep PONG'
      interval: 2s
      timeout: 10s
      retries: 15
    volumes:
      - 'redis:/data'

Steps to Reproduce

  1. Log in to coolify.
  2. Create a new resource.
  3. Select authentik from the Services section.
  4. Deploy with default configuration.

Example Repository URL

No response

Coolify Version

v4.0.0-beta.380

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24.04.1 LTS

Additional Information

To resolve this just add the ports clause to the compose file, e.g.:

services:
  authentik-server:
    image: 'ghcr.io/goauthentik/server:${AUTHENTIK_TAG:-2024.8.0}'
    ports:
        - "9000:9000"
    restart: unless-stopped
    command: server
    environment:
      - SERVICE_FQDN_AUTHENTIKSERVER_9000
      - 'AUTHENTIK_REDIS__HOST=${REDIS_HOST:-redis}'
      - 'AUTHENTIK_POSTGRESQL__HOST=${POSTGRES_HOST:-postgresql}'
      - 'AUTHENTIK_POSTGRESQL__USER=${SERVICE_USER_POSTGRESQL}'
      - 'AUTHENTIK_POSTGRESQL__NAME=${POSTGRES_DB:-authentik}'
      - 'AUTHENTIK_POSTGRESQL__PASSWORD=${SERVICE_PASSWORD_POSTGRESQL}'
      - 'AUTHENTIK_SECRET_KEY=${SERVICE_PASSWORD_64_AUTHENTIKSERVER}'
      - 'AUTHENTIK_ERROR_REPORTING__ENABLED=${AUTHENTIK_ERROR_REPORTING__ENABLED:-true}'
      - 'AUTHENTIK_EMAIL__HOST=${AUTHENTIK_EMAIL__HOST}'
      - 'AUTHENTIK_EMAIL__PORT=${AUTHENTIK_EMAIL__PORT}'
      - 'AUTHENTIK_EMAIL__USERNAME=${AUTHENTIK_EMAIL__USERNAME}'
      - 'AUTHENTIK_EMAIL__PASSWORD=${AUTHENTIK_EMAIL__PASSWORD}'
      - 'AUTHENTIK_EMAIL__USE_TLS=${AUTHENTIK_EMAIL__USE_TLS}'
      - 'AUTHENTIK_EMAIL__USE_SSL=${AUTHENTIK_EMAIL__USE_SSL}'
      - 'AUTHENTIK_EMAIL__TIMEOUT=${AUTHENTIK_EMAIL__TIMEOUT}'
      - 'AUTHENTIK_EMAIL__FROM=${AUTHENTIK_EMAIL__FROM}'
    volumes:
      - './media:/media'
      - './custom-templates:/templates'
    depends_on:
      postgresql:
        condition: service_healthy
      redis:
        condition: service_healthy
  authentik-worker:
    image: 'ghcr.io/goauthentik/server:${AUTHENTIK_TAG:-2024.8.0}'
    restart: unless-stopped
    command: worker
    environment:
      - 'AUTHENTIK_REDIS__HOST=${REDIS_HOST:-redis}'
      - 'AUTHENTIK_POSTGRESQL__HOST=${POSTGRES_HOST:-postgresql}'
      - 'AUTHENTIK_POSTGRESQL__USER=${SERVICE_USER_POSTGRESQL}'
      - 'AUTHENTIK_POSTGRESQL__NAME=${POSTGRES_DB:-authentik}'
      - 'AUTHENTIK_POSTGRESQL__PASSWORD=${SERVICE_PASSWORD_POSTGRESQL}'
      - 'AUTHENTIK_SECRET_KEY=${SERVICE_PASSWORD_64_AUTHENTIKSERVER}'
      - 'AUTHENTIK_ERROR_REPORTING__ENABLED=${AUTHENTIK_ERROR_REPORTING__ENABLED}'
      - 'AUTHENTIK_EMAIL__HOST=${AUTHENTIK_EMAIL__HOST}'
      - 'AUTHENTIK_EMAIL__PORT=${AUTHENTIK_EMAIL__PORT}'
      - 'AUTHENTIK_EMAIL__USERNAME=${AUTHENTIK_EMAIL__USERNAME}'
      - 'AUTHENTIK_EMAIL__PASSWORD=${AUTHENTIK_EMAIL__PASSWORD}'
      - 'AUTHENTIK_EMAIL__USE_TLS=${AUTHENTIK_EMAIL__USE_TLS}'
      - 'AUTHENTIK_EMAIL__USE_SSL=${AUTHENTIK_EMAIL__USE_SSL}'
      - 'AUTHENTIK_EMAIL__TIMEOUT=${AUTHENTIK_EMAIL__TIMEOUT}'
      - 'AUTHENTIK_EMAIL__FROM=${AUTHENTIK_EMAIL__FROM}'
    user: root
    volumes:
      - '/var/run/docker.sock:/var/run/docker.sock'
      - './media:/media'
      - './certs:/certs'
      - './custom-templates:/templates'
    depends_on:
      postgresql:
        condition: service_healthy
      redis:
        condition: service_healthy
  postgresql:
    image: 'postgres:16-alpine'
    restart: unless-stopped
    healthcheck:
      test:
        - CMD-SHELL
        - 'pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}'
      interval: 2s
      timeout: 10s
      retries: 15
    volumes:
      - 'authentik-db:/var/lib/postgresql/data'
    environment:
      - 'POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL}'
      - 'POSTGRES_USER=${SERVICE_USER_POSTGRESQL}'
      - POSTGRES_DB=authentik
  redis:
    image: 'redis:alpine'
    command: '--save 60 1 --loglevel warning'
    restart: unless-stopped
    healthcheck:
      test:
        - CMD-SHELL
        - 'redis-cli ping | grep PONG'
      interval: 2s
      timeout: 10s
      retries: 15
    volumes:
      - 'redis:/data'
@renepanke renepanke added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.
Projects
None yet
Development

No branches or pull requests

1 participant