This repository has been archived by the owner on Sep 11, 2019. It is now read-only.
forked from jctanner/gravity
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
77 lines (73 loc) · 1.69 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
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
version: '3.3'
services:
rabbit:
hostname: rabbit
image: rabbitmq:latest
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=mypass
ports:
- "5673:5672"
networks:
gravity_nw:
ipv4_address: 172.20.0.2
flaskapp:
hostname: flaskapp
image: flaskapp
build:
context: .
dockerfile: flaskapp.Dockerfile
links:
- rabbit
depends_on:
- rabbit
- mongo
networks:
gravity_nw:
ipv4_address: 172.20.0.4
environment:
GRAVITY_VAR_DIR: /var/cache/gravity
PYTHONUNBUFFERED: 1
CELERY_BROKER_URL: pyamqp://admin:mypass@rabbit:5672
CELERY_RESULT_BACKEND: mongodb://mongo:27017
CELERY_MONGODB_BACKEND_DATABASE: gravity
CELERY_MONGODB_BACKEND_COLLECTION: results
volumes:
- /var/cache/gravity:/var/cache/gravity
worker:
hostname: worker
image: worker
build:
context: .
dockerfile: worker.Dockerfile
links:
- rabbit
depends_on:
- rabbit
- mongo
networks:
gravity_nw:
ipv4_address: 172.20.0.5
environment:
GRAVITY_VAR_DIR: /var/cache/gravity
PYTHONUNBUFFERED: 1
CELERY_BROKER_URL: pyamqp://admin:mypass@rabbit:5672
CELERY_RESULT_BACKEND: mongodb://mongo:27017
CELERY_MONGODB_BACKEND_DATABASE: gravity
CELERY_MONGODB_BACKEND_COLLECTION: results
volumes:
- /var/cache/gravity:/var/cache/gravity
mongo:
hostname: mongo
image: mongo:latest
ports:
- "27018:27017"
networks:
gravity_nw:
ipv4_address: 172.20.0.3
networks:
gravity_nw:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16