'wordpress_example/docker-compose.yml' toevoegen

This commit is contained in:
Mathijs Lermer 2020-10-28 14:09:48 +01:00
parent be8998ecc4
commit 7f90b3f8cf

View file

@ -0,0 +1,34 @@
# https://hub.docker.com/_/wordpress
# https://hub.docker.com/_/mysql
version: '3.3'
services:
db:
image: mysql:8
container_name: wordpress-example-db
volumes:
- ./db_data:/var/lib/mysql
- ./db_data:/docker-entrypoint-initdb.d
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: "xxx"
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: "xxx"
wordpress:
depends_on:
- db
image: wordpress:latest
container_name: wordpress-example-wp
ports:
- "xx:80"
restart: unless-stopped
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: "xxx"
volumes:
- ./config/php.conf.uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
- ./wp-app/:/var/www/html # Full wordpress project