fixed domain issue

This commit is contained in:
2026-10-22 16:07:33 +01:00
parent 6193409838
commit 9d15d86613
11 changed files with 33 additions and 17 deletions
+2 -2
View File
@@ -2,8 +2,8 @@
Mongo__ConnectionString=mongodb://127.0.0.1:27017
Mongo__Database=guestops
Keys__Path=./keys
PublicUrl=https://guestops-sandbox.futuresens.co.uk
AllowedHosts=guestops-sandbox.futuresens.co.uk;localhost;127.0.0.1
PublicUrl=https://sandbox-guestops.futuresens.co.uk
AllowedHosts=sandbox-guestops.futuresens.co.uk;localhost;127.0.0.1
Proxy__KnownAddress=127.0.0.1
Google__ClientId=
Google__ClientSecret=
+1 -1
View File
@@ -2,7 +2,7 @@
"acceptedAt": "2026-01-01T00:00:00Z",
"acceptedBy": "REPLACE WITH APPROVER",
"endedAt": "2026-01-01T00:00:00Z",
"environment": "https://guestops-sandbox.futuresens.co.uk",
"environment": "https://sandbox-guestops.futuresens.co.uk",
"mailboxLabel": "sandbox mailbox A",
"operator": "REPLACE WITH OPERATOR",
"releaseCommit": "0000000000000000000000000000000000000000",
+1 -1
View File
@@ -26,7 +26,7 @@ unset RECOVERY_EMAIL
The command uses the configured database, generates a private link, prints it to the administrator's terminal and exits. Share it only with the verified owner. Do not paste it into tickets, chat logs, build logs or source control; avoid running this command in a recorded terminal. It expires in 30 minutes and can be consumed once. Running the command again invalidates the earlier link. Bootstrap remains a create-only command and cannot reset passwords.
`PublicUrl` must be the configured HTTPS origin, such as `https://guestops-sandbox.futuresens.co.uk`. Request Host headers never determine recovery-link origins. The Development-only preview uses `http://127.0.0.1:5173`.
`PublicUrl` must be the configured HTTPS origin, such as `https://sandbox-guestops.futuresens.co.uk`. Request Host headers never determine recovery-link origins. The Development-only preview uses `http://127.0.0.1:5173`.
## Storage and session behavior
+22 -6
View File
@@ -1,7 +1,7 @@
# GuestOps deployment
GuestOps is deployed by the central Futuresens Ansible repository. Sandbox is
`https://guestops-sandbox.futuresens.co.uk` and production is
`https://sandbox-guestops.futuresens.co.uk` and production is
`https://guestops.futuresens.co.uk`.
## Prepare a version
@@ -31,7 +31,7 @@ The server group needs only the application switch, version and subdomain:
```yaml
hasguestops: true
guestopsversion: "0.2.2"
guestopssubdomain: "guestops-sandbox"
guestopssubdomain: "sandbox-guestops"
```
Production uses `guestopssubdomain: "guestops"`. The native services use the
@@ -57,9 +57,25 @@ ansible-playbook playbooks/guestops.yml -K \
The playbook stops the existing systemd services, replaces `/srv/guestops`,
renders its environment configuration, starts the self-contained API and worker,
configures Nginx, and verifies local and public readiness. Port 8080 remains
loopback-only and `/var/lib/guestops/keys` survives redeployment.
configures an HTTP Nginx site when a certificate does not yet exist, and verifies
local readiness. Port 8080 remains loopback-only and
`/var/lib/guestops/keys` survives redeployment.
On the first deployment, create the certificate after the HTTP site is available:
```sh
sudo certbot --nginx \
-d sandbox-guestops.futuresens.co.uk \
--non-interactive \
--agree-tos \
-m dmccallum@futuresens.co.uk \
--redirect
```
For production, use `-d guestops.futuresens.co.uk`. Certbot updates the existing
Nginx site and manages renewal. Later GuestOps deployments detect the certificate
and leave that Certbot-managed site unchanged.
To roll back, select an older retained native `guestopsversion` (version 0.2.2 or
later) in group vars and run the same playbook. MongoDB backup, Filebeat, certificates, and host monitoring
are provided by the existing central infrastructure.
later) in group vars and run the same playbook. MongoDB backup, Filebeat, certificate
renewal, and host monitoring are provided by the existing central infrastructure.
+1 -1
View File
@@ -16,7 +16,7 @@ public sealed class GoogleMailbox(HttpClient http, IConfiguration config, IStore
private readonly IDataProtector protector = protection.CreateProtector("GoogleMailbox.refresh.v1");
private string ClientId => config["Google:ClientId"] ?? "";
private string ClientSecret => config["Google:ClientSecret"] ?? "";
private string Callback => (config["PublicUrl"] ?? "https://guestops-sandbox.futuresens.co.uk").TrimEnd('/') + "/api/integrations/google/callback";
private string Callback => (config["PublicUrl"] ?? "https://sandbox-guestops.futuresens.co.uk").TrimEnd('/') + "/api/integrations/google/callback";
public bool Configured => ClientId.Length > 0 && ClientSecret.Length > 0;
public bool SendingConfigured => Configured && config.GetValue<bool>("Google:EnableSending");
public string AuthorizationUrl(string state) => "https://accounts.google.com/o/oauth2/v2/auth?" + string.Join("&", new Dictionary<string,string> {
+1 -1
View File
@@ -72,7 +72,7 @@ else:
hotel["signature"] = "Persisted across service restart"
request("/api/hotel", "PUT", hotel)
invite = request("/api/team/invite", "POST", {"name": "Deployment Staff", "email": "deployment-staff@example.invalid"})
assert invite["link"].startswith("https://guestops-sandbox.futuresens.co.uk/account#token=")
assert invite["link"].startswith("https://sandbox-guestops.futuresens.co.uk/account#token=")
request("/api/auth/logout", "POST")
request("/api/hotel", expected=401)
print("Production smoke checks passed: built UI, secure cookies, owner login, persisted settings and staff invitation, onboarding and logout.")
+1 -1
View File
@@ -16,7 +16,7 @@ def valid_record():
"desktopBaselineCommit": acceptance.DESKTOP_BASELINE,
"releaseCommit": "a" * 40,
"releaseRecordSha256": "b" * 64,
"environment": "https://guestops-sandbox.futuresens.co.uk",
"environment": "https://sandbox-guestops.futuresens.co.uk",
"browser": {"name": "Microsoft Edge", "version": "140.0.0.0", "operatingSystem": "Windows 11"},
"viewport": {"width": 1440, "height": 900, "deviceScaleFactor": 1},
"hotelTimeZone": "Europe/London",
+1 -1
View File
@@ -21,7 +21,7 @@ def base(system):
return {
"schemaVersion": 1, "system": system, "targetGate": "B",
"releaseCommit": "a" * 40, "releaseRecordSha256": "b" * 64,
"environment": "https://guestops-sandbox.futuresens.co.uk",
"environment": "https://sandbox-guestops.futuresens.co.uk",
"operator": "Acceptance operator", "reviewedBy": "Independent reviewer",
"startedAt": "2026-10-01T09:00:00Z", "endedAt": "2026-10-01T10:00:00Z", "reviewedAt": "2026-10-01T11:00:00Z",
}
+1 -1
View File
@@ -14,7 +14,7 @@ def valid_report():
"system": "google-mailbox",
"releaseCommit": "a" * 40,
"releaseRecordSha256": "b" * 64,
"environment": "https://guestops-sandbox.futuresens.co.uk",
"environment": "https://sandbox-guestops.futuresens.co.uk",
"mailboxLabel": "sandbox mailbox A",
"operator": "Test operator",
"startedAt": "2026-09-29T10:00:00Z",
+1 -1
View File
@@ -17,7 +17,7 @@ def valid_record(gate="B"):
"dataClassification": "synthetic-only",
"releaseCommit": "a" * 40,
"releaseRecordSha256": "b" * 64,
"environment": "https://guestops-sandbox.futuresens.co.uk",
"environment": "https://sandbox-guestops.futuresens.co.uk",
"operator": "Exercise operator",
"incidentCommander": "Incident commander",
"reviewedBy": "Independent reviewer",
+1 -1
View File
@@ -13,7 +13,7 @@ def valid_record():
return {
"schemaVersion": 1, "system": "guestops-supervised-pilot", "targetGate": "B",
"releaseCommit": "a" * 40, "releaseRecordSha256": "b" * 64,
"environment": "https://guestops-sandbox.futuresens.co.uk", "hotelLabel": "pilot-hotel-a",
"environment": "https://sandbox-guestops.futuresens.co.uk", "hotelLabel": "pilot-hotel-a",
"hotelCount": 1, "plannedBusinessDays": 5,
"owners": {"hotelOwner": "Hotel owner", "technicalOwner": "Technical owner", "rollbackDecisionMaker": "Technical owner"},
"startedOn": days[0], "endedOn": days[-1],