Skip to content

Latest commit

History

History
97 lines (60 loc) 路 1.93 KB

docker.md

File metadata and controls

97 lines (60 loc) 路 1.93 KB

Docker

The backbone of the backend is Docker Compose. Learn more at https://docs.docker.com/engine/reference/commandline/compose/

Note: The following commands must be run from the /apps/wordpress/ directory.

Table of Contents

Start Containers

Run the following command to start the containers back up:

docker compose start

Pause Containers

Run the following command to pause the containers:

docker compose pause

Stop Containers

Run the following command to stop the containers:

docker compose stop

Both MySQL and WordPress data will persist when you stop the containers.


Recreate Containers

If you've made changes to docker compose.yml and you want to recreate the containers, run the following command:

docker compose up -d

Both MySQL and WordPress data will persist when you recreate the containers.


Destroy Containers

Need a fresh start? To destroy the containers and the persistant data, run the following command:

docker compose down --volumes

Warning: This is a destructive operation! All data will be lost!


Tunnel Into Containers

If you need to tunnel into a Docker container via the terminal, run the following command:

docker exec -it nextjs-wordpress-<container-name>-1 /bin/sh

Where <container-name> is the name of the container you want to tunnel into. Here is the list of container names:

  • composer
  • mysql
  • phpmyadmin
  • wordpress
  • wpcli

To exit a tunnel, type exit and press enter.


Up Next

Learn more about Contributing