-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
134 lines (129 loc) · 3.63 KB
/
docker-compose.yml
File metadata and controls
134 lines (129 loc) · 3.63 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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# WordPress Vector Database Docker Setup
services:
# MySQL 9.0 Database
mysql:
image: mysql:latest
volumes:
- mysql_data:/var/lib/mysql
- ./docker/mysql/init:/docker-entrypoint-initdb.d
restart: always
environment:
MYSQL_ROOT_PASSWORD: wordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
command: >
--local-infile=1
ports:
- "3306:3306"
# MariaDB Database
mariadb:
image: mariadb:11.7-rc
volumes:
- mariadb_data:/var/lib/mysql
- ./docker/mariadb/init:/docker-entrypoint-initdb.d
restart: always
environment:
MARIADB_ROOT_PASSWORD: wordpress
MARIADB_DATABASE: wordpress
MARIADB_USER: wordpress
MARIADB_PASSWORD: wordpress
ports:
- "3307:3306"
# WordPress with MySQL
wordpress-mysql:
build:
context: ./docker/wordpress
dockerfile: Dockerfile
depends_on:
- mysql
ports:
- "9080:80"
restart: always
deploy:
resources:
limits:
memory: 1G
environment:
WORDPRESS_DB_HOST: mysql
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DEBUG: 1
WORDPRESS_CONFIG_EXTRA: |
define('WP_ENVIRONMENT_TYPE', 'development');
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
define('SCRIPT_DEBUG', true);
define('SAVEQUERIES', true);
ini_set('error_log', ABSPATH . 'wp-content/debug.log');
ini_set('display_errors', 0);
define('WP_HOME', 'http://localhost:9080');
define('WP_SITEURL', 'http://localhost:9080');
volumes:
- wordpress_mysql_data:/var/www/html
- ./:/var/www/html/wp-content/plugins/wpvdb
- ./vendor:/var/www/html/wp-content/plugins/wpvdb/vendor
- ./docker/wordpress/setup:/var/www/html/wp-content/setup
# WordPress with MariaDB
wordpress-mariadb:
build:
context: ./docker/wordpress
dockerfile: Dockerfile
depends_on:
- mariadb
ports:
- "9081:80"
restart: always
deploy:
resources:
limits:
memory: 1G
entrypoint: ["docker-entrypoint.sh"]
command: ["apache2-foreground"]
environment:
WORDPRESS_DB_HOST: mariadb
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DEBUG: 1
WORDPRESS_CONFIG_EXTRA: |
define('WP_ENVIRONMENT_TYPE', 'development');
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
define('SCRIPT_DEBUG', true);
define('SAVEQUERIES', true);
ini_set('error_log', ABSPATH . 'wp-content/debug.log');
ini_set('display_errors', 0);
define('WP_HOME', 'http://localhost:9081');
define('WP_SITEURL', 'http://localhost:9081');
volumes:
- wordpress_mariadb_data:/var/www/html
- ./:/var/www/html/wp-content/plugins/wpvdb
- ./vendor:/var/www/html/wp-content/plugins/wpvdb/vendor
- ./docker/wordpress/setup:/var/www/html/wp-content/setup
phpmyadmin-mysql:
image: adminer:latest
depends_on:
- mysql
ports:
- "9180:8080"
environment:
ADMINER_DEFAULT_SERVER: mysql
ADMINER_DESIGN: pepa-linha
phpmyadmin-mariadb:
image: adminer:latest
depends_on:
- mariadb
ports:
- "9181:8080"
environment:
ADMINER_DEFAULT_SERVER: mariadb
ADMINER_DESIGN: pepa-linha
volumes:
mysql_data:
mariadb_data:
wordpress_mysql_data:
wordpress_mariadb_data: