#Deploy Laravel in production server

2 messages · Page 1 of 1 (latest)

cold briar
#

So usually my team use basic nginx to deploy. Right now they want to try using octane / docker (frankenphp), I already found that using nginx+octane, but i dont find the docker, especially im confused if i make some change in code, should i build the docker again or something??

neat cypress
# cold briar So usually my team use basic nginx to deploy. Right now they want to try using o...

It's pretty easy to determine when you need to rebuild a docker image

You need to rebuild if:

  • if you made changes to the Dockerfile, like adding php packages
    • this includes changes to files imported by the Dockerfile like: COPY php.ini /etc/php/8.4/cli/conf.d/99-sail.ini which imports the php.ini file when building
  • if you import any environment variables or the like when building and you change them

if you make changes to the docker-compose.yml file like the documentation says with octane
(think it's this)
SUPERVISOR_PHP_COMMAND: '/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan octane:start --workers=2 --task-workers=2 --watch --server=swoole --host=0.0.0.0 --port=80'

You need to run sail down in order to destroy the containers