Permalink
Switch branches/tags
Nothing to show
Find file Copy path
2c245e6 Dec 11, 2018
1 contributor

Users who have contributed to this file

80 lines (73 sloc) 1.87 KB
#
# Source code address
# https://hub.docker.com/u/cuongtransc/
#
# Syntax: https://docs.docker.com/compose/compose-file/
#
# Wordpress: https://hub.docker.com/_/wordpress/
#
version: "2"
services:
wordpress:
image: cuongtransc/wordpress:4.8
depends_on:
- mariadb
environment:
- WORDPRESS_DB_HOST=mariadb
- WORDPRESS_DB_USER=wordpress
- WORDPRESS_DB_PASSWORD=wordpress@123
- WORDPRESS_DB_NAME=wordpress
- WWW_DATA_USERID=1000
ports:
- "80:80"
networks:
- back
#- nginx-back
volumes:
- ./wordpress-data/:/var/www/html/
hostname: wordpress
domainname: devopsz.com
cpu_shares: 512
#cpuset: "0"
mem_limit: 512M
# privileged: true
# restart: on-failure:3 # other choice: always
# stdin_open: true
# tty: true
logging:
driver: "json-file"
options:
max-size: "100M"
max-file: "3"
mariadb:
image: mariadb:10.1
environment:
- MYSQL_ROOT_PASSWORD=lab@secret
- MYSQL_USER=wordpress
- MYSQL_PASSWORD=wordpress@123
- MYSQL_DATABASE=wordpress
#ports:
#- "3306:3306"
networks:
- back
volumes:
- mariadb-data:/var/lib/mysql/
hostname: mariadb
domainname: devopsz.com
cpu_shares: 512
mem_limit: 512M
# privileged: true
# restart: on-failure:3 # other choice: always
# stdin_open: true
# tty: true
logging:
driver: "json-file"
options:
max-size: "100M"
max-file: "3"
networks:
back:
#nginx-back:
#external: true
volumes:
mariadb-data: