Updated README
This commit is contained in:
parent
34bf3bb762
commit
e0d3bd7548
104
README.md
104
README.md
@ -1,3 +1,105 @@
|
|||||||
# WordPress
|
# ComposePress
|
||||||
|
|
||||||
A Docker-based toolkit that streamlines WordPress upgrades using official images. Provides pre-configured docker-compose files, Dockerfiles, and standardized procedures to make WordPress maintenance more predictable and reliable.
|
A Docker-based toolkit that streamlines WordPress upgrades using official images. Provides pre-configured docker-compose files, Dockerfiles, and standardized procedures to make WordPress maintenance more predictable and reliable.
|
||||||
|
|
||||||
|
## Project Configuration
|
||||||
|
|
||||||
|
### Project Name
|
||||||
|
This project requires a project name, which should be defined in an `.env` file:
|
||||||
|
```bash
|
||||||
|
COMPOSE_PROJECT_NAME=test
|
||||||
|
```
|
||||||
|
|
||||||
|
### Database Host Configuration
|
||||||
|
To avoid conflicts, use the following format for the database host:
|
||||||
|
```bash
|
||||||
|
WORDPRESS_DB_HOST=${COMPOSE_PROJECT_NAME}-database-1:3306
|
||||||
|
```
|
||||||
|
|
||||||
|
## Environment Variables
|
||||||
|
|
||||||
|
### Docker Images
|
||||||
|
```bash
|
||||||
|
# Web and Database Images
|
||||||
|
IMAGE_WEB=test_web_staging
|
||||||
|
IMAGE_DATABASE=mariadb:11.5
|
||||||
|
```
|
||||||
|
|
||||||
|
### Let's Encrypt Configuration
|
||||||
|
```bash
|
||||||
|
VIRTUAL_HOST=test.test.org
|
||||||
|
LETSENCRYPT_HOST=test.test.org
|
||||||
|
LETSENCRYPT_EMAIL=test@test.com
|
||||||
|
LETSENCRYPT_TEST=true
|
||||||
|
```
|
||||||
|
|
||||||
|
### Database Configuration
|
||||||
|
```bash
|
||||||
|
WORDPRESS_DB_HOST=${COMPOSE_PROJECT_NAME}-database-1:3306
|
||||||
|
WORDPRESS_DB_PASSWORD=wordpress
|
||||||
|
MYSQL_ROOT_PASSWORD=wordpress
|
||||||
|
MYSQL_DATABASE=wordpress
|
||||||
|
MYSQL_USER=wordpress
|
||||||
|
MYSQL_PASSWORD=wordpress
|
||||||
|
```
|
||||||
|
|
||||||
|
### Volume Configuration
|
||||||
|
```bash
|
||||||
|
# External Volumes
|
||||||
|
DB_VOLUME=test_db_staging
|
||||||
|
CONTENT_VOLUME=test_content_staging
|
||||||
|
|
||||||
|
# Recreated Volumes
|
||||||
|
HTML_VOLUME=test_html_staging
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Upgrade Process
|
||||||
|
|
||||||
|
1. Stop the current containers and remove volumes:
|
||||||
|
```bash
|
||||||
|
docker compose down -v
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Update WordPress version:
|
||||||
|
- Modify version in `Dockerfile.wordpress_fpm`
|
||||||
|
- Update `IMAGE_WEB` in `.env` file
|
||||||
|
|
||||||
|
3. Build and test the new environment:
|
||||||
|
```bash
|
||||||
|
# Build initial configuration
|
||||||
|
docker compose -f docker-compose.first.yml build
|
||||||
|
|
||||||
|
# Test the build
|
||||||
|
docker compose -f docker-compose.first.yml up -d
|
||||||
|
|
||||||
|
# Stop test environment
|
||||||
|
docker compose -f docker-compose.first.yml down
|
||||||
|
|
||||||
|
# Start production environment
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Migrate content:
|
||||||
|
```bash
|
||||||
|
# In the wordpress service, copy new content to production
|
||||||
|
cp -a wp-content-new/* wp-content/
|
||||||
|
|
||||||
|
# Verify permissions on wp-content directory
|
||||||
|
chmod -R [appropriate-permissions] wp-content/
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Optional: Update database if needed:
|
||||||
|
```bash
|
||||||
|
./update-db
|
||||||
|
```
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
Docker
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
@bike
|
||||||
|
|
||||||
|
## License
|
||||||
|
[GNU GENERAL PUBLIC LICENSE](LICENSE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user