refactor: docker setup & example env files - #3360
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
refactor: fortune reco
dnechay
marked this pull request as ready for review
May 21, 2025 13:12
dnechay
marked this pull request as draft
May 22, 2025 11:17
dnechay
marked this pull request as ready for review
May 22, 2025 16:01
Dzeranov
approved these changes
May 26, 2025
flopez7
approved these changes
May 27, 2025
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue tracking
First iteration of #3053.
Tip
GitBook has a review request with updated version of the docs to correspond to this PR, so you can check it for reference while reviewing
Context behind the change
env files refactor
If someone needs to add an env variable they need to add it in 4 places:
.env.exampleENV.mdLast two don't provide much benefit and also not required for app to work, so they also become outdated. This PR changes the approach.
Now when adding new env variable you will have to add it to config and schema (so app will work in general), but no
ENV.mdanymore and.env.examplehas different purpose: it will serve as a minimal subset of valid env variables that are needed to run the app locally, so anyone cancp .env.example .env, replace some secrets and start app for local easily. Person who adds new env variable is responsible for adding a valid default value to config service and/or valid value for anything else to.env.example; for e.g. private keys there also should be a value, but placeholder, e.g.replace_me.Also revisited env vars and removed what is not used.
Ideally we have aligned env vars names (e.g.
RPC_POLYGON_AMOY_URLandRPC_AMOY_URL), but it impacts apps configuration, so better to do in a separate PR later.docker setup refactor
docker-composefiles in apps folder in favor of the one indocker-setupfolder; the goal is to have one valid docker compose file that sets up all necessary infra for services, like postgres, redis and minioMakefile, but also you now can writeyarn docker:infra-upfrom the root in order to start Postgre, Redis & Miniosetup-kv-storescripts to Node.js apps in order to ease local setup.envfrom the service folder and override only necessary valuesWarning
http://exchange-oracle:5000tohttp://exchange-oracle-cvat:5000; same for recording oracle).env.compose, so please update itAs an alternative, you can
downall the setup and recreate it service by service, just updating values on chainWhat's next?
This PR is already big, so decided to split the work. In next iterations/PRs will:
.envfiles for compose setup: the goal is to rely on.env.exampleinstead of different set of env files and have some convenient setup scriptsscripts/web3to be just part ofcoreandsdkHow has this been tested?
cp .env.example .envin each service and start it; make sure it can be started and does basic work (e.g. auth or/jobendpoint)yarn setup:kvstorefrom inside of docker containers to make sure KV values are correctly setRelease plan
Just merge this PR and changes to GitBook docs.
Potential risks; What to monitor; Rollback plan
N/A