-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
47 lines (44 loc) · 1.04 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
version: '3.7'
services:
rabbitmq:
image: rabbitmq:3.7.7-management
ports:
- 5672:5672
- 15672:15672
# https://stackoverflow.com/questions/31746182/docker-compose-wait-for-container-x-before-starting-y
healthcheck:
start_period: 60s
test: ["CMD", "curl", "-f", "http://rabbitmq:15672"]
interval: 30s
timeout: 10s
retries: 5
poller:
build:
context: .
dockerfile: poller.dockerfile
environment:
QUEUE_NAME: ${QUEUE_NAME}
GITHUB_AUTH: ${GITHUB_AUTH}
POLLER_NODES: ${POLLER_NODES}
RABBIT_HOST: ${RABBIT_HOST}
NODE_COOKIE: ${NODE_COOKIE}
depends_on:
- rabbitmq
links:
- rabbitmq
restart: on-failure
jobs:
build:
context: .
dockerfile: jobs.dockerfile
environment:
QUEUE_NAME: ${QUEUE_NAME}
RABBIT_HOST: ${RABBIT_HOST}
NODE_COOKIE: ${NODE_COOKIE}
depends_on:
- rabbitmq
links:
- rabbitmq
restart: on-failure
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"