You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Establish the official Game Foundry Studio environment governance model and align the active configuration example comments/placeholders with that model.
5
+
Define the official Game Foundry Studio environment configuration standards that build on the OWNER_050 environment model.
6
6
7
7
## Source Of Truth
8
8
9
-
This `BUILD_PR.md` and the user request are the source of truth for `PR_26177_OWNER_050-environment-governance-model`.
9
+
This `BUILD_PR.md` and the user request are the source of truth for `PR_26177_OWNER_051-environment-configuration-standards`.
10
10
11
11
## Exact Scope
12
12
13
-
- Documentation/governance only unless `.env.example` comment or placeholder updates are required.
14
-
- Establish `Local (VS Code) -> DEV -> IST -> UAT -> PROD` as the official environment model.
15
-
- Define the environment invariance rule: the deployable artifact is identical across all environments; only `.env` values and environment-managed secret values differ.
16
-
- Define one shared API/service contract across all environments.
17
-
- Define Supabase Auth, Supabase Postgres, and Cloudflare R2 as required for every environment.
18
-
- Define R2 top-level prefixes:
19
-
-`/local/`
20
-
-`/dev/`
21
-
-`/ist/`
22
-
-`/uat/`
23
-
-`/prod/`
24
-
- Define that all environments receive approved guest seed data for all tools.
25
-
- State SQLite is deprecated/retired and is not an active runtime database.
26
-
- Review `.env.example` and update comments/placeholders to match the official model.
Derived R2 paths for projects, backups, exports, or future storage lanes must stay under the matching top-level prefix for the active environment.
521
522
522
-
The following files are copy-source files only:
523
+
Only `.env.example` is committed to the repository.
524
+
525
+
Real `.env` files are user/environment-owned and must live outside the repo clone or be injected by deployment.
526
+
527
+
Official external environment file names when a copy-source file is used outside the repo clone:
528
+
-`.env.local`
523
529
-`.env.dev`
524
530
-`.env.ist`
525
531
-`.env.uat`
526
-
-`.env.prd` is the legacy copy-source filename for PROD values; new environment governance uses the `PROD` environment name.
532
+
-`.env.prod`
533
+
534
+
Example external layout:
535
+
-`/env/local/.env`
536
+
-`/env/dev/.env`
537
+
-`/env/ist/.env`
538
+
-`/env/uat/.env`
539
+
-`/env/prod/.env`
540
+
-`/GFS/` repo clone
541
+
542
+
The app/runtime reads `.env` values supplied by the target environment. It must not require real `.env` files to be committed inside the repo clone.
543
+
544
+
`.env.prd` is legacy technical debt only. New environment governance uses `.env.prod` for external PROD copy-source naming and the `PROD` environment name.
545
+
546
+
Allowed `GAMEFOUNDRY_ENVIRONMENT` values:
547
+
-`local`
548
+
-`dev`
549
+
-`ist`
550
+
-`uat`
551
+
-`prod`
552
+
553
+
`GAMEFOUNDRY_ENVIRONMENT_LABEL` is display-only and must not drive runtime behavior, API/service selection, database selection, storage selection, or feature behavior.
527
554
528
555
Valid environment stages are:
529
556
-`Local (VS Code)`
@@ -552,6 +579,16 @@ Do not introduce runtime parameters such as:
552
579
553
580
Application code, runtime code, API/service code, and DB runtime scripts must not branch behavior by deployment target name.
554
581
582
+
Host/domain configuration:
583
+
- Local (VS Code) uses `127.0.0.1` hostnames.
584
+
- DEV, IST, UAT, and PROD use configured `*.gamefoundrystudio.com` hostnames.
585
+
- Host/domain differences are configuration values only and must not create separate deployable artifacts or environment-specific code.
586
+
587
+
Feature flag governance:
588
+
- Feature flags must not create permanent environment-specific behavior.
589
+
- Feature flags may be used only for staged rollout, testing, or emergency mitigation.
590
+
- Feature flags must be removed, promoted to normal behavior, or documented as active temporary controls when the rollout, test, or mitigation ends.
591
+
555
592
## RUNTIME SCRIPT NAMING GOVERNANCE
556
593
557
594
Active runtime script names should describe capability rather than vendor/provider.
Define the official environment configuration standards that build on the OWNER_050 environment model.
9
+
10
+
This addendum is governance/documentation only. It does not change runtime behavior, API implementation, storage implementation, database DDL, or secret values.
11
+
12
+
## Source Model
13
+
14
+
This standard builds on:
15
+
16
+
```text
17
+
Local (VS Code) -> DEV -> IST -> UAT -> PROD
18
+
```
19
+
20
+
The deployable artifact must remain identical across all environments.
21
+
22
+
Only `.env` values and environment-managed secret values may differ by environment.
23
+
24
+
Deployable artifacts must not contain environment-specific application code, runtime code, API/service code, database code, storage code, or feature behavior.
25
+
26
+
## Official Environment Files
27
+
28
+
Only `.env.example` is committed to the repository.
29
+
30
+
Real `.env` files are user/environment-owned and must live outside the repo clone or be injected by deployment.
31
+
32
+
Official external environment copy-source file names when a copy-source file is used outside the repo clone:
33
+
34
+
-`.env.local`
35
+
-`.env.dev`
36
+
-`.env.ist`
37
+
-`.env.uat`
38
+
-`.env.prod`
39
+
40
+
Example external layout:
41
+
42
+
-`/env/local/.env`
43
+
-`/env/dev/.env`
44
+
-`/env/ist/.env`
45
+
-`/env/uat/.env`
46
+
-`/env/prod/.env`
47
+
-`/GFS/` repo clone
48
+
49
+
The app/runtime reads `.env` values supplied by the target environment.
50
+
51
+
Runtime startup still reads `.env` values only. The official flow is for each environment to supply those values from outside the repo clone or through deployment injection before validation/startup.
52
+
53
+
`.env.prd` is legacy technical debt only. Do not introduce new references to `.env.prd` except when documenting migration or historical compatibility.
54
+
55
+
## Environment Identity
56
+
57
+
Allowed `GAMEFOUNDRY_ENVIRONMENT` values:
58
+
59
+
-`local`
60
+
-`dev`
61
+
-`ist`
62
+
-`uat`
63
+
-`prod`
64
+
65
+
`GAMEFOUNDRY_ENVIRONMENT` identifies the active configuration lane. It must not cause application, runtime, API/service, database, storage, or feature behavior forks.
66
+
67
+
`GAMEFOUNDRY_ENVIRONMENT_LABEL` is display-only. It may be used for visual labels and diagnostics, but must not drive runtime behavior, API/service selection, database selection, storage selection, or feature behavior.
68
+
69
+
## Host And Domain Configuration
70
+
71
+
Local (VS Code) uses `127.0.0.1` hostnames.
72
+
73
+
DEV, IST, UAT, and PROD use configured `*.gamefoundrystudio.com` hostnames.
74
+
75
+
Host/domain differences are configuration values only. They must not create separate deployable artifacts or environment-specific code.
76
+
77
+
## R2 Prefix Configuration
78
+
79
+
Required Cloudflare R2 top-level prefixes:
80
+
81
+
- Local (VS Code): `/local/`
82
+
- DEV: `/dev/`
83
+
- IST: `/ist/`
84
+
- UAT: `/uat/`
85
+
- PROD: `/prod/`
86
+
87
+
R2 project, backup, export, import, or future storage paths must stay under the matching environment prefix.
88
+
89
+
## API/Service Contract Configuration
90
+
91
+
One shared API/service contract is required across Local (VS Code), DEV, IST, UAT, and PROD.
92
+
93
+
Rules:
94
+
95
+
- API URLs may differ by `.env` only.
96
+
- Do not split Local API and Public API contracts.
97
+
- Do not create environment-specific API/service contracts.
98
+
- Browser/UI/runtime code must use the same API/service contract shape in every environment.
99
+
100
+
## Feature Flag Governance
101
+
102
+
Feature flags must not create permanent environment-specific behavior.
103
+
104
+
Allowed feature flag uses:
105
+
106
+
- staged rollout
107
+
- testing
108
+
- emergency mitigation
109
+
110
+
Feature flags must be removed, promoted to normal behavior, or documented as active temporary controls when the rollout, test, or mitigation ends.
111
+
112
+
Feature flags must not become a substitute for the environment invariance rule.
Copy file name to clipboardExpand all lines: docs_build/dev/ProjectInstructions/addendums/environment_governance_model.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,3 +112,7 @@ Rules:
112
112
## Scope Boundary
113
113
114
114
This governance addendum defines documentation and configuration contract rules only. It does not change runtime code, API implementation code, storage implementation code, database DDL, or secret values.
115
+
116
+
## Related Configuration Standard
117
+
118
+
`docs_build/dev/ProjectInstructions/addendums/environment_configuration_standards.md` defines the official `.env` file names, allowed `GAMEFOUNDRY_ENVIRONMENT` values, display-only environment label rule, host/domain configuration, API URL configuration, and feature flag governance.
0 commit comments