Skip to content

docs/rofl/features: Document public variables#2487

Open
martintomazic wants to merge 2 commits into
mainfrom
martin/docs/public-var
Open

docs/rofl/features: Document public variables#2487
martintomazic wants to merge 2 commits into
mainfrom
martin/docs/public-var

Conversation

@martintomazic

@martintomazic martintomazic commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Closes #2486.

Followed the style of secrets 1:1 (instructed codex to generate text for me and reviewed myself).

E.g. see https://explorer.oasis.io/testnet/sapphire/tx/0c788cbf3be706f6641e6d475d5af126c482e05e6c7dcd5e05e0930364a03db7 for real deployment.

@netlify

netlify Bot commented Jul 15, 2026

Copy link
Copy Markdown

Deploy Preview for oasisprotocol-oasis-sdk ready!

Name Link
🔨 Latest commit 57f31ba
🔍 Latest deploy log https://app.netlify.com/projects/oasisprotocol-oasis-sdk/deploys/6a58d1611199fe000895a93d
😎 Deploy Preview https://deploy-preview-2487--oasisprotocol-oasis-sdk.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.23%. Comparing base (3ba354d) to head (57f31ba).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2487      +/-   ##
==========================================
- Coverage   51.24%   51.23%   -0.02%     
==========================================
  Files         237      237              
  Lines       17294    17294              
==========================================
- Hits         8862     8860       -2     
- Misses       8372     8374       +2     
  Partials       60       60              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@martintomazic
martintomazic force-pushed the martin/docs/public-var branch 3 times, most recently from 0e7a937 to 38c6647 Compare July 15, 2026 14:54
@martintomazic
martintomazic marked this pull request as ready for review July 15, 2026 15:04
Comment thread docs/rofl/features/public_var.md Outdated
Comment thread docs/rofl/features/public_var.md Outdated
Comment thread docs/rofl/features/public_var.md Outdated
Comment thread docs/rofl/features/public_var.md Outdated
environment:
- API_URL=${API_URL}
```

@matevz matevz Jul 16, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add some alternatives such as Compose file and .env, for example:

Suggested change
## Public variables vs Compose file and `.env`
Apart from public variables ROFL developers can expose environment variables directly in the Compose file as literals. For example:
```yaml
services:
test:
image: docker.io/library/alpine:3.21.2@sha256:f3240395711384fc3c07daa46cbc8d73aa5ba25ad1deb97424992760f8cb2b94
command: echo "API URL is $API_URL"
environment:
- API_URL="https://api.example.com/v1"
```
The downside of this approach is that each time the literal is updated, the hash of the Compose file changes and thus the ROFL needs to be rebuilt and redeployed.
Another approach is storing public environment variables inside the `.env` file. In this case, users can investigate the container image to examine environment variables. This approach comes handy during development, because you can feed the same `.env` file locally and then inside production ROFL. However, similarly to the approach above, the container hash will change each time you change the `.env` file and consequently the container hash changes in your Compose file, which requires you to rebuild and redeploy ROFL.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this add value?

  1. Compose file literals probably one can infer from the existing compose syntax.
  2. Alternative doesn't have much to do with public variables, as one can bake arbitrary stuff into docker image, doesn't have to be .env, can be config.toml also.

This approach comes handy during development, because you can feed the same .env file locally and then inside production ROFL.

you can do the same by adding explicit --env-file flag to compose command.

@martintomazic
martintomazic force-pushed the martin/docs/public-var branch from 38c6647 to a10f69e Compare July 16, 2026 12:34
@martintomazic
martintomazic force-pushed the martin/docs/public-var branch from a10f69e to 57f31ba Compare July 16, 2026 12:41
@martintomazic
martintomazic requested a review from matevz July 16, 2026 12:44

@matevz matevz Jul 16, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rename to public_variables.md for consistency? The chapters here are named more SEO-like and not what CLI names the commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: Document rofl public variables

2 participants