papertank / envoy-deploy Goto Github PK
View Code? Open in Web Editor NEWLaravel Envoy Deployment
License: MIT License
Laravel Envoy Deployment
License: MIT License
Hi,
How do you define multiple environments? I managed to just change the current parameters in the envoy.config.php file but I would like to be able to chose the deployment environment obv. and I don't see how you should define it.
Thx
The ls -1d 20* | head -n -5 | xargs -d \'\n\' sudo rm -Rf;
doesn't work. It seems there is an issue with the '\n'. If i output the command I get the following: ls -1d 20* | head --lines=-1 | xargs -d n sudo rm -Rf
Hi guys, after the deployment, i found that my application storage folder pointed to old folder but the current folder already point to latest version.
I got three version of project in root directory
--- 20211111060137/ old version 1
--- 20211111064441/ old version 2
--- 20211111072800/ -> current
--- Envoy.blade.php
--- storage/
My project showed that current was point to latest project now
current -> /home/vagrant/code/homestead/20211111072800/
When checking the storage folder. The storage/public was not linked to latest project, instead it link with the old project
Inside my storage/
public -> /home/vagrant/code/homestead/20211111060137/storage/app/public/
I was expected storage/public should link to the latest project, which is 20211111072800, but now is not, any idea?
Is anyone having this issue?
It never happened to me prior. I'm using laravel 8, it was fine on 7 before (i also upgraded the dotenv versioning)
❯ envoy run init
In Envoyca58753152131a6f645fe0e2e835f55f.php line 31:
Careful - your deployment path does not begin with /
I followed your instructions and have done the "init" so far. However, when I go to my server to make sure everything is setup properly and to adjust my .env
file, I noticed that git thinks that the storage
dir is now a new file:
$ git st
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# storage
nothing added to commit but untracked files present (use "git add" to track)
Have you come across this as well? If so, is there a good solution here? If I add this "untracked file" to the repo, I'm afraid it will screw things up on my local development box.
It's not a real issue, just a discussion to improve this fantastic product
with this deployment system made with Laravel Envoy we can manage the rollback (restore previous src folder) but not the rollback of the migration/s
It is not complete in my opinion because it should also rollback the (possible) migrations performed previously
The problem from cmdline is that I can't immediately understand if there have been migrations (should I check the migrations table before and after? sich)
Do any of you have forge/envoyer? How do THEY do it in this case?
It would be nice to have an option to easily rollback if something is messed up
Please see examples in the official documentation.
Acording Laravel Passport we should run this in order to generate passport keys on production, once .gitignore
wont version *.keys
files.
php artisan passport:keys
What kind of script change is necessary to handle this?
The generated deployed folder can be
20150317110501/
20150317114500/
current -> ./20150317114500
storage/
.env
and you set as root folder root /home/forge/example.com/current/public;
Should not be the root path root /home/forge/example.com/current/20150317114500/public;
??
I am using apache and facing this issue because for each deploymend the folder name is changed and root must be changed.
I guess the symbolic link should be created with the command
ln -nfs {{ $release_dir }}/* {{ $app_path }}/current
Hi There,
Why is this happening?
My laravel version is 7
╰ envoy run deploy
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Dotenv\Dotenv::create() must be an instance of Dotenv\Repository\RepositoryInterface, string given, called in /mnt/d/Personal Documents/Career/Bluefit/repos/salt-backend/Envoy9fa9ff7f759fea3ad676b08c50729eca.php on line 15 and defined in /mnt/d/Personal Documents/Career/Bluefit/repos/salt-backend/vendor/vlucas/phpdotenv/src/Dotenv.php:62
Stack trace:
It was fine for me on laravel 6.. probably because the dotenv version is changed in laravel 7?
Thanks
After each deploy using this script, my app doesn't seem to properly read environment variables.
While my app can read from the database no problem (using env
variables), it's unable to read an API key I have stored in the same .env
file. When I print out env variables in a class (also DB ones), they always return NULL.
I was only able to fix the problem by adding php {{ $release }}/artisan config:clear --quiet
in the deployment_finish
task, just before the echo "Deployment ({{ $date }}) finished"
. Adding the same command in the deployment_cache
didn't do the trick, I guess the config needs to cleared after the ln -nfs
command?
Won't investigate more for now but you might want to look in to it.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.