-
Notifications
You must be signed in to change notification settings - Fork 48
/
docker-compose.varnish.yml
executable file
·106 lines (98 loc) · 2.11 KB
/
docker-compose.varnish.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
version: '2'
services:
apache:
build:
context: .
dockerfile: build/apache/php-7.3/Dockerfile
ports:
- "8080:80"
- "9001:9000" # xdebug
volumes:
- ./src:/var/www/html
- ~/.composer/cache:/var/www/.composer/cache
- ~/.npm:/var/www/.npm
environment:
XDEBUG_CONFIG: "remote_host=localhost"
PHP_IDE_CONFIG: "serverName=Docker"
# VIRTUAL_HOST: "example.localhost"
depends_on:
- db
links:
- db
networks:
- <project_name>-network
db:
image: mariadb:10.4.13
ports:
- 3300:3306
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=magento
- MYSQL_USER=magento
- MYSQL_PASSWORD=magento
volumes:
- dbdata:/var/lib/mysql
- ./backups:/var/tmp/backups
networks:
- <project_name>-network
redis:
image: redis
ports:
- 6379
networks:
- <project_name>-network
redis-session:
image: redis
ports:
- 6379
networks:
- <project_name>-network
mailhog:
image: mailhog/mailhog
ports:
- 1025:1025
- 8025:8025
networks:
- <project_name>-network
varnish:
build:
context: .
dockerfile: build/varnish/Dockerfile
hostname: varnish
ports:
- "80:80"
networks:
- <project_name>-network
depends_on:
- apache
volumes:
- ./build/varnish/varnish6.vcl:/etc/varnish/default.vcl
- ./build/varnish/varnish.secret:/etc/varnish/secret
environment:
- CACHE_SIZE=64M
elasticsearch:
build:
context: .
dockerfile: build/elasticsearch/Dockerfile
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- node.name=node-1
- cluster.initial_master_nodes=node-1
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- ./elasticsearchdata:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- <project_name>-network
networks:
<project_name>-network:
driver: bridge
volumes:
dbdata:
driver: local