From 45a3ea357e8e2f6ed44d758b32914788ebae8d67 Mon Sep 17 00:00:00 2001 From: Michel Felipe Date: Wed, 11 Apr 2018 20:24:57 -0300 Subject: [PATCH 1/3] Added .sh to backup mysql data from docker image --- db-backup/mysql.sh | 28 +++++++++ docker-compose.yml | 16 ++++- docker-files/wp-cli/Dockerfile | 80 ++++++++++++++++++++++++ docker-files/wp-cli/docker-entrypoint.sh | 15 +++++ 4 files changed, 136 insertions(+), 3 deletions(-) create mode 100755 db-backup/mysql.sh create mode 100644 docker-files/wp-cli/Dockerfile create mode 100644 docker-files/wp-cli/docker-entrypoint.sh diff --git a/db-backup/mysql.sh b/db-backup/mysql.sh new file mode 100755 index 0000000..7c7989b --- /dev/null +++ b/db-backup/mysql.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +BASEDIR=$(dirname "$0") + +# REFERENCE: https://gist.github.com/spalladino/6d981f7b33f6e0afe6bb +dumpSql () { + if [ -z "$1" ] + then + echo "A docker CONTAINER name that running mysql is required!!" + else + echo "Generating .sql backup from CONTAINER: $1" + docker exec -it $1 sh -c 'exec mysqldump --all-databases -uroot -p"$MYSQL_ROOT_PASSWORD"' > ${BASEDIR}/mysql.databases.sql + fi +} + +# REFERENCE: https://loomchild.net/2017/03/26/backup-restore-docker-named-volumes/ +# REFERENCE 2: https://gist.github.com/spalladino/6d981f7b33f6e0afe6bb +dumpFolder () { + if [ -z "$1" ] + then + echo "A docker CONTAINER name that running mysql is required!!" + else + echo "Generating .tar.gz backup of: /var/lib/mysql from CONTAINER: $1" + docker exec -it $1 sh -c 'tar -czvf /backup/mysql.databases.tar.gz /var/lib/mysql' + fi +} + +$* \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index ddac06c..7135001 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,11 @@ -version: '3' +version: '3.1' services: db: image: mysql:5.7 volumes: - - db_data:/var/lib/mysql + - db-data:/var/lib/mysql + - ./db-backup:/backup ports: - "3306:3306" restart: always @@ -21,6 +22,7 @@ services: volumes: - ./wp-content:/var/www/html/wp-content - ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini + - wpsrc:/usr/src/wordpress ports: - "8000:80" restart: always @@ -29,5 +31,13 @@ services: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_USER: ${DB_USER} WORDPRESS_DB_PASSWORD: ${DB_PASSWORD} + + wordpress-cli: + depends_on: + - wordpress + build: ./docker-files/wp-cli + volumes: + - wpsrc:/wordpress volumes: - db_data: + db-data: + wpsrc: diff --git a/docker-files/wp-cli/Dockerfile b/docker-files/wp-cli/Dockerfile new file mode 100644 index 0000000..815c3ff --- /dev/null +++ b/docker-files/wp-cli/Dockerfile @@ -0,0 +1,80 @@ +FROM php:7.2-alpine + +# install the PHP extensions we need +RUN set -ex; \ + \ + apk add --no-cache --virtual .build-deps \ + libjpeg-turbo-dev \ + libpng-dev \ + ; \ + \ + docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \ + docker-php-ext-install gd mysqli opcache; \ + \ + runDeps="$( \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ + | tr ',' '\n' \ + | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ + )"; \ + apk add --virtual .wordpress-phpexts-rundeps $runDeps; \ + apk del .build-deps + +# set recommended PHP.ini settings +# see https://secure.php.net/manual/en/opcache.installation.php +RUN { \ + echo 'opcache.memory_consumption=128'; \ + echo 'opcache.interned_strings_buffer=8'; \ + echo 'opcache.max_accelerated_files=4000'; \ + echo 'opcache.revalidate_freq=2'; \ + echo 'opcache.fast_shutdown=1'; \ + echo 'opcache.enable_cli=1'; \ + } > /usr/local/etc/php/conf.d/opcache-recommended.ini + +# install wp-cli dependencies +RUN apk add --no-cache \ + less \ + mysql-client + +RUN set -ex; \ + mkdir -p /var/www/html; \ + chown -R www-data:www-data /var/www/html +WORKDIR /var/www/html +VOLUME /var/www/html + +# pub 2048R/2F6B6B7F 2016-01-07 +# Key fingerprint = 3B91 9162 5F3B 1F1B F5DD 3B47 673A 0204 2F6B 6B7F +# uid Daniel Bachhuber +# sub 2048R/45F9CDE2 2016-01-07 +ENV WORDPRESS_CLI_GPG_KEY 3B9191625F3B1F1BF5DD3B47673A02042F6B6B7F + +ENV WORDPRESS_CLI_VERSION 1.5.0 +ENV WORDPRESS_CLI_SHA512 9385c63ab835c7c450529035cdb1f524b5878a67c7565c3497628e5ec4ec07ae4a34ef25c59a9e7d6edea7cdb039fcef7a1f731b922782b8c70418480bdff122 + +RUN set -ex; \ + \ + apk add --no-cache --virtual .fetch-deps \ + gnupg \ + ; \ + \ + curl -o /usr/local/bin/wp.gpg -fSL "https://github.com/wp-cli/wp-cli/releases/download/v${WORDPRESS_CLI_VERSION}/wp-cli-${WORDPRESS_CLI_VERSION}.phar.gpg"; \ + \ + export GNUPGHOME="$(mktemp -d)"; \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$WORDPRESS_CLI_GPG_KEY"; \ + gpg --batch --decrypt --output /usr/local/bin/wp /usr/local/bin/wp.gpg; \ + rm -rf "$GNUPGHOME" /usr/local/bin/wp.gpg; \ + \ + echo "$WORDPRESS_CLI_SHA512 */usr/local/bin/wp" | sha512sum -c -; \ + chmod +x /usr/local/bin/wp; \ + \ + apk del .fetch-deps; \ + \ + wp --allow-root --version + +COPY docker-entrypoint.sh /usr/local/bin/ + +ENTRYPOINT ["docker-entrypoint.sh"] + +# Removes the www-data from original dockerfile +# USER www-data +CMD ["wp", "shell"] \ No newline at end of file diff --git a/docker-files/wp-cli/docker-entrypoint.sh b/docker-files/wp-cli/docker-entrypoint.sh new file mode 100644 index 0000000..471e1cc --- /dev/null +++ b/docker-files/wp-cli/docker-entrypoint.sh @@ -0,0 +1,15 @@ +#!/bin/sh +set -euo pipefail + +# first arg is `-f` or `--some-option` +if [ "${1#-}" != "$1" ]; then + set -- wp "$@" +fi + +# if our command is a valid wp-cli subcommand, let's invoke it through wp-cli instead +# (this allows for "docker run wordpress:cli help", etc) +if wp --path=/dev/null help "$1" > /dev/null 2>&1; then + set -- wp "$@" +fi + +exec "$@" From 8ff56b685986e72987008eefe5cdea1112ffda49 Mon Sep 17 00:00:00 2001 From: Michel Felipe Date: Mon, 2 Jul 2018 21:58:47 -0300 Subject: [PATCH 2/3] Map wp source code like a docker volume + restore functions from .sh file --- .gitignore | 10 ++++++++++ db-backup/mysql.sh | 28 ++++++++++++++++++++++++++-- docker-compose.yml | 22 +++++++++++++++++----- docker-files/wp-cli/Dockerfile | 10 +++++++--- 4 files changed, 60 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 9a87dda..88443d1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ # Application !wp-content/mu-plugins/* +wp-content/languages/ wp-content/plugins/* wp-content/upgrade wp-content/uploads/* +wp-src/ # Dotenv .env @@ -13,6 +15,8 @@ node_modules # Theme .DS_Store +wp-content/themes/ +!wp-content/themes/vuewp/* wp-content/themes/vuewp/.sass-cache/* wp-content/themes/vuewp/css/custom.css wp-content/themes/vuewp/dist/* @@ -23,3 +27,9 @@ wp-content/themes/vuewp/app/static/* wp-content/themes/twentyfifteen/* wp-content/themes/twentysixteen/* wp-content/themes/twentyseventeen/* + +#Database backup +db-backup/*.sql +db-backup/*.tar.gz +db-backup/*.zip +db-backup/*.rar diff --git a/db-backup/mysql.sh b/db-backup/mysql.sh index 7c7989b..fa3e204 100755 --- a/db-backup/mysql.sh +++ b/db-backup/mysql.sh @@ -1,6 +1,7 @@ #!/bin/sh BASEDIR=$(dirname "$0") +SQL_BACKUP_NAME="mysql.databases" # REFERENCE: https://gist.github.com/spalladino/6d981f7b33f6e0afe6bb dumpSql () { @@ -9,7 +10,8 @@ dumpSql () { echo "A docker CONTAINER name that running mysql is required!!" else echo "Generating .sql backup from CONTAINER: $1" - docker exec -it $1 sh -c 'exec mysqldump --all-databases -uroot -p"$MYSQL_ROOT_PASSWORD"' > ${BASEDIR}/mysql.databases.sql + echo "Destination: ${BASEDIR}" + docker exec -it $1 sh -c 'exec mysqldump --all-databases -u root -p"$MYSQL_ROOT_PASSWORD" > /backup/'${SQL_BACKUP_NAME}'.sql' fi } @@ -21,7 +23,29 @@ dumpFolder () { echo "A docker CONTAINER name that running mysql is required!!" else echo "Generating .tar.gz backup of: /var/lib/mysql from CONTAINER: $1" - docker exec -it $1 sh -c 'tar -czvf /backup/mysql.databases.tar.gz /var/lib/mysql' + docker exec -it $1 sh -c 'tar -czvf /backup/'${SQL_BACKUP_NAME}'.tar.gz /var/lib/mysql' + fi +} + +restoreSql() { + if [ -z "$1" ] + then + echo "A docker CONTAINER name that running mysql is required!!" + + else + echo "Importing .sql backup of: /var/lib/mysql from CONTAINER: $1" + docker exec -it $1 sh -c 'mysql -u root -p"$MYSQL_ROOT_PASSWORD" < /backup/'${SQL_BACKUP_NAME}'.sql' + fi +} + +restoreFolder() { + if [ -z "$1" ] + then + echo "A docker CONTAINER name that running mysql is required!!" + else + echo "Importing .tar.gz backup to: /var/lib/mysql of CONTAINER: $1" + echo "Source: ${BASEDIR}/mysql.databases.sqp" + docker exec -it $1 sh -c 'tar -zxvf /backup/'${SQL_BACKUP_NAME}'.tar.gz -C /var/lib/mysql' fi } diff --git a/docker-compose.yml b/docker-compose.yml index 7135001..50a8c5b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,13 +8,24 @@ services: - ./db-backup:/backup ports: - "3306:3306" - restart: always + restart: "no" environment: MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD} MYSQL_DATABASE: ${DB_NAME} MYSQL_USER: ${DB_USER} MYSQL_PASSWORD: ${DB_PASSWORD} + phpmyadmin: + image: phpmyadmin/phpmyadmin + ports: + - "8080:80" + restart: "no" + environment: + PMA_HOST: db + MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD} + MYSQL_USER: ${DB_USER} + MYSQL_PASSWORD: ${DB_PASSWORD} + wordpress: depends_on: - db @@ -22,10 +33,11 @@ services: volumes: - ./wp-content:/var/www/html/wp-content - ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini - - wpsrc:/usr/src/wordpress + - ./wp-src:/var/www/html + - wp-src:/usr/src/wordpress ports: - "8000:80" - restart: always + restart: "no" environment: WP_ENV: ${WP_ENV} WORDPRESS_DB_HOST: db:3306 @@ -37,7 +49,7 @@ services: - wordpress build: ./docker-files/wp-cli volumes: - - wpsrc:/wordpress + - wp-src:/wordpress volumes: db-data: - wpsrc: + wp-src: diff --git a/docker-files/wp-cli/Dockerfile b/docker-files/wp-cli/Dockerfile index 815c3ff..3342501 100644 --- a/docker-files/wp-cli/Dockerfile +++ b/docker-files/wp-cli/Dockerfile @@ -71,10 +71,14 @@ RUN set -ex; \ \ wp --allow-root --version -COPY docker-entrypoint.sh /usr/local/bin/ +COPY ./docker-entrypoint.sh /usr/local/bin/ -ENTRYPOINT ["docker-entrypoint.sh"] +RUN chmod +x /usr/local/bin/docker-entrypoint.sh # Removes the www-data from original dockerfile +# to do changes in wp-config.php. +# Requires the same user of wordpress image +# ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] + # USER www-data -CMD ["wp", "shell"] \ No newline at end of file +# CMD ["wp", "shell", "--allow-root", "--path=/wordpress"] \ No newline at end of file From ecf5185495a756232ec5bce7c54955764d2a5051 Mon Sep 17 00:00:00 2001 From: Michel Felipe Date: Thu, 5 Jul 2018 23:48:09 -0300 Subject: [PATCH 3/3] WIP: Initial php composer support to install wp plugins and themes --- .env.example | 6 + .gitignore | 2 + composer.json | 31 +++++ composer.lock | 338 +++++++++++++++++++++++++++++++++++++++++++++ docker-compose.yml | 22 ++- 5 files changed, 393 insertions(+), 6 deletions(-) create mode 100644 composer.json create mode 100644 composer.lock diff --git a/.env.example b/.env.example index 11e7c18..8759550 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,9 @@ +# USER => your host's machine user +# UID => Your user ID (to find out, type in terminal => $ id -u) +# GID => Seu grupo (to find out, type in terminal => $ id -g) +UID= +GID=root + DB_NAME=wordpress DB_USER=wordpress DB_ROOT_PASSWORD=root diff --git a/.gitignore b/.gitignore index 88443d1..da43a69 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,5 @@ db-backup/*.sql db-backup/*.tar.gz db-backup/*.zip db-backup/*.rar + +/vendor/ diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..93f14eb --- /dev/null +++ b/composer.json @@ -0,0 +1,31 @@ +{ + "name": "badassworld/presale-site", + "description": "Sistema/Portal de pré-vendas do grupo do facebook BadassWorld", + "type": "project", + "license": "MIT", + "authors": [ + { + "name": "Michel Felipe", + "email": "mfelipeof@gmail.com" + } + ], + "repositories": [ + { + "type": "composer", + "url":"https://wpackagist.org" + } + ], + "minimum-stability": "stable", + "require": { + "wpackagist-plugin/jetpack":"*", + "wpackagist-plugin/akismet":"4.0.8", + "wpackagist-plugin/woocommerce":"3.4.3", + "wpackagist-plugin/woocommerce-domination":"1.1.6", + "wpackagist-plugin/woocommerce-extra-checkout-fields-for-brazil":"*", + "wpackagist-plugin/woocommerce-gateway-paypal-express-checkout":"*", + "wpackagist-plugin/yith-pre-order-for-woocommerce":"*", + "wpackagist-plugin/admin-custom-login":"*", + "wpackagist-plugin/custom-login":"*", + "wpackagist-theme/storefront":"*" + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..4b0a200 --- /dev/null +++ b/composer.lock @@ -0,0 +1,338 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "088062e8da16089c765666060dde877f", + "packages": [ + { + "name": "composer/installers", + "version": "v1.5.0", + "source": { + "type": "git", + "url": "https://github.com/composer/installers.git", + "reference": "049797d727261bf27f2690430d935067710049c2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/installers/zipball/049797d727261bf27f2690430d935067710049c2", + "reference": "049797d727261bf27f2690430d935067710049c2", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0" + }, + "replace": { + "roundcube/plugin-installer": "*", + "shama/baton": "*" + }, + "require-dev": { + "composer/composer": "1.0.*@dev", + "phpunit/phpunit": "^4.8.36" + }, + "type": "composer-plugin", + "extra": { + "class": "Composer\\Installers\\Plugin", + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Installers\\": "src/Composer/Installers" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kyle Robinson Young", + "email": "kyle@dontkry.com", + "homepage": "https://github.com/shama" + } + ], + "description": "A multi-framework Composer library installer", + "homepage": "https://composer.github.io/installers/", + "keywords": [ + "Craft", + "Dolibarr", + "Eliasis", + "Hurad", + "ImageCMS", + "Kanboard", + "Lan Management System", + "MODX Evo", + "Mautic", + "Maya", + "OXID", + "Plentymarkets", + "Porto", + "RadPHP", + "SMF", + "Thelia", + "WolfCMS", + "agl", + "aimeos", + "annotatecms", + "attogram", + "bitrix", + "cakephp", + "chef", + "cockpit", + "codeigniter", + "concrete5", + "croogo", + "dokuwiki", + "drupal", + "eZ Platform", + "elgg", + "expressionengine", + "fuelphp", + "grav", + "installer", + "itop", + "joomla", + "kohana", + "laravel", + "lavalite", + "lithium", + "magento", + "majima", + "mako", + "mediawiki", + "modulework", + "modx", + "moodle", + "osclass", + "phpbb", + "piwik", + "ppi", + "puppet", + "pxcms", + "reindex", + "roundcube", + "shopware", + "silverstripe", + "sydes", + "symfony", + "typo3", + "wordpress", + "yawik", + "zend", + "zikula" + ], + "time": "2017-12-29T09:13:20+00:00" + }, + { + "name": "wpackagist-plugin/admin-custom-login", + "version": "2.6.2", + "source": { + "type": "svn", + "url": "https://plugins.svn.wordpress.org/admin-custom-login/", + "reference": "tags/2.6.2" + }, + "dist": { + "type": "zip", + "url": "https://downloads.wordpress.org/plugin/admin-custom-login.2.6.2.zip", + "reference": null, + "shasum": null + }, + "require": { + "composer/installers": "~1.0" + }, + "type": "wordpress-plugin", + "homepage": "https://wordpress.org/plugins/admin-custom-login/" + }, + { + "name": "wpackagist-plugin/akismet", + "version": "4.0.8", + "source": { + "type": "svn", + "url": "https://plugins.svn.wordpress.org/akismet/", + "reference": "tags/4.0.8" + }, + "dist": { + "type": "zip", + "url": "https://downloads.wordpress.org/plugin/akismet.4.0.8.zip", + "reference": null, + "shasum": null + }, + "require": { + "composer/installers": "~1.0" + }, + "type": "wordpress-plugin", + "homepage": "https://wordpress.org/plugins/akismet/" + }, + { + "name": "wpackagist-plugin/custom-login", + "version": "3.2.8", + "source": { + "type": "svn", + "url": "https://plugins.svn.wordpress.org/custom-login/", + "reference": "trunk" + }, + "dist": { + "type": "zip", + "url": "https://downloads.wordpress.org/plugin/custom-login.zip?timestamp=1513027972", + "reference": null, + "shasum": null + }, + "require": { + "composer/installers": "~1.0" + }, + "type": "wordpress-plugin", + "homepage": "https://wordpress.org/plugins/custom-login/" + }, + { + "name": "wpackagist-plugin/jetpack", + "version": "6.3.2", + "source": { + "type": "svn", + "url": "https://plugins.svn.wordpress.org/jetpack/", + "reference": "tags/6.3.2" + }, + "dist": { + "type": "zip", + "url": "https://downloads.wordpress.org/plugin/jetpack.6.3.2.zip", + "reference": null, + "shasum": null + }, + "require": { + "composer/installers": "~1.0" + }, + "type": "wordpress-plugin", + "homepage": "https://wordpress.org/plugins/jetpack/" + }, + { + "name": "wpackagist-plugin/woocommerce", + "version": "3.4.3", + "source": { + "type": "svn", + "url": "https://plugins.svn.wordpress.org/woocommerce/", + "reference": "tags/3.4.3" + }, + "dist": { + "type": "zip", + "url": "https://downloads.wordpress.org/plugin/woocommerce.3.4.3.zip", + "reference": null, + "shasum": null + }, + "require": { + "composer/installers": "~1.0" + }, + "type": "wordpress-plugin", + "homepage": "https://wordpress.org/plugins/woocommerce/" + }, + { + "name": "wpackagist-plugin/woocommerce-domination", + "version": "1.1.6", + "source": { + "type": "svn", + "url": "https://plugins.svn.wordpress.org/woocommerce-domination/", + "reference": "tags/1.1.6" + }, + "dist": { + "type": "zip", + "url": "https://downloads.wordpress.org/plugin/woocommerce-domination.1.1.6.zip", + "reference": null, + "shasum": null + }, + "require": { + "composer/installers": "~1.0" + }, + "type": "wordpress-plugin", + "homepage": "https://wordpress.org/plugins/woocommerce-domination/" + }, + { + "name": "wpackagist-plugin/woocommerce-extra-checkout-fields-for-brazil", + "version": "3.6.1", + "source": { + "type": "svn", + "url": "https://plugins.svn.wordpress.org/woocommerce-extra-checkout-fields-for-brazil/", + "reference": "tags/3.6.1" + }, + "dist": { + "type": "zip", + "url": "https://downloads.wordpress.org/plugin/woocommerce-extra-checkout-fields-for-brazil.3.6.1.zip", + "reference": null, + "shasum": null + }, + "require": { + "composer/installers": "~1.0" + }, + "type": "wordpress-plugin", + "homepage": "https://wordpress.org/plugins/woocommerce-extra-checkout-fields-for-brazil/" + }, + { + "name": "wpackagist-plugin/woocommerce-gateway-paypal-express-checkout", + "version": "1.6.1", + "source": { + "type": "svn", + "url": "https://plugins.svn.wordpress.org/woocommerce-gateway-paypal-express-checkout/", + "reference": "tags/1.6.1" + }, + "dist": { + "type": "zip", + "url": "https://downloads.wordpress.org/plugin/woocommerce-gateway-paypal-express-checkout.1.6.1.zip", + "reference": null, + "shasum": null + }, + "require": { + "composer/installers": "~1.0" + }, + "type": "wordpress-plugin", + "homepage": "https://wordpress.org/plugins/woocommerce-gateway-paypal-express-checkout/" + }, + { + "name": "wpackagist-plugin/yith-pre-order-for-woocommerce", + "version": "1.1.4", + "source": { + "type": "svn", + "url": "https://plugins.svn.wordpress.org/yith-pre-order-for-woocommerce/", + "reference": "tags/1.1.4" + }, + "dist": { + "type": "zip", + "url": "https://downloads.wordpress.org/plugin/yith-pre-order-for-woocommerce.1.1.4.zip", + "reference": null, + "shasum": null + }, + "require": { + "composer/installers": "~1.0" + }, + "type": "wordpress-plugin", + "homepage": "https://wordpress.org/plugins/yith-pre-order-for-woocommerce/" + }, + { + "name": "wpackagist-theme/storefront", + "version": "2.3.2", + "source": { + "type": "svn", + "url": "https://themes.svn.wordpress.org/storefront/", + "reference": "2.3.2" + }, + "dist": { + "type": "zip", + "url": "https://downloads.wordpress.org/theme/storefront.2.3.2.zip", + "reference": null, + "shasum": null + }, + "require": { + "composer/installers": "~1.0" + }, + "type": "wordpress-theme", + "homepage": "https://wordpress.org/themes/storefront/" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/docker-compose.yml b/docker-compose.yml index 50a8c5b..28d80a3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,9 +27,9 @@ services: MYSQL_PASSWORD: ${DB_PASSWORD} wordpress: + image: wordpress:latest depends_on: - db - image: wordpress:latest volumes: - ./wp-content:/var/www/html/wp-content - ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini @@ -39,17 +39,27 @@ services: - "8000:80" restart: "no" environment: + WORDPRESS_VERSION: 4.9.7 WP_ENV: ${WP_ENV} WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_USER: ${DB_USER} WORDPRESS_DB_PASSWORD: ${DB_PASSWORD} wordpress-cli: - depends_on: - - wordpress - build: ./docker-files/wp-cli - volumes: - - wp-src:/wordpress + build: ./docker-files/wp-cli + depends_on: + - wordpress + volumes: + - wp-src:/wordpress + + composer: + image: composer:latest + depends_on: + - wordpress + volumes: + - .:/app + - $COMPOSER_HOME:/tmp + volumes: db-data: wp-src: