I am looking for a good deployment tutorial for my slim apps. I am using slim 4 and now every time i want to move to server, I zip the files on my own after running the ‘composer install --no-dev --optimize-autoloader’.
Is there any good tutorial on how to automate this process with intellij or similar?
if you arent looking to run a CD thing for it then you could do something like push to git (version control like github / bitbucket) - since you know … no need to bring a tank when a fly swat will do right… php isnt a “built” language. so its pretty much just pull the latest files, execute composer install, run the migrations. done.
then have say a route to update your app that simply does something like: (obviously add some level of security to it…)
using a proper CI/CD is obviously preferred but meh… if you still using zip and stuff then ouch
you mention move servers but that only happens a very few times. updates happen WAY more often. so for moving servers it would be something like ssh to server (or open cmd) git init, git remote add origin blah, php update.php
if you use the webhooks way then its as simple as in intellij just pushing to master branch or main or whatever branch you set up the hook on and your “production” version is updated.
for me updating is: pull files, composer install (since the composer lock file is included in the repo), run through migrations. done