-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
75 lines (69 loc) · 1.53 KB
/
Copy pathdocker-compose.yml
File metadata and controls
75 lines (69 loc) · 1.53 KB
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
version: '2.2'
services:
nginx:
build:
context: .
dockerfile: docker/nginx/Dockerfile
ports:
- "8888:80"
volumes:
- ./docker/config/nginx.conf:/etc/nginx/nginx.conf:ro
- ./src:/var/www/html/:z
depends_on:
- php_sender
php_sender:
build:
context: .
dockerfile: docker/php/Dockerfile
user: $UID
ports:
- "9000"
volumes:
- ./docker/config/php.ini:/usr/local/etc/php/php.ini
- ./src:/var/www/html/:z
depends_on:
- php_receiver
- composer
php_receiver:
#image: phpdockerio/php71-cli
build:
context: .
dockerfile: docker/php_receiver/Dockerfile
command: "php /app/receive.php"
volumes:
- ./src:/app
depends_on:
composer:
condition: service_started
rabbitmq:
condition: service_healthy
links:
- rabbitmq
scale: 5
#https://stackoverflow.com/questions/31746182/docker-compose-wait-for-container-x-before-starting-y
rabbitmq:
# image: rabbitmq
build:
context: .
dockerfile: docker/rabbitmq/Dockerfile
ports:
- "15672:15672"
- "5672:5672"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:15672"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- rabbitmq-data:/var/lib/rabbitmq
composer:
build: docker/composer
user: $UID
volumes:
- ./src:/app
command: composer install
environment:
- HOME=/home/composer
working_dir: /app
volumes:
rabbitmq-data: