diff --git a/CHANGELOG.md b/CHANGELOG.md index 20304be..46e9563 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Breaking Changes + +- **Docker default port changed from 8080 to 80**: The `ENV DevOidcToolkit__Port=8080` environment variable has been removed from the Dockerfile. The application now listens on port 80 by default (the application's built-in default). Docker port mappings should be updated from `-p 8080:8080` to `-p 8080:80`. This fixes a bug where setting `Port` in `config.json` had no effect (see [#26](https://github.com/BusinessSimulations/dev-oidc-toolkit/issues/26)) + ## [0.6.0] - Add optional SQLite persistence via `Database.SqliteFile` config option; defaults to in-memory when not set (see [#20](https://github.com/BusinessSimulations/dev-oidc-toolkit/issues/20)) diff --git a/DevOidcToolkit.Documentation/docs/configuration.md b/DevOidcToolkit.Documentation/docs/configuration.md index cb06473..43e0723 100644 --- a/DevOidcToolkit.Documentation/docs/configuration.md +++ b/DevOidcToolkit.Documentation/docs/configuration.md @@ -14,7 +14,7 @@ Dev OIDC Toolkit can be configured using environment variables. The environment Here is how to run the application in a Docker container with environment variables: ```bash -docker run -p 8080:8080 \ +docker run -p 8080:80 \ -e DevOidcToolkit__Users__0__Email=test@localhost \ -e DevOidcToolkit__Users__0__FirstName=Test \ -e DevOidcToolkit__Users__0__LastName=User \ @@ -166,7 +166,7 @@ When running the application in a Docker container, the `config.json` file shoul Here is how to run the application in a Docker container with a configuration file mounted: ```bash -docker run -p 8080:8080 -v ./config.json:/app/config.json ghcr.io/businesssimulations/dev-oidc-toolkit +docker run -p 8080:80 -v ./config.json:/app/config.json ghcr.io/businesssimulations/dev-oidc-toolkit ``` ### Reference @@ -485,7 +485,7 @@ In-memory database (default, no persistence): ```json { "DevOidcToolkit": { - "Port": 8080, + "Port": 80, "Issuer": "https://fake-issuer.example.com", "Users": [ { @@ -512,7 +512,7 @@ SQLite database (data persists across restarts): ```json { "DevOidcToolkit": { - "Port": 8080, + "Port": 80, "Database": { "SqliteFile": "/data/dev-oidc-toolkit.db" }, diff --git a/Dockerfile b/Dockerfile index 29854bd..be9cc05 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,11 +36,11 @@ COPY --from=build /app/dist . RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/* +ENV DevOidcToolkit__Address=0.0.0.0 + ENTRYPOINT ["dotnet", "dev-oidc-toolkit.dll"] -ENV DevOidcToolkit__Port=8080 -ENV DevOidcToolkit__Address=0.0.0.0 -EXPOSE 8080 +EXPOSE 80 HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ - CMD curl -f http://localhost:${DevOidcToolkit__Port}/healthz/live || exit 1 + CMD curl -f http://localhost:80/healthz/live || exit 1 diff --git a/README.md b/README.md index 0326ff0..7105f10 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Access the documentatation here: