34 lines
858 B
YAML
34 lines
858 B
YAML
# 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
|