Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

service get: from other env will overwrite the domains in service.json #25

Open
alexkli opened this issue Feb 22, 2025 · 0 comments
Open

Comments

@alexkli
Copy link
Contributor

alexkli commented Feb 22, 2025

Problem

Running edgly service get with -e <non-prod> pointing to any non production environment will overwrite the (production) domains in the service.json.

However, the production domains are currently expected to be in the stored service.json, they are not in the edgly.yaml. If they get removed, they are lost and updating the production service would change its domain names now. And furthermore the mapping to other domains for other environments (defined in edgly.yaml) won't work anymore either since it's based on replacing by the production hostnames.

Solution

Options:

  1. Detect this and avoid the overwrite when doing edgly service get -e <non-prod>
  2. Change the configuration in edgly.yaml to include the list of production domains there as well
    • and on service update always replace the domain list in service.json with the one from edgly.yaml for the selected environment
    • basically ignore what's persisted in service.json > domains
    • possible format
      env:
        production:
          id: 12345
          domains:
            - "api.example.com"
            - domain: "www.example.com"
              comment: "example website"
        stage:
          id: 67890
          domains:
            - "api-stage.example.com"
            - "www-stage.example.com"
      
@alexkli alexkli changed the title service get -e stage will overwrite the domains in service.json service get: from other env will overwrite the domains in service.json Feb 22, 2025
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

No branches or pull requests

1 participant