https://github.com/garymengcom/dockerpress
https://github.com/garymengcom/dockerpress
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/garymengcom/dockerpress
- Owner: garymengcom
- Created: 2024-11-14T16:21:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-19T05:44:19.000Z (over 1 year ago)
- Last Synced: 2025-01-27T13:06:15.288Z (over 1 year ago)
- Language: Dockerfile
- Size: 59.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker for WordPress
> One website one environment.
## How to use
1. Clone this repository and go to the directory:
```bash
git clone https://github.com/yeszao/dockerpress.git
cd dockerpress
```
2. Copy `docker-compose.yml.sample` to `docker-compose.yml`:
```bash
cp docker-compose.yml.sample docker-compose.yml
```
Customize the `docker-compose.yml` file as needed.
E.g. nginx expose port `80` to host default, change it to another one if it was occupied.
4. Download WordPress and unzip files to `src` directory.
```bash
curl -s https://wordpress.org/latest.zip -o /tmp/latest.zip \
&& unzip -q /tmp/latest.zip -d /tmp \
&& mv /tmp/wordpress/* src/ \
&& rm -rf /tmp/wordpress /tmp/latest.zip
```
5. Run the following command:
```bash
docker compose up -d
```
6. Open your browser and access [http://localhost](http://localhost).
7. The MySQL configurations default are (all of the values can be modified in `docker-compose.yml` file):
- **Host**: `mysql`
- **Port**: `3306`
- **DB Name**: `wordpress`
- **Username**: `root`
- **Password**: `12345678`