Welcome Guest, Not a member yet? Register   Sign In
Codeigniter 4 deployment
#2

(This post was last modified: 07-04-2023, 04:05 AM by dgvirtual.)

(07-02-2023, 02:43 PM)dgvirtual Wrote: Hi, maybe someone could suggest a good resource to learn about Codeigniter app deployment using git directly (or Bitbucket pipelines) and composer.
For others interested: I followed this guide: https://www.educative.io/answers/how-to-...nux-server

and it turned out to be very easy.

I updated the deploy.sh script they offered to include composer install of the vendor packages (I am on a Ubuntu 22.04 server, so use bash):

Code:
echo -e $PWD

echo -e '\e[1m\e[34mEntering the server directory...\e[0m\n'

cd /var/www/my_ci_install_root

echo -e $PWD

echo -e '\e[1m\e[34mPulling code from remote...\e[0m\n'

git pull origin master

echo -e '\e[1m\e[34mInstalling vendor dependencies...\e[0m\n'

/home/myuser/.local/bin/composer install --no-dev

echo -e '\e[1m\e[34mAll done now!\e[0m\n'

And of course this procedure could include other steps, like compiling css, minifying javascript files, etc. The steps on Bitbucked could include running unit tests and other tests.

Overall seems to be a much better process than using sftp client to deploy.
==

Donatas G.
Reply


Messages In This Thread
Codeigniter 4 deployment - by dgvirtual - 07-02-2023, 02:43 PM
RE: Codeigniter 4 deployment - by dgvirtual - 07-03-2023, 06:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB