Closed mikestreety closed 2 years ago
What INSTANCE env var you have on the instance you do to pull? And is this INSTANCE defined as host in deployer config?
I hadn't set INSTANCE
as I had missed that in the documentation - however it is now set and hasn't made a difference.
It still seems the db:export
command is putting it in the /www/releases/XXX/.dep/database/dumps
folder, whereas the download command is looking in /www/.dep/database/dump
And what INSTANCE you have on the remote? Is deploy.php the same on remote and local?
Command:
$ ./vendor/bin/dep db:pull production
Local .env
INSTANCE="local"
Live .env
:
INSTANCE="production"
The whole git repo gets cloned down so yes, the deploy.php is the same (and deployed just before I tried the pull)
And how are the hosts defined in deploy.php?
Thanks for your replies :)
Local:
/**
* Set local host
*/
host('local')
->hostname('local')
->set('deploy_path', getcwd())
;
Production is split over the php
host('production')
->set('branch', 'main')
;
and a yaml file
production:
hostname: 123.123.123.123
user: theuser
port: 722
Which is loaded with inventory('host.ci.yaml');
I also have the following enabled:
set('driver_typo3cms', true);
@mikestreety plz look on https://github.com/sourcebroker/deployer-extended-database/discussions/19 id this is maybe the same problem as yours
Thanks @kszymukowicz, that did the job.
Took me a minute to work out what was going on!
To summarise, I had added the following to my config (as per the documentation)
/**
* default_stage
*
* If you just run "deploy" what happens?
*/
set('default_stage', 'local');
However, this was obviously forcing local
on the remote. The reason I had done this was for CI purposes, so I could deploy without needing a .env
file on my CI server.
This was resolved with
/**
* default_stage
*
* If you just run "deploy" what happens?
*
* Check if file doesn't exist - e.g. deploying via CI
*/
if (!file_exists(getcwd() . '/.env')) {
set('default_stage', 'local');
}
Hello,
I am using https://github.com/sourcebroker/deployer-extended-typo3 - and the
db:pull
command is failing.It seems the download command is looking in a different place to the export command...
You can see below the export puts it in
/SITE/www/releases/14/.dep/database/dumps
, whereas the download command is looking in/SITE/www/.dep/database/dumps
I also just a verbose
export
and noticed there was a discrepancy in the dumpcodeNot sure if I have some config set up wrong somewhere. Sorry for the vague issue