Closed SemiThin closed 9 months ago
Good morning! Yes, if you want to install on docker, you either ssh into the container, but imho do you not want to expose ssh to the interwebz. So better prefix all commands with docker exec and then again you might get problems with session and cd
.
I have no clue how this works in detail, but I think the best would be to ssh jump host via the host.
hope that helps, good luck!
Good morning! Yes, if you want to install on docker, you either ssh into the container, but imho do you not want to expose ssh to the interwebz. So better prefix all commands with docker exec and then again you might get problems with session and
cd
.I have no clue how this works in detail, but I think the best would be to ssh jump host via the host.
hope that helps, good luck!
I have a PHP nginx mysql container, and Composer is installed inside the PHP container. If I directly ssh the PHP container, but next time I recreate this container, I will have to redeploy ssh, which is not a good choice
I have already resolved it run('docker-compose exec -w /www/project_path/release php composer install');
🥰😍
🥰😍
But there's one thing I didn't understand, the directory should be current. Why doesn't it work when it's current
it's work: run('docker-compose exec -w /www/project_path/release php composer install');
it doesn't work: run('docker-compose exec -w /www/project_path/current php composer install');
Because renaming release to current is the last step. We don’t want to interrupt the web app, so until deployment is finished, we run the old version.
So:
Ah to be explicit: in your script, current is doo early in time, it shows the old release, and after rename you end up with a version without composer install, because it ran in the wrong directory
Because renaming release to current is the last step. We don’t want to interrupt the web app, so until deployment is finished, we run the old version.
So:
- new release is created in releases
- release is a symlink into the new release
- Current shows on the old release
- Deployment runs, composer install, nom install, building, crrating thumbnsils, whatever 🙃
- „Last“ step: mv release current (atomic command, so at everytime there is a current symlink which either shows on old or new release)
- Cleanup (e.g. old releases)
get,thinks
Discussed in https://github.com/deployphp/deployer/discussions/3750