Skip to content

Why the db: pull command uses the same path on staging and local? #19

Answered by kszymukowicz
nonzod asked this question in Q&A
Discussion options

You must be logged in to vote

You should not change default_stage yourself. It is set automatically based on .env INSTANCE value!

Look on vendor/sourcebroker/deployer-instance/deployer/config/set.php

<?php

namespace Deployer;

use RuntimeException;
use SourceBroker\DeployerInstance\Env;

set('default_stage', function () {
    $env = new Env();
    $env->load();
    $instance = $env->get('INSTANCE');
    if ($instance === null) {
        throw new RuntimeException(
            'INSTANCE var is no set.',
            1602784218
        );
    }
    return $instance;
});

set('argument_stage', function () {
    return input()->getArgument('stage');
});

Replies: 9 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by kszymukowicz
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #18 on June 26, 2022 21:05.