woocommerce-paypal-payments/docker-compose.yml

120 lines
3 KiB
YAML

version: '3.4'
services:
wp_dev:
build:
context: ./
dockerfile: docker/Dockerfile_wp
target: dev
args:
PHP_BUILD_VERSION: $PHP_BUILD_VERSION
PHP_TEST_VERSION: $PHP_TEST_VERSION
PHP_DEPS_VERSION: $PHP_DEPS_VERSION
PROJECT_MOUNT_PATH: $PROJECT_MOUNT_PATH
BUILD_ROOT_PATH: $BUILD_ROOT_PATH
DOCROOT_PATH: $DOCROOT_PATH
WP_DOMAIN: ${WP_DOMAIN}
WP_VERSION: $WP_VERSION
container_name: "${PROJECT_NAME}_wp_dev"
depends_on:
- db
restart: unless-stopped
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_NAME: $DB_NAME
WORDPRESS_DB_USER: $DB_USER_NAME
WORDPRESS_DB_PASSWORD: $DB_USER_PASSWORD
WORDPRESS_DEBUG: 1
DOCROOT_PATH: ${DOCROOT_PATH}
PLUGIN_NAME: ${PLUGIN_NAME}
ADMIN_USER: ${ADMIN_USER}
ADMIN_PASS: ${ADMIN_PASS}
ADMIN_EMAIL: ${ADMIN_EMAIL}
WP_DOMAIN: ${WP_DOMAIN}
WP_TITLE: ${WP_TITLE}
WC_VERSION: $WC_VERSION
NGROK_HOST: ${NGROK_HOST}
volumes:
- wordpress:${DOCROOT_PATH}
- ${BASE_PATH}:${PROJECT_MOUNT_PATH}
ports:
- 80:80
db:
image: mariadb:latest
container_name: "${PROJECT_NAME}_db"
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
MYSQL_DATABASE: $DB_NAME
MYSQL_USER: $DB_USER_NAME
MYSQL_PASSWORD: $DB_USER_PASSWORD
ports:
- 3306:3306
volumes:
- db:/var/lib/mysql
db_admin:
image: phpmyadmin/phpmyadmin:latest
container_name: "${PROJECT_NAME}_db_admin"
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
depends_on:
- db
ports:
- 1234:80
# volumes:
# - db_admin
composer:
build:
context: ./
dockerfile: docker/Dockerfile_wp
target: composer
args:
PHP_DEPS_VERSION: $PHP_DEPS_VERSION
BUILD_ROOT_PATH: $BUILD_ROOT_PATH
container_name: "${PROJECT_NAME}_composer"
working_dir: ${BUILD_ROOT_PATH}
volumes:
- ${BASE_PATH}:${BUILD_ROOT_PATH}
environment:
- COMPOSER_MEMORY_LIMIT=${COMPOSER_MEMORY_LIMIT}
build:
build:
context: ./
dockerfile: docker/Dockerfile_wp
target: build
args:
PHP_DEPS_VERSION: $PHP_DEPS_VERSION
PHP_BUILD_VERSION: $PHP_BUILD_VERSION
BUILD_ROOT_PATH: $BUILD_ROOT_PATH
WP_VERSION: $WP_VERSION
container_name: "${PROJECT_NAME}_build"
working_dir: ${BUILD_ROOT_PATH}
volumes:
- ${BASE_PATH}:${BUILD_ROOT_PATH}
test:
extra_hosts:
- "host.docker.internal:${HOST_IP_ADDRESS}"
build:
context: ./
dockerfile: docker/Dockerfile_wp
target: test
args:
PHP_DEPS_VERSION: $PHP_DEPS_VERSION
BUILD_ROOT_PATH: $BUILD_ROOT_PATH
PHP_BUILD_VERSION: $PHP_BUILD_VERSION
PHP_TEST_VERSION: $PHP_TEST_VERSION
container_name: "${PROJECT_NAME}_test"
working_dir: ${BUILD_ROOT_PATH}
volumes:
- ${BASE_PATH}:${BUILD_ROOT_PATH}
volumes:
wordpress:
db:
db_admin: