-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfull_php_stack.yml
119 lines (112 loc) · 3.22 KB
/
full_php_stack.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
107
108
109
110
111
112
113
114
115
116
117
118
119
### Notes
#
# - using the 'build' config instead of 'image' allows to build the stack with just 'docker-compose build'
# - SYS_PTRACE capability is needed to allow the containers to read /proc/$PID, which is needed by init scripts
# - The docker-compose 'service' name corresponds to the top-level yml keys
# - The container name is used in most 'docker' commands (Ex : docker exec -ti kaliop_cli su site)
# Keeping a separate container name for each project allows to run many container platforms in parallel
# - The hostname key is used by Docker internal DNS to reach other containers
# Ex : the host backend in your Varnish vcl file must be "web_backend" if your web service hostname is "web_backend"
#
version: "2.2"
services:
web:
image: klabs/apache:7.1
hostname: web
container_name: kaliop_web
ports:
- "88:88"
volumes:
- "~/www:/var/www:rw"
- "./startup.sh:/run/startup.sh:ro"
env_file:
- .env
cap_add:
- SYS_PTRACE
networks:
- dev_stack
extra_hosts:
- "customer_api:162.242.195.82"
cli:
image: klabs/php_cli:7.1
hostname: cli
container_name: kaliop_cli
privileged: true
user: ${DEV_UID:-1000}:${DEV_GID:-1000}
volumes:
- "$SSH_AUTH_SOCK:/ssh-agent:ro"
- "~/.gitconfig:/home/site/.gitconfig:ro"
# - "~/.ssh/config:/home/site/.ssh/config:ro"
- "~/www:/var/www:rw"
environment:
- SSH_AUTH_SOCK=/ssh-agent
- TERM=xterm-color
cap_add:
- SYS_PTRACE
networks:
- dev_stack
varnish:
image: klabs/varnish:4.1
hostname: varnish
container_name: kaliop_varnish
cap_add:
- SYS_PTRACE
# varnish init daemon wants to set ulimits
- SYS_RESOURCE
security_opt:
- apparmor:unconfined
networks:
- dev_stack
depends_on:
- web
- cli
solr:
image: klabs/solr:ezfind
hostname: solr
container_name: kaliop_solr
ports:
- "8983:8983"
cap_add:
- SYS_PTRACE
networks:
- dev_stack
memcached:
image: klabs/memcached
hostname: memcached
container_name: kaliop_memcached
cap_add:
- SYS_PTRACE
networks:
- dev_stack
mysql:
image: klabs/mysql
hostname: mysql
container_name: kaliop_mysql
ports:
- "3307:3306"
env_file:
- docker-compose.env
cap_add:
- SYS_PTRACE
command: ["/root/bootstrap.sh", "mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci"]
networks:
- dev_stack
haproxy:
image: klabs/haproxy
hostname: haproxy
container_name: kaliop_haproxy
ports:
- "80:80"
depends_on:
- web
- varnish
- solr
networks:
- dev_stack
networks:
dev_stack:
ipam:
driver: default
config:
-
subnet: 172.17.0.0/24