This document outlines the process of deploying docker-yii2 project.
- Update the base apache image conf stored in
apache-dockerfile
directory. (This step is optional)
If a new image is constructed with a different image name, update
docker-compose.yml
also.
- Move
config-stencil
toconfig
- Populate config files store in
config
directory
Make sure to use the same database credentials in
main.php
also
- Run
docker-compose up -d
to start yii2 application in background - Run
docker exec -it yii2-apache bash /scripts/initialize.sh
to initialize the project - Run
bash scripts/build.sh
to install dependencies - Add
127.0.0.1 frontend.in
and127.0.0.1 backend.in
to/etc/hosts
- Visit backend to see the project running.