services: postgres: image: postgres:15 environment: POSTGRES_PASSWORD: "${AUTHENTIK_POSTGRESQL__PASSWORD}" POSTGRES_USER: "authentik" POSTGRES_DB: "authentik" volumes: - postgres_data:/var/lib/postgresql/data command: > postgres -c shared_buffers={{ postgres_shared_buffers }} -c work_mem={{ postgres_work_mem }} -c maintenance_work_mem={{ postgres_maintenance_work_mem }} -c effective_cache_size={{ postgres_effective_cache_size }} restart: unless-stopped redis: image: redis:7 command: ["redis-server", "--maxmemory", "{{ redis_maxmemory }}", "--maxmemory-policy", "allkeys-lru"] restart: unless-stopped server: image: ghcr.io/goauthentik/server:{{ version }} command: server env_file: .env ports: - "{{ bind_address }}:{{ port }}:9000" volumes: - ./blueprints:/blueprints/custom:ro - ./media:/media:ro - ./custom-templates:/templates:ro depends_on: - postgres - redis restart: unless-stopped worker: image: ghcr.io/goauthentik/server:{{ version }} command: worker env_file: .env volumes: - ./blueprints:/blueprints/custom:ro - ./media:/media:ro - ./custom-templates:/templates:ro depends_on: - postgres - redis restart: unless-stopped volumes: postgres_data: