Skip to content

Commit

Permalink
perform db update on import + improve docs (visiblevc#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsifford authored Aug 24, 2018
1 parent a8240a4 commit 56d70a7
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 35 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Changelog

## 0.20.0 - latest
## 0.21.0 - latest

### Minor

- Automatically perform a WordPress database update after importing, if needed.

### Chore

- Update example files and error messages related to bindfs.

## 0.20.0

### Minor

Expand Down
65 changes: 34 additions & 31 deletions example/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
version: '3'
version: "3"
services:
wordpress:
image: visiblevc/wordpress
wordpress:
image: visiblevc/wordpress

# required for mounting bindfs
cap_add:
- SYS_ADMIN
devices:
- /dev/fuse
# required for mounting bindfs
cap_add:
- SYS_ADMIN
devices:
- /dev/fuse
# required on certain cloud hosts
security_opt:
- apparmor:unconfined

ports:
- 8080:80
- 443:443
volumes:
- ./data:/data
environment:
DB_NAME: wordpress
DB_PASS: root
PLUGINS: >-
academic-bloggers-toolkit
co-authors-plus
[WP-API]https://github.com/WP-API/WP-API/archive/master.zip
ports:
- 8080:80
- 443:443
volumes:
- ./data:/data
environment:
DB_NAME: wordpress
DB_PASS: root
PLUGINS: >-
academic-bloggers-toolkit
co-authors-plus
[WP-API]https://github.com/WP-API/WP-API/archive/master.zip
db:
image: mariadb:10 # or mysql:5.7
volumes:
- data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
db:
image: mariadb:10 # or mysql:5.7
volumes:
- data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root

phpmyadmin:
image: phpmyadmin/phpmyadmin
ports:
- 22222:80
phpmyadmin:
image: phpmyadmin/phpmyadmin
ports:
- 22222:80

volumes:
data:
data:
11 changes: 8 additions & 3 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ if ! sudo mount -a 2>/dev/null; then
Be sure your service is configured with the following options:
___
services:
wordpress:
wordpress:
cap_add:
- SYS_ADMIN
- SYS_ADMIN
devices:
- /dev/fuse
- /dev/fuse
# needed on certain cloud hosts
security_opt:
- apparmor:unconfined
___
OR (use first option if possible)
Expand Down Expand Up @@ -191,6 +194,8 @@ check_database() {
"$(wp option get siteurl)" \
"$URL_REPLACE" |& logger
fi

wp --color core update-db |& logger
}

# Install / remove plugins based on $PLUGINS in parallel threads
Expand Down

0 comments on commit 56d70a7

Please sign in to comment.