You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we use docker-compose, we mount the local development directory into the container at /var/www. This allows us to make modifications in our development environment, and have it reflected in the container so we can instantly see the results.
However, the pre-install setup requires us to run composer install in the container copy of the environment. When we mount the local directory to /var/www, it will overwrite all the pre-install set up that was done when the container was first set up.
So for development purposes now, we must run the pre-install set up manually, only after the environment has been set up.
For production deployments, we don't want to do any manual provisions. The container should be able to be built and configured automatically with minimal manual intervention.
The plan here is to create two Dockerfiles. One for production deployment and one for development. The Dockerfile will be for production, and Dockerfile-dev will be used for development and be the one referenced by docker-compose.yml.
The text was updated successfully, but these errors were encountered:
When we use docker-compose, we mount the local development directory into the container at
/var/www
. This allows us to make modifications in our development environment, and have it reflected in the container so we can instantly see the results.However, the pre-install setup requires us to run
composer install
in the container copy of the environment. When we mount the local directory to/var/www
, it will overwrite all the pre-install set up that was done when the container was first set up.So for development purposes now, we must run the pre-install set up manually, only after the environment has been set up.
For production deployments, we don't want to do any manual provisions. The container should be able to be built and configured automatically with minimal manual intervention.
The plan here is to create two Dockerfiles. One for production deployment and one for development. The
Dockerfile
will be for production, andDockerfile-dev
will be used for development and be the one referenced bydocker-compose.yml
.The text was updated successfully, but these errors were encountered: