Skip to content

Repository files navigation

sth-docker

Dockerized Wordpress Environment w/ MySQL

Project Structure

sth-docker

. ├── .gitignore ├── LICENSE ├── README.md └── docker-compose.yaml

docker-compose.yaml

services:
wordpress:
image: wordpressrestart: alwaysports:
- 80:80volumes:
- ./wp:/var/www/html...db:
image: mysql:5.7restart: alwaysvolumes:
- db:/var/lib/mysql...volumes:
db:

If deployed, docker-compose will map port 80 of the Dockerized Wordpress container to port 80 of the host platform.

Install WP Dependencies

Everything is controlled with docker-compose.

docker-compose up

Test Project Configuration

Check containers are running and the port mapping:

Verify that a wp folder which contains the persistant filesystem has been created at the project root.

Navigate to http://localhost:80 in your web browser to access Wordpress. You should see the screen about the "famous 5-minute WP installation."

Stop/Remove Working Container

docker-compose down

Delete Project AND Resources

Delete the referenced volumes with the -v flag:

docker-compose down -v

About

Dockerized WordPress Environment w/ MySQL

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors