Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Anton Olsson
@eagl3s1ght
composer_options is mentioned on https://deployer.org/docs/flow.html#deployvendors but nowhere else, is this documentation not finished?
edvordo
@edvordo
Can't say if not finished, but it sure doesn't have info I'd expect it to have. Most of what I learned about this tool is form diving into it's source code
Anton Olsson
@eagl3s1ght
Is anyone deploying Wordpress with Deployer here?
1 reply
edvordo
@edvordo
Just laravel for me, sorry.
LaHwFB
@LaHwFB
is there any variable in deployer that returns current release, i set my own variable but it doesnt get updated after i call it the first time
LaHwFB
@LaHwFB
for people who have this same issue of variables not getting updated, here is my solution
task('rls_ver', function(){
    $tmp = run('basename "$(readlink -f "{{deploy_path}}/current")"');
    putenv("rls=$tmp");
});
i call this task everytime i need my release, it may seem not so good but im new to deployer and php
Johnson Sebire
@johnsonsebire

I've deployed my application using Deployer on windows with no errors but I can't access the app as it keeps returning 403 Forbidden Error.

Can anyone help me look into this?

MOUAD NASSRI
@Hostname47

$ vendor/bin/dep deploy production
✈︎ Deploying master on production
✔ Executing task deploy:prepare
✔ Executing task deploy:lock
➤ Executing task deploy:release
✔ Executing task deploy:failed
➤ Executing task deploy:unlock

In Client.php line 103:

The command "rm -f ~/gladiator.mouad.com/.dep/deploy.lock" failed.

Exit Code: -1 (Unknown error)

Host Name: production

================
ssh: connect to host 173.236.184.12 port 22: Connection timed out

deploy [-p|--parallel] [-l|--limit LIMIT] [--no-hooks] [--log LOG] [--roles ROLES] [--hosts HOSTS] [-o|--option OPTION] [--] [<stage>]

any one could tell me why this fails !?
the command rm is working when I tried it in my git bash
edvordo
@edvordo
try $ vendor/bin/dep deploy production -vvvthere might be some more info in the output, hinting what might have gone wrong
MOUAD NASSRI
@Hostname47

vendor/bin/dep deploy production -vvv
[localhost] > git rev-parse --abbrev-ref HEAD
[localhost] < master
✈︎ Deploying master on production
• done on [production]
➤ Executing task deploy:prepare
[production] > echo $0
[production] < bash
[production] > if [ ! -d ~/gladiator.mouad.com ]; then mkdir -p ~/gladiator.mouad.com; fi
[production] > if [ ! -L ~/gladiator.mouad.com/current ] && [ -d ~/gladiator.mouad.com/current ]; then echo 'true'; fi
[production] > cd ~/gladiator.mouad.com && if [ ! -d .dep ]; then mkdir .dep; fi
[production] > cd ~/gladiator.mouad.com && if [ ! -d releases ]; then mkdir releases; fi
[production] > cd ~/gladiator.mouad.com && if [ ! -d shared ]; then mkdir shared; fi
• done on [production]
✔ Ok [33s 219ms]
➤ Executing task deploy:lock
[production] > if [ -f ~/gladiator.mouad.com/.dep/deploy.lock ]; then echo 'true'; fi
[production] > touch ~/gladiator.mouad.com/.dep/deploy.lock
• done on [production]
✔ Ok [7s 972ms]
➤ Executing task deploy:release
[production] > cd ~/gladiator.mouad.com && (if [ -h release ]; then echo 'true'; fi)
[production] > cd ~/gladiator.mouad.com && (if [ -d releases ] && [ "$(ls -A releases)" ]; then echo 'true'; fi)
[production] < kex_exchange_identification: read: Connection reset by peer
[production] < Connection reset by 173.236.184.xxx port 22
➤ Executing task deploy:failed
• done on [production]
✔ Ok [1ms]
➤ Executing task deploy:unlock
[production] > rm -f ~/gladiator.mouad.com/.dep/deploy.lock
[production] < ssh: connect to host 173.236.184.xxx port 22: Connection timed out

In Client.php line 103:

[Deployer\Exception\RuntimeException (-1)]
The command "rm -f ~/gladiator.mouad.com/.dep/deploy.lock" failed.

Exit Code: -1 (Unknown error)

Host Name: production

================
ssh: connect to host 173.236.184.xxx port 22: Connection timed out

That's the output I get
edvordo
@edvordo
seems like this your issue
[production] < kex_exchange_identification: read: Connection reset by peer
[production] < Connection reset by 173.236.184.xxx port 22
based on quick google search, this can have multiple causes, you'll have to dig through your server logs
MOUAD NASSRI
@Hostname47
I'm trying to deploy this app to a shared hosting and my host provider doesn't give me sudo privelege, and I can't change sshd_config file, Is this okey.
edvordo
@edvordo
try looking through your project logs, you should have access to at least some of them, probably via your host admin panel (whichever that is)
if there is nothing there, then you'll probably have to contact your hosting provider for help
MOUAD NASSRI
@Hostname47
This is the stack trace I get everytime I deploy the app

Exception trace:
at C:\xampp\htdocs\tdd_forum\vendor\deployer\deployer\src\Ssh\Client.php:103
Deployer\Ssh\Client->run() at C:\xampp\htdocs\tdd_forum\vendor\deployer\deployer\src\functions.php:304
Deployer\run() at C:\xampp\htdocs\tdd_forum\vendor\deployer\deployer\recipe\deploy\lock.php:30
Deployer\Deployer::Deployer{closure}() at n/a:n/a
call_user_func() at C:\xampp\htdocs\tdd_forum\vendor\deployer\deployer\src\Task\Task.php:105
Deployer\Task\Task->run() at C:\xampp\htdocs\tdd_forum\vendor\deployer\deployer\src\Executor\SeriesExecutor.php:60
Deployer\Executor\SeriesExecutor->run() at C:\xampp\htdocs\tdd_forum\vendor\deployer\deployer\src\Console\TaskCommand.php:157
Deployer\Console\TaskCommand->execute() at C:\xampp\htdocs\tdd_forum\vendor\symfony\console\Command\Command.php:299
Symfony\Component\Console\Command\Command->run() at C:\xampp\htdocs\tdd_forum\vendor\symfony\console\Application.php:978
Symfony\Component\Console\Application->doRunCommand() at C:\xampp\htdocs\tdd_forum\vendor\deployer\deployer\src\Console\Application.php:133
Deployer\Console\Application->doRunCommand() at C:\xampp\htdocs\tdd_forum\vendor\symfony\console\Application.php:295
Symfony\Component\Console\Application->doRun() at C:\xampp\htdocs\tdd_forum\vendor\symfony\console\Application.php:167
Symfony\Component\Console\Application->run() at C:\xampp\htdocs\tdd_forum\vendor\deployer\deployer\src\Deployer.php:326
Deployer\Deployer::run() at C:\xampp\htdocs\tdd_forum\vendor\deployer\deployer\bin\dep:137

deploy [-p|--parallel] [-l|--limit LIMIT] [--no-hooks] [--log LOG] [--roles ROLES] [--hosts HOSTS] [-o|--option OPTION] [--] [<stage>]

But I can't understand the issue well
edvordo
@edvordo
that's the stack trace on your pc, it just tells you that deployer failed to do its thing, this won't help you, you need server logs
MOUAD NASSRI
@Hostname47
Ahh I send a message to my host provider and it is checking now my account
I will see logs in the server
thanks edvordo
edvordo
@edvordo
np
MOUAD NASSRI
@Hostname47

Thank you very much for waiting Mouad, taking a look in the domain's error logs I am showing the following error:

[Wed Oct 06 07:22:06.774158 2021] [core:crit] [pid 27270:tid 3728604752608] (13)Permission denied: [client 66.248.81.40:40363] AH00529: /home/ssh_user/gladiator.mouad.com/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/ssh_user/gladiator.mouad.com/' is executable

As such it does appear that there may be an issue originating from the domain's .htaccess file when being uploaded to the server.

I don't have .htaccess in the server files
is that required to have !?
edvordo
@edvordo
for deployer, no
but just for fun, create one, leave it empty
and try again
MOUAD NASSRI
@Hostname47
okey I'll try
MOUAD NASSRI
@Hostname47
[Wed Oct 06 07:22:06.774158 2021] [core:crit] [pid 27270:tid 3728609572608] (13)Permission denied: [client 66.249.81.36:40363] AH00529: /home/ssh_user/gladiator.mouad-dev.com/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/ssh_user/gladiator.mouad.com/' is executable
I change permission of /home/ssh_user/gladiator.mouad-dev.com/.htaccess to 755 and htaccess file to 755 as well
but still get this error
any idea
edvordo
@edvordo
no, not really, sorry .. you'll have to resort to googling and/or communicating with your host ..
MOUAD NASSRI
@Hostname47
please what is this command do:
cd ~/gladiator.mouad.com && (if [ -d releases ] && [ "$(ls -A releases)" ]; then echo 'true'; fi)
deployment fail when reach this command (It fails after creating releases, .dep and shared folders
edvordo
@edvordo
not much .. checks whether the "releases" directory exists and is listable .. that's all ..
MOUAD NASSRI
@Hostname47
I talked with the hosting provider and they say that the deploy command alot of memory usage which is limited in my case and they suggest to zip the project and upload it and they unzip it from their end
is that a good approach for first deployment

Wed Oct 06 07:22:06.774158 2021] [core:crit] [pid 87270:tid
37286048572608] (13)Permission denied
AH00529: /home/ssh_user/gladiator.mouad.com/.htaccess pcfg_openfile:
unable to check htaccess file, ensure it is readable and that
'/home/ssh_user/gladiator.mouad-dev.com/' is executable

I am also showing that FTP user of the site: ssh_user has breached RAM
limitations with our internal monitoring system quite a few times today.
This happens when RAM usage breaches 100%. When RAM breaches 100% usage,
this will trigger our internal monitoring system to kill off the
processes using the most amount of RAM. When this happens this can
absolutely lead to either a completely downed site or a very slow site.

This could be occurring when attempting to run the command to deploy the
site if this process is creating a large draw on the server. As such, my
best recommendation would definitely be to attempt uploading a compressed
version of the site where the site can then be unzipped after it has been
uploaded.

If you are still seeing any additional errors after this, please let us
know and we'll be happy to help.

If you have any other questions or concerns please do not hesitate to
reply or join us in live chat! Have a great rest of your day Mouad! :D

edvordo
@edvordo
uploading a zip and unzipping it on th server isn't a bad way to do it, but I personally don't like it .. it may also not solve your issues, the zip still has to be loaded into memory to be extracted, so it still might hit that problem and you can't keep asking your provider to do it for you everytime you want to put out an update ..
Akiode Timothy
@Timbaron
image.png
Hello guys, I'm new to deployer. I tried running dep deploy testing but i'm getting this error.
edvordo
@edvordo
when you ssh to your server, can you access your repo? try running ssh -T ssh@bitbucket.org or wherever you are hosting your code
edvordo
@edvordo
also running the deploy command with -vvv will help you A LOT when debugging issues