docker-compose-wordpress-le.../docker-compose.yml
2019-01-02 11:10:32 +01:00

52 lines
1.3 KiB
YAML

version: '3'
services:
db:
container_name: ${CONTAINER_DB_NAME}
image: mariadb:latest
restart: unless-stopped
volumes:
- ${DB_PATH}:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
wordpress:
depends_on:
- db
container_name: ${CONTAINER_WP_NAME}
image: wordpress:latest
restart: unless-stopped
volumes:
- ${WP_CORE}:/var/www/html
- ${WP_CONTENT}:/var/www/html/wp-content
- ./conf.d/php.ini:/usr/local/etc/php/conf.d/php.ini
environment:
WORDPRESS_DB_HOST: ${CONTAINER_DB_NAME}:3306
WORDPRESS_DB_NAME: ${MYSQL_DATABASE}
WORDPRESS_DB_USER: ${MYSQL_USER}
WORDPRESS_DB_PASSWORD: ${MYSQL_PASSWORD}
WORDPRESS_TABLE_PREFIX: ${WORDPRESS_TABLE_PREFIX}
VIRTUAL_HOST: ${DOMAINS}
LETSENCRYPT_HOST: ${DOMAINS}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
logging:
options:
max-size: ${LOGGING_OPTIONS_MAX_SIZE:-200k}
# wpcli:
# image: tatemz/wp-cli
# volumes:
# - ${WP_CORE}:/var/www/html
# - ${WP_CONTENT}:/var/www/html/wp-content
# depends_on:
# - db
# entrypoint: wp
networks:
default:
external:
name: ${NETWORK}