Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
db9e08f943 | |||
f13ed239e7 | |||
2c5d0b01b9 | |||
e98d4189de |
@ -1,7 +1,8 @@
|
|||||||
# Wordpress - make a copy of wp-includes to compare with existing volumes
|
# Wordpress - make a copy of wp-includes to compare with existing volumes
|
||||||
|
|
||||||
# 'docker-compose exec wordpress bash -c 'cd /var/www/html/wp-includes && grep wp_version version.php'
|
# 'docker-compose exec wordpress bash -c 'cd /var/www/html/wp-includes && grep wp_version version.php'
|
||||||
FROM wordpress:6-fpm
|
ARG WORDPRESS_VERSION=user-defined
|
||||||
|
FROM wordpress:${WORDPRESS_VERSION}
|
||||||
|
|
||||||
# ancient debian
|
# ancient debian
|
||||||
#RUN apt update && apt -y install vim less
|
#RUN apt update && apt -y install vim less
|
||||||
|
19
README.md
19
README.md
@ -5,9 +5,10 @@ A Docker-based toolkit that streamlines WordPress upgrades using official images
|
|||||||
## Project Configuration
|
## Project Configuration
|
||||||
|
|
||||||
### Project Name
|
### Project Name
|
||||||
This project requires a project name, which should be defined in an `.env` file:
|
This project requires a project name and wordpress version, which should be defined in an `.env` file:
|
||||||
```bash
|
```bash
|
||||||
COMPOSE_PROJECT_NAME=test
|
COMPOSE_PROJECT_NAME=test
|
||||||
|
WORDPRESS_VERSION=6-fpm
|
||||||
```
|
```
|
||||||
|
|
||||||
### Database Host Configuration
|
### Database Host Configuration
|
||||||
@ -60,6 +61,15 @@ HTML_VOLUME=test_html_staging
|
|||||||
1. Stop the current containers and remove volumes:
|
1. Stop the current containers and remove volumes:
|
||||||
```bash
|
```bash
|
||||||
docker compose down -v
|
docker compose down -v
|
||||||
|
|
||||||
|
# Optional Steps
|
||||||
|
|
||||||
|
# Clean volumes
|
||||||
|
grep -E 'DB_VOLUME|CONTENT_VOLUME' .env | cut -d '=' -f2 | xargs -I {} sh -c 'docker volume rm {} 2>/dev/null; docker volume create {}'
|
||||||
|
|
||||||
|
# Remove Wordpress Image
|
||||||
|
docker rmi $(grep IMAGE_WEB .env | cut -d '=' -f2)
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Update WordPress version:
|
2. Update WordPress version:
|
||||||
@ -92,6 +102,13 @@ chmod -R [appropriate-permissions] wp-content/
|
|||||||
|
|
||||||
5. Optional: Update database if needed:
|
5. Optional: Update database if needed:
|
||||||
```bash
|
```bash
|
||||||
|
(In the database container)
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y mariadb-client && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
(From the host)
|
||||||
./update-db
|
./update-db
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -7,10 +7,12 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile.wordpress_fpm
|
dockerfile: Dockerfile.wordpress_fpm
|
||||||
|
args:
|
||||||
|
WORDPRESS_VERSION: ${WORDPRESS_VERSION}
|
||||||
image: ${IMAGE_WEB:-web}
|
image: ${IMAGE_WEB:-web}
|
||||||
volumes:
|
volumes:
|
||||||
- html:/var/www/html
|
- html:/var/www/html
|
||||||
environment:
|
environment:
|
||||||
- WORDPRESS_DB_HOST=${WORDPRESS_DB_HOST:-database:3306}
|
- WORDPRESS_DB_HOST=${WORDPRESS_DB_HOST:-database:3306}
|
||||||
- WORDPRESS_DB_PASSWORD=${WORDPRESS_DB_PASSWORD:-fake}
|
- WORDPRESS_DB_PASSWORD=${WORDPRESS_DB_PASSWORD:-fake}
|
||||||
- VIRTUAL_HOST=${VIRTUAL_HOST:-wordpress}
|
- VIRTUAL_HOST=${VIRTUAL_HOST:-wordpress}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user