- 
                Notifications
    You must be signed in to change notification settings 
- Fork 166
Development ( Developers Only )
        Imran Sayed edited this page Oct 18, 2020 
        ·
        2 revisions
      
    - When we change the composer.json, run from root
docker-compose -f backend/docker-compose.yml down && \
docker-compose -f backend/docker-compose.yml up -d First line command will stops and removes all the docker containers and second line command will restart all containers.
Notice that -d is to run in detach mode and you can always remove that flag, and run the command so you can see the live logs.
Or you can check the logs for
- Check the logs While the above command is running in detached mode ( -d ), you can run this command in a new terminal tab to see the live logs.
docker logs -f container-name- Login to SSH and wp cli.
docker exec -it image-name bash // e.g. docker exec -it backend_wordpress_1 bash
wp
e.g.
docker container lsCONTAINER ID        IMAGE               COMMAND                  CREATED              STATUS              PORTS                  NAMES
d0b4a3b0074f        wordpress:latest    "docker-entrypoint.s…"   About a minute ago   Up About a minute   0.0.0.0:8000->80/tcp   backend_wordpress_1
aad078ebe131        mysql:5.7           "docker-entrypoint.s…"   About a minute ago   Up About a minute   3306/tcp, 33060/tcp    backend_db_1Here container-name is backend_db_1 or backend_wordpress_1
- If you make changes to docker-compose.yml file, run the following:
If you happend to change the port in docker-compose.yml make sure to delete the db directory and then run below.
docker-compose -f backend/docker-compose.yml down && \
docker-compose -f backend/docker-compose.yml up -d