-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
86 lines (86 loc) · 1.91 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
86
version: '3'
services:
nginx:
image: 'nginx:alpine'
ports:
- '80:80'
volumes:
- './whmcs:/var/www/html'
- './src:/var/www/html/modules/addons/sso'
- './nginx/conf.d/site.conf:/etc/nginx/conf.d/site.conf'
networks:
whmcs:
ipv4_address: 172.20.0.2
extra_hosts:
- 'host.docker.internal:host-gateway'
depends_on:
- php
- mysql
- redis
- mailhog
php:
build:
context: ./docker
dockerfile: Dockerfile
image: whmcs-8.1
volumes:
- './whmcs:/var/www/html'
- './src:/var/www/html/modules/addons/sso'
- './php/conf.d/php.ini:/usr/local/etc/php/conf.d/100-custom.ini'
extra_hosts:
- 'host.docker.internal:host-gateway'
networks:
whmcs:
ipv4_address: 172.20.0.3
mysql:
image: 'mysql:8.0'
ports:
- '3306:3306'
environment:
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD:-password}'
MYSQL_DATABASE: '${DB_DATABASE:-whmcs}'
MYSQL_USER: '${DB_USERNAME:-whmcs}'
MYSQL_PASSWORD: '${DB_PASSWORD:-password}'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
volumes:
- 'mysql:/var/lib/mysql'
networks:
whmcs:
ipv4_address: 172.20.0.4
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-p${DB_PASSWORD:-password}"]
retries: 3
timeout: 5s
redis:
image: 'redis:alpine'
ports:
- '6379:6379'
volumes:
- 'redis:/data'
networks:
whmcs:
ipv4_address: 172.20.0.5
healthcheck:
test: ["CMD", "redis-cli", "ping"]
retries: 3
timeout: 5s
mailhog:
image: 'mailhog/mailhog:latest'
ports:
- '1025:1025'
- '8025:8025'
networks:
whmcs:
ipv4_address: 172.20.0.6
networks:
whmcs:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16
gateway: 172.20.0.1
volumes:
mysql:
driver: local
redis:
driver: local