{"id":27197814,"url":"https://github.com/preaction/env-elope","last_synced_at":"2025-04-09T20:29:39.591Z","repository":{"id":27332157,"uuid":"30806750","full_name":"preaction/Env-Elope","owner":"preaction","description":"Easily manage multiple runtime environments and configurations","archived":false,"fork":false,"pushed_at":"2016-09-03T01:09:08.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-17T21:17:01.193Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/preaction.png","metadata":{"files":{"readme":"README","changelog":"CHANGES","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-14T19:44:47.000Z","updated_at":"2024-04-17T21:17:01.194Z","dependencies_parsed_at":"2022-08-17T18:20:18.989Z","dependency_job_id":null,"html_url":"https://github.com/preaction/Env-Elope","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preaction%2FEnv-Elope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preaction%2FEnv-Elope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preaction%2FEnv-Elope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preaction%2FEnv-Elope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/preaction","download_url":"https://codeload.github.com/preaction/Env-Elope/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248106865,"owners_count":21048811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-09T20:29:39.008Z","updated_at":"2025-04-09T20:29:39.580Z","avatar_url":"https://github.com/preaction.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n    Env::Elope - Configure projects in multiple environments\n\nVERSION\n    version 0.001\n\nSYNOPSIS\n        # lib/My/Project.pm\n        use Env::Elope qw( dist_env_dir );\n        my $config = dist_env_dir( 'My-Project' )-\u003echild( 'db.yml' );\n\n        # share/env/dev/db.yml\n        db_server: dev.example.com\n\n        # share/env/prd/db.yml\n        db_server: example.com\n\n        # On a command line:\n        $ elope dev run_my_project\n        $ elope prd run_my_project\n\nDESCRIPTION\n    Elope helps to manage multiple environments through configuration\n    directories and environment variables. Using the \"elope\" command-line\n    script, a program can be run in any environment, choosing all the right\n    configuration for that environment.\n\n  SETUP\n    To set up Elope, you need:\n\n    A config directory named for each environment\n        The configuration directories should be in each distribution's\n        \"share/env\" directory and should have the same name as the\n        environment they configure. So \"share/env/dev\" will be our \"dev\"\n        environment, and \"share/env/prod\" our \"prod\" environment.\n\n    The \"elope\" command-line utility\n        The elope utility will source in the envrc file for the current\n        environment and then run the command. The elope utility sets the\n        \"ELOPE_ENV\" environment variable that chooses which config directory\n        to use.\n\n    An envrc file named for each environment\n        After installing the elope utility, you must make a directory for\n        your envrc files. If you installed elope to /opt/bin/elope, you\n        should make a directory /opt/etc/envrc and put your envrc files\n        there.\n\n        An envrc file should be named the same as the environment, and\n        should export environment variables like \"PATH\" and\n        \"LD_LIBRARY_PATH\", or maybe configure a Perl local::lib.\n\n            # /opt/etc/envrc/dev\n            # Now that 5.20.2 is released, lets use it in dev to try it\n            PATH=/usr/perlbrew/perls/5.20.2/bin:$PATH\n            eval $( perl -Mlocal::lib=/opt/envs/dev )\n\n            # /opt/etc/envrc/prod\n            # We haven't upgrade to 5.20.2 yet in prod\n            PATH=/usr/perlbrew/perls/5.20.1/bin:$PATH\n            eval $( perl -Mlocal::lib=/opt/envs/prod )\n\n  USING\n    Now that we have our envrc and our config dirs, we can run our scripts\n    with the elope command:\n\n        # Install one of our modules in dev\n        $ elope dev perl Build.PL\n        $ ./Build install\n\n        # Run its tests using the dev configuration\n        $ elope dev prove -lr t\n\n        # Run our server\n        $ elope dev morbo bin/my-mojo-app -l 'http://*:8080'\n\n    If we switch \"dev\" to \"prod\" in any of the above commands, we are\n    running them in production.\n\nSUBROUTINES\n  dist_env_dir DIST, OPTIONS\n    Get the configuration directory for the given \"DIST\". Returns a\n    Path::Tiny object with the given dist path.\n\n    Configuration directories are located in a distribution's \"share/env/\"\n    directory. Which directory is chosen is based on the \"ELOPE_ENV\"\n    environment variable.\n\n    \"OPTIONS\" is a set of key/value pairs for options with the following\n    keys:\n\n        env     - Set the environment name, overriding the current environment\n\nAUTHOR\n    Doug Bell \u003cpreaction@cpan.org\u003e\n\nCOPYRIGHT AND LICENSE\n    This software is copyright (c) 2015 by Doug Bell.\n\n    This is free software; you can redistribute it and/or modify it under\n    the same terms as the Perl 5 programming language system itself.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreaction%2Fenv-elope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreaction%2Fenv-elope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreaction%2Fenv-elope/lists"}