forked from kassambara/wordpress-docker-compose
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·49 lines (44 loc) · 1.36 KB
/
docker-compose.yml
File metadata and controls
executable file
·49 lines (44 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
version: '3.6'
services:
wordpress:
image: wordpress:${WORDPRESS_VERSION:-latest}
container_name: ${COMPOSE_PROJECT_NAME:-wordpress}
volumes:
- ./config/php.conf.ini:/usr/local/etc/php/conf.d/php.ini
- ${WORDPRESS_DATA_DIR:-./wordpress}:/var/www/html
environment:
- WORDPRESS_DB_NAME=${COMPOSE_PROJECT_NAME:-wordpress}
- WORDPRESS_TABLE_PREFIX=${WORDPRESS_TABLE_PREFIX:-wp_}
- WORDPRESS_DB_HOST=${WORDPRESS_DB_HOST:-mysql}
- WORDPRESS_DB_USER=${DATABASE_USER:-root}
- WORDPRESS_DB_PASSWORD=${DATABASE_PASSWORD:-password}
depends_on:
- mysql
restart: always
ports:
- 8080:80
mysql:
image: mysql:${MYSQL_VERSION:-latest}
container_name: ${COMPOSE_PROJECT_NAME}_mysql
volumes:
- ./mysql:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${DATABASE_PASSWORD:-password}
- MYSQL_USER=${DATABASE_USER:-root}
- MYSQL_PASSWORD=${DATABASE_PASSWORD:-password}
- MYSQL_DATABASE=${COMPOSE_PROJECT_NAME:-wordpress}
restart: always
ports:
- 9753:3306
# Command line interface to wordpress
wpcli:
depends_on:
- mysql
- wordpress
image: wordpress:cli
links:
- mysql:db
container_name: ${COMPOSE_PROJECT_NAME}_wpcli
volumes:
- ${WORDPRESS_DATA_DIR:-./wordpress}:/var/www/html
working_dir: /var/www/html