-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
81 lines (76 loc) · 2.04 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
version: "3"
services:
woocommerce:
container_name: woocommerce
build: .
volumes:
- wordpress_data:/var/www/html
- .:/var/www/html/wp-content/plugins/mondu-buy-now-pay-later
links:
- mariadb
- mailcatcher
ports:
- 8080:80
environment:
MONDU_SANDBOX_URL: http://host.docker.internal:3000/api/v1
MONDU_PRODUCTION_URL: http://host.docker.internal:3000/api/v1
MONDU_WEBHOOKS_URL: http://host.docker.internal:8390
WP_DEBUG: 1
WORDPRESS_DEBUG: 1
WORDPRESS_DB_HOST: mariadb
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
WORDPRESS_CONFIG_EXTRA: |
require_once(ABSPATH .'wp-includes/plugin.php');
// configure phpmailer with SMTP before sending emails
add_action('phpmailer_init', function($$mailer) {
$$mailer->isSMTP();
$$mailer->Host = "mailcatcher";
$$mailer->SMTPAuth = false;
$$mailer->Port = 1025;
});
// optional: error logging in case phpmailer fails
add_action('wp_mail_failed', function($$wperror) {
error_log(implode("; ", $$wperror->get_error_messages()));
});
composer:
image: composer:latest
command: composer install
volumes:
- .:/app
mariadb:
container_name: woocommerce_mariadb
image: mariadb
volumes:
- mariadb_data:/var/lib/mysql
ports:
- 3307:3306
environment:
MYSQL_ROOT_PASSWORD: example
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
phpmyadmin:
container_name: woocommerce_phpmyadmin
image: phpmyadmin
ports:
- 8081:80
environment:
PMA_HOST: mariadb
PMA_USER: wordpress
PMA_PASSWORD: wordpress
links:
- mariadb
depends_on:
- mariadb
mailcatcher:
container_name: woocommerce_mailcatcher
image: schickling/mailcatcher
ports:
- 1080:1080
volumes:
wordpress_data:
driver: local
mariadb_data:
driver: local