pacificclimate / station-data-portal

Data portal for station data (e.g., BC Station Data, a.k.a. PCDS; Yukon-NWT Station Data); React app
0 stars 0 forks source link

Config via YAML file #139

Closed rod-glover closed 2 years ago

rod-glover commented 2 years ago

This PR brings the app to a production ready state. It has been deployed in a realistic demo deployment, and checks out. Remaining tasks needed for dev/prod deployment are outside of this app proper (proxies, backend, etc.).

Configuration now has over 35 attributes, which is a PITA to manage via env vars. Recent updates used a bastardized mix of JSON-encoded env var values to try to reduce this, but it's messy. This PR moves most configuration values into a YAML file in the public folder that the app fetches and provides as context to all components. Components which need it have easy access to that context. React hooks make this particularly easy.

This PR also updates all configuration info (.env files, YAML files, documentation) to the latest useful values, with comments.

rod-glover commented 2 years ago

No need to repeat actions; docker-compose.yaml is not used in any of them.

rod-glover commented 2 years ago

Tested with a local Docker build and deployment. Success.

rod-glover commented 2 years ago

Local test repeated. Good.

rod-glover commented 2 years ago

Demo deployment

(LGTM)

rod-glover commented 2 years ago

No need to repeat actions

rod-glover commented 2 years ago

Redeployed Demo

Tested all features. LGTM. Ready to merge.