goauthentik / authentik

The authentication glue you need.
https://goauthentik.io
Other
13.46k stars 899 forks source link

Docker compose not work #11642

Open GitHanter opened 3 weeks ago

GitHanter commented 3 weeks ago

Describe the bug Docker compose with latest version 2024.8.3 not work

Logs

worker-1  | {"event": "Not running as root, disabling permission fixes", "level": "info", "logger": "bootstrap"}
worker-1  | {"event": "Loaded config", "level": "debug", "logger": "authentik.lib.config", "timestamp": 1728491125.5051658, "file": "/authentik/lib/default.yml"}
worker-1  | {"event": "Loaded environment variables", "level": "debug", "logger": "authentik.lib.config", "timestamp": 1728491125.5056453, "count": 29}
worker-1  | {"event": "Starting authentik bootstrap", "level": "info", "logger": "authentik.lib.config", "timestamp": 1728491125.9847383}
worker-1  | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1728491126.986872}
worker-1  | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1728491127.9880776}
worker-1  | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1728491128.989331}
server-1  | {"event":"Loaded config","level":"debug","path":"inbuilt-default","timestamp":"2024-10-09T16:25:25Z"}
server-1  | {"event":"Loaded config","level":"debug","path":"/authentik/lib/default.yml","timestamp":"2024-10-09T16:25:25Z"}
server-1  | {"event":"Loaded config from environment","level":"debug","timestamp":"2024-10-09T16:25:25Z"}
server-1  | {"event":"not enabling debug server, set `AUTHENTIK_DEBUG` to `true` to enable it.","level":"info","logger":"authentik.go_debugger","timestamp":"2024-10-09T16:25:25Z"}
server-1  | {"event":"Starting Metrics server","level":"info","listen":"0.0.0.0:9300","logger":"authentik.router.metrics","timestamp":"2024-10-09T16:25:25Z"}
server-1  | {"event":"Starting HTTP server","level":"info","listen":"0.0.0.0:9000","logger":"authentik.router","timestamp":"2024-10-09T16:25:25Z"}
server-1  | {"event": "Loaded config", "level": "debug", "logger": "authentik.lib.config", "timestamp": 1728491125.6616912, "file": "/authentik/lib/default.yml"}
server-1  | {"event": "Loaded environment variables", "level": "debug", "logger": "authentik.lib.config", "timestamp": 1728491125.6621082, "count": 29}
server-1  | {"event":"Starting HTTPS server","level":"info","listen":"0.0.0.0:9443","logger":"authentik.router","timestamp":"2024-10-09T16:25:25Z"}
server-1  | {"event": "Starting authentik bootstrap", "level": "info", "logger": "authentik.lib.config", "timestamp": 1728491126.284327}
server-1  | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1728491127.285267}
server-1  | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1728491128.2864513}
server-1  | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1728491129.2872844}
worker-1  | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1728491129.990485}
server-1  | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1728491130.2879717}
server-1  | {"error":"authentik starting","event":"failed to proxy to backend","level":"warning","logger":"authentik.router","timestamp":"2024-10-09T16:25:30Z"}

I configured the extra_hosts and env_file in compose file

env_file:
      - .env
extra_hosts:
      - "host.docker.internal:host-gateway"

in .evn file, I have this environment variable

AUTHENTIK_POSTGRESQL__HOST=jdbc:postgresql://host.docker.internal:5432/authentik

seems authentik is not using the environment variables, it try to load config from /authentik/lib/default.yml file

jinnabaalu commented 1 week ago

this is the same issue with mee too.

{"event": "----------------------------------------------------------------------", "level": "info", "logger": "authentik.lib.config", "timestamp": 1729794204.8429248}
{"event": "Secret key missing, check https://goauthentik.io/docs/installation/.", "level": "info", "logger": "authentik.lib.config", "timestamp": 1729794204.8430827}
{"event": "----------------------------------------------------------------------", "level": "info", "logger": "authentik.lib.config", "timestamp": 1729794204.8431728}
{"event": "Loaded config", "level": "debug", "logger": "authentik.lib.config", "timestamp": 1729794256.669919, "file": "/authentik/lib/default.yml"}
{"event": "Loaded environment variables", "level": "debug", "logger": "authentik.lib.config", "timestamp": 1729794256.6704001, "count": 5}
{"event": "Starting authentik bootstrap", "level": "info", "logger": "authentik.lib.config", "timestamp": 1729794257.7798886}