https://github.com/killshot13/wp-docker
https://github.com/killshot13/wp-docker
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/killshot13/wp-docker
- Owner: killshot13
- License: mit
- Created: 2021-11-03T00:41:09.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-30T07:09:02.000Z (over 3 years ago)
- Last Synced: 2025-02-07T12:46:42.626Z (3 months ago)
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wp-docker
## Dockerized Wordpress Environment w/ MySQL
| Project Structure |
|---|
| ├── .gitignore |
| ├── LICENSE |
| ├── README.md |
| └── docker-compose.yaml |[_docker-compose.yaml_](docker-compose.yaml)
```yaml
services:
wordpress:
image: wordpress
restart: always
ports:
- 80:80
volumes:
- ./wp:/var/www/html
...
db:
image: mysql:5.7
restart: always
volumes:
- 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`.
```bash
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
```bash
docker-compose down
```### Delete Project **AND** Resources
Delete the referenced volumes with the `-v` flag:
```bash
docker-compose down -v
```