Merge pull request 'feat: add CIE authentication configuration options and update README' (#3) from cie-bridge-simplified into main
Reviewed-on: #3
This commit was merged in pull request #3.
This commit is contained in:
@@ -146,6 +146,13 @@ Set `DB_NAME`, `DB_USER`, `DB_PASSWORD`, `MYSQL_ROOT_PASSWORD` and
|
||||
origin without quotes or a trailing slash, for example
|
||||
`https://visione.studentindipendenti.it`.
|
||||
|
||||
For CIE auth deploys, also override values that vary by environment:
|
||||
- `CIE_AUTH_SERVICE_BASE_URL`
|
||||
- `CIE_AUTH_START_PATH`
|
||||
- `CIE_AUTH_SHARED_SECRET`
|
||||
- `CIE_AUTH_STATE_TTL_MINUTES`
|
||||
- `CIE_AUTH_DEFAULT_FRONTEND_REDIRECT_URI`
|
||||
|
||||
Docker builds use BuildKit cache mounts for CPM dependencies and `ccache`, so
|
||||
repeat Dokploy builds can reuse Drogon and C++ compilation cache.
|
||||
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@
|
||||
"spec_path": "build/openapi/visione.openapi.json"
|
||||
},
|
||||
"cors": {
|
||||
"allowed_origin": "http://localhost:3000"
|
||||
"allowed_origin": "http://127.0.0.1:3000"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,16 @@ int main()
|
||||
config["custom_config"]["mail"]["smtp_port"] = std::stoi(envSmtpPort);
|
||||
if (const char* envCorsAllowedOrigin = std::getenv("CORS_ALLOWED_ORIGIN"))
|
||||
config["custom_config"]["cors"]["allowed_origin"] = envCorsAllowedOrigin;
|
||||
if (const char* envCieServiceBaseUrl = std::getenv("CIE_AUTH_SERVICE_BASE_URL"))
|
||||
config["custom_config"]["cie_auth"]["service_base_url"] = envCieServiceBaseUrl;
|
||||
if (const char* envCieStartPath = std::getenv("CIE_AUTH_START_PATH"))
|
||||
config["custom_config"]["cie_auth"]["start_path"] = envCieStartPath;
|
||||
if (const char* envCieSharedSecret = std::getenv("CIE_AUTH_SHARED_SECRET"))
|
||||
config["custom_config"]["cie_auth"]["shared_secret"] = envCieSharedSecret;
|
||||
if (const char* envCieStateTtl = std::getenv("CIE_AUTH_STATE_TTL_MINUTES"))
|
||||
config["custom_config"]["cie_auth"]["state_ttl_minutes"] = std::stoi(envCieStateTtl);
|
||||
if (const char* envCieFrontendRedirect = std::getenv("CIE_AUTH_DEFAULT_FRONTEND_REDIRECT_URI"))
|
||||
config["custom_config"]["cie_auth"]["default_frontend_redirect_uri"] = envCieFrontendRedirect;
|
||||
drogon::app().loadConfigJson(config);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
ALTER TABLE teams DROP FOREIGN KEY teams_area_fk;
|
||||
ALTER TABLE reports DROP FOREIGN KEY reports_area_fk;
|
||||
|
||||
ALTER TABLE areas DROP COLUMN active;
|
||||
|
||||
ALTER TABLE teams
|
||||
ADD CONSTRAINT teams_area_fk
|
||||
FOREIGN KEY (area_id) REFERENCES areas(id) ON DELETE SET NULL;
|
||||
|
||||
ALTER TABLE reports
|
||||
ADD CONSTRAINT reports_area_fk
|
||||
FOREIGN KEY (area_id) REFERENCES areas(id) ON DELETE SET NULL;
|
||||
@@ -1,3 +0,0 @@
|
||||
ALTER TABLE users
|
||||
DROP COLUMN password_hash,
|
||||
DROP COLUMN must_change_password;
|
||||
Reference in New Issue
Block a user