-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdocker-compose.yaml
119 lines (110 loc) · 2.02 KB
/
docker-compose.yaml
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
---
version: '3.7'
services:
nginx:
build:
context: .
dockerfile: docker/nginx/Dockerfile
image: phpbin-nginx
container_name: phpbin-nginx
restart: unless-stopped
volumes:
- ./public:/srv/public
expose:
- 80
depends_on:
- fpm
networks:
default:
aliases:
- nginx
cap_drop:
- ALL
cap_add:
- SETUID
- SETGID
- CHOWN
- NET_BIND_SERVICE
healthcheck:
test: nc -z localhost 80
interval: 5s
fpm:
build:
context: .
dockerfile: docker/fpm/Dockerfile
target: base
image: phpbin-fpm:base
container_name: phpbin-fpm
restart: unless-stopped
user: $DOCKER_UID:$DOCKER_GID
environment:
- APP_ENV=dev
- APP_DEBUG=1
- APP_SECRET=not-so-secret
working_dir: /srv
volumes:
- .:/srv
tmpfs:
- /tmp
depends_on:
- redis
networks:
default:
aliases:
- fcgi
cap_drop:
- ALL
healthcheck:
test: nc -z localhost 9000
interval: 5s
composer:
build:
context: .
dockerfile: docker/fpm/Dockerfile
target: composer
image: phpbin-fpm:composer
container_name: phpbin-composer
init: true
command:
- 'true'
user: $DOCKER_UID:$DOCKER_GID
environment:
- APP_ENV=dev
- APP_DEBUG=1
- APP_SECRET=not-so-secret
working_dir: /srv
volumes:
- .:/srv
tmpfs:
- /tmp
- /.composer
cap_drop:
- ALL
healthcheck:
test: nc -z localhost 9000
interval: 5s
redis:
image: redis:6-alpine
container_name: phpbin-redis
restart: unless-stopped
command: "redis-server --appendonly yes"
networks:
default:
tmpfs:
- /tmp
volumes:
- redis:/data
cap_drop:
- ALL
cap_add:
- SETUID
- SETGID
sysctls:
net.core.somaxconn: 1024
healthcheck:
test: nc -z localhost 6379
interval: 5s
networks:
default:
volumes:
redis: