forked from versionpress/versionpress
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/1332-use-MkDocs-for-docs.versionpr…
…ess.net # Conflicts: # docs/content/en/developer/dev-setup.md
- Loading branch information
Showing
59 changed files
with
4,805 additions
and
8,368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
# Build dirs | ||
/build | ||
# VersionPress-specific folders | ||
/dist | ||
|
||
node_modules | ||
/plugins/versionpress/admin/public/gui | ||
# IDEs | ||
.vscode | ||
.idea | ||
|
||
# Other | ||
Thumbs.db | ||
# PHP | ||
vendor | ||
|
||
# Node / npm | ||
node_modules | ||
npm-debug.log | ||
|
||
docker-compose.override.yml | ||
# Various overrides | ||
docker-compose.override.yml | ||
phpunit.*.xml | ||
wp-cli.local.yml | ||
|
||
# OS-generated files | ||
.DS_Store | ||
Thumbs.db | ||
Desktop.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# Mapped WP site root from inside the container | ||
/wp | ||
/wp | ||
/wp-for-tests | ||
/test-logs |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM wordpress:cli | ||
|
||
ENV XDEBUG_VERSION 2.6.0 | ||
|
||
# Switching to root first, `wordpress:cli` sets the user to www-data. | ||
USER root | ||
|
||
# Install newer version of Git, required for VersionPress. | ||
RUN apk add --no-cache git | ||
|
||
RUN apk add --no-cache $PHPIZE_DEPS \ | ||
&& pecl install xdebug-${XDEBUG_VERSION} \ | ||
&& docker-php-ext-enable xdebug \ | ||
&& { \ | ||
echo 'xdebug.remote_host=host.docker.internal'; \ | ||
echo 'xdebug.remote_enable=1'; \ | ||
echo 'xdebug.remote_autostart=0'; \ | ||
echo 'xdebug.profiler_enable=0'; \ | ||
} >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini | ||
|
||
# Docker mounts all volumes as `root` while the parent image uses www-data. | ||
# This creates issues with file permissions, for example, WP-CLI cannot write | ||
# to a root-owned /var/www/.wp-cli. A workaround is to create all folders that | ||
# are going to become mount points here, see moby/moby#2259 for related discussion. | ||
# | ||
# ! Make sure the list of folders matches volumes in docker-compose.yml. | ||
RUN set -ex; \ | ||
for f in /var/www/html /var/www/.wp-cli /var/opt/versionpress/logs; \ | ||
do \ | ||
mkdir -p "$f"; \ | ||
chown -R www-data:www-data "$f"; \ | ||
done | ||
|
||
# Set the final runtime user again | ||
USER www-data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,94 @@ | ||
version: '3.1' | ||
version: '3.6' | ||
services: | ||
|
||
wordpress: | ||
build: ./dev-env | ||
image: versionpress/wordpress | ||
image: versionpress/wordpress:php7.2-apache | ||
ports: | ||
- 8088:80 | ||
- "80:80" | ||
volumes: | ||
- ./plugins/versionpress:/var/www/html/wp-content/plugins/versionpress | ||
- ./dev-env/wp:/var/www/html | ||
depends_on: | ||
links: | ||
- mysql | ||
- adminer | ||
environment: | ||
WORDPRESS_DB_PASSWORD: r00tpwd | ||
|
||
# Environment variables for `wp core install` | ||
WORDPRESS_SITEURL: http://localhost:8088 | ||
WORDPRESS_SITE_TITLE: VP Dev | ||
WORDPRESS_ADMIN_USER: admin | ||
WORDPRESS_ADMIN_PASSWORD: adminpwd | ||
WORDPRESS_ADMIN_EMAIL: [email protected] | ||
wordpress-for-tests: | ||
image: versionpress/wordpress:php7.2-apache | ||
ports: | ||
- "80:80" | ||
volumes: | ||
- ./dev-env/wp-for-tests:/var/www/html | ||
links: | ||
- mysql-for-tests:mysql | ||
working_dir: /var/www/html/wptest | ||
environment: | ||
WORDPRESS_DB_PASSWORD: r00tpwd | ||
|
||
mysql: | ||
image: mysql:5.7 | ||
ports: | ||
- 3399:3306 | ||
- "3306:3306" | ||
volumes: | ||
- db_data:/var/lib/mysql | ||
environment: | ||
MYSQL_ROOT_PASSWORD: r00tpwd | ||
|
||
|
||
mysql-for-tests: | ||
image: mysql:5.7 | ||
ports: | ||
- "3306:3306" | ||
volumes: | ||
- db_data_for_tests:/var/lib/mysql | ||
environment: | ||
MYSQL_ROOT_PASSWORD: r00tpwd | ||
|
||
adminer: | ||
image: adminer | ||
ports: | ||
- 8099:8080 | ||
- "8099:8080" | ||
|
||
# See `tests-with-wordpress` for a service that also starts WordPress. | ||
tests: | ||
image: versionpress/wordpress:cli | ||
environment: | ||
VP_DIR: /opt/versionpress | ||
VP_TESTS_LOG_DIR: /var/opt/versionpress/logs/.tracy | ||
PHP_IDE_CONFIG: serverName=VersionPress-tests | ||
volumes: | ||
# !!! This must be kept in sync with wordpress-cli-image/Dockerfile | ||
- ./dev-env/test-logs:/var/opt/versionpress/logs | ||
- ./plugins/versionpress:/opt/versionpress:ro | ||
- ./ext-libs:/opt/ext-libs:ro | ||
- wpcli-cache:/var/www/.wp-cli | ||
working_dir: /opt/versionpress/tests | ||
command: ../vendor/bin/phpunit --verbose --colors -c phpunit.xml --testdox-text /var/opt/versionpress/logs/testdox.txt | ||
|
||
tests-with-wordpress: | ||
image: versionpress/wordpress:cli | ||
environment: | ||
VP_DIR: /opt/versionpress | ||
VP_TESTS_LOG_DIR: /var/opt/versionpress/logs/.tracy | ||
PHP_IDE_CONFIG: serverName=VersionPress-tests | ||
volumes: | ||
# !!! This must be kept in sync with wordpress-cli-image/Dockerfile | ||
- ./dev-env/wp-for-tests:/var/www/html | ||
- ./dev-env/test-logs:/var/opt/versionpress/logs | ||
- ./plugins/versionpress:/opt/versionpress:ro | ||
- ./ext-libs:/opt/ext-libs:ro | ||
- wpcli-cache:/var/www/.wp-cli | ||
working_dir: /opt/versionpress/tests | ||
command: ../vendor/bin/phpunit --verbose --colors -c phpunit.xml --testdox-text /var/opt/versionpress/logs/testdox.txt | ||
links: | ||
- mysql:db | ||
depends_on: | ||
- mysql | ||
- selenium-hub | ||
- wordpress-for-tests | ||
|
||
selenium-hub: | ||
# Standalone Firefox is enough but could also be a full grid setup, hence the service name | ||
image: selenium/standalone-firefox | ||
|
||
volumes: | ||
db_data: | ||
db_data: | ||
db_data_for_tests: | ||
wpcli-cache: |
Oops, something went wrong.