-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
85 lines (78 loc) · 2.03 KB
/
docker-compose.yml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: '3'
services:
# The Application - PHP 7.2
webserver:
build:
context: .
dockerfile: app.dockerfile
container_name: webserver
links:
- mysql
working_dir: /var/www/html
volumes:
- ../:/var/www/html
- ${PHP_INI-./config/php/php.ini}:/usr/local/etc/php/php.ini
- ${VHOSTS_DIR-./config/vhosts}:/etc/apache2/sites-enabled
- ${LOG_DIR-./logs/apache2}:/var/log/apache2
ports:
- "8080:80"
- "443:443"
environment:
DB_PORT: "3306"
DB_HOST: "database"
WORDPRESS_DB_HOST: mysql:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
XDEBUG_CONFIG: "remote_host=docker.for.win.host.internal remote_enable=1"
#XDEBUG_CONFIG: "remote_host=docker.for.mac.host.internal remote_enable=1"
networks:
- wpsite
# Database - mySQL
mysql:
image: mysql
container_name: mysql
restart: unless-stopped
command: --default-authentication-plugin=mysql_native_password --innodb-use-native-aio=0
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
ports:
- '9906:3306'
volumes:
- mysqldata:/var/lib/mysql/
networks:
- wpsite
# Database GUI - phpmyadmin
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: 'phpmyadmin'
links:
- mysql
environment:
PMA_HOST: mysql
PMA_PORT: 3306
MYSQL_ROOT_PASSWORD: password
ports:
- '8081:80'
volumes:
- /sessions
networks:
- wpsite
# Cache - redis
redis:
image: redis:latest
container_name: redis
command: redis-server --requirepass yourpassword
ports:
- '7000:7000'
networks:
- wpsite
#Volumes
volumes:
mysqldata:
driver: local #save DB data after docker restart
#Networks
networks:
wpsite: