Skip to content

Conversation

@kblum
Copy link
Contributor

@kblum kblum commented Sep 26, 2025

Initial changes to get the local Docker development environment running while working on #13.

Image Path

Fix image path in Docker Compose file.

Error:

➜  nginx-ldap-auth-service git:(feature/insecure-mode) ✗ docker-compose up --build
[+] Running 1/1
 ✘ nginx_ldap_auth_service Error pull access denied for nginx-ldap-auth-service, repository does not exist or may require 'docker login': denied: requested access to the reso...                                5.1s
Error response from daemon: pull access denied for nginx-ldap-auth-service, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

Change: 2298374

CSRF_SECRET_KEY

The service will fail to start if the “CSRF_SECRET_KEY” environment variable is not in the .env file.

Log snippet:

File "/app/nginx_ldap_auth/app/main.py", line 87, in <module>

    @CsrfProtect.load_config

     ^^^^^^^^^^^^^^^^^^^^^^^

  File "/ve/lib/python3.13/site-packages/fastapi_csrf_protect/csrf_config.py", line 48, in load_config

    config = LoadConfig(**{key.lower(): value for key, value in settings()})

                                                                ~~~~~~~~^^

  File "/app/nginx_ldap_auth/app/main.py", line 89, in get_csrf_config

    return CsrfSettings()

  File "/ve/lib/python3.13/site-packages/pydantic_settings/main.py", line 176, in __init__

    super().__init__(

    ~~~~~~~~~~~~~~~~^

        **__pydantic_self__._settings_build_values(

        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    ...<26 lines>...

        )

        ^

    )

    ^

  File "/ve/lib/python3.13/site-packages/pydantic/main.py", line 253, in __init__

    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)

pydantic_core._pydantic_core.ValidationError: 1 validation error for CsrfSettings

CSRF_SECRET_KEY

  Field required [type=missing, input_value={}, input_type=dict]

    For further information visit https://errors.pydantic.dev/2.11/v/missing

Change: 31c7901

The service will fail to start if the “CSRF_SECRET_KEY” environment variable is not in the `.env` file.

Log snippet:

```python
…
 File "/app/nginx_ldap_auth/app/main.py", line 87, in <module>

    @CsrfProtect.load_config

     ^^^^^^^^^^^^^^^^^^^^^^^

  File "/ve/lib/python3.13/site-packages/fastapi_csrf_protect/csrf_config.py", line 48, in load_config

    config = LoadConfig(**{key.lower(): value for key, value in settings()})

                                                                ~~~~~~~~^^

  File "/app/nginx_ldap_auth/app/main.py", line 89, in get_csrf_config

    return CsrfSettings()

  File "/ve/lib/python3.13/site-packages/pydantic_settings/main.py", line 176, in __init__

    super().__init__(

    ~~~~~~~~~~~~~~~~^

        **__pydantic_self__._settings_build_values(

        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    ...<26 lines>...

        )

        ^

    )

    ^

  File "/ve/lib/python3.13/site-packages/pydantic/main.py", line 253, in __init__

    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)

pydantic_core._pydantic_core.ValidationError: 1 validation error for CsrfSettings

CSRF_SECRET_KEY

  Field required [type=missing, input_value={}, input_type=dict]

    For further information visit https://errors.pydantic.dev/2.11/v/missing⁠
```
Error:

```sh
➜  nginx-ldap-auth-service git:(feature/insecure-mode) ✗ docker-compose up --build
[+] Running 1/1
 ✘ nginx_ldap_auth_service Error pull access denied for nginx-ldap-auth-service, repository does not exist or may require 'docker login': denied: requested access to the reso...                                5.1s
Error response from daemon: pull access denied for nginx-ldap-auth-service, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
```
@kblum kblum changed the title Fix/dev env Fix development environment Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant