forked from leopardslab/CrawlerX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
136 lines (128 loc) · 3.58 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
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
version: "3.7"
x-mongo-variables: &mongo-variables
MONGODB_HOSTNAME: mongodb
MONGODB_PORT: 27017
MONGODB_DATABASE: crawlerx_db
x-elasticsearch-variables: &elasticsearch-variables
ELASTIC_SEARCH_USERNAME: admin
ELASTIC_SEARCH_PASSWORD: admin
ELASTIC_SEARCH_HOSTNAME: elasticsearch
ELASTIC_SEARCH_PORT: 9200
x-rabbitmq-variables: &rabbitmq-variables
CELERY_BROKER_USERNAME: guest
CELERY_BROKER_PASSWORD: guest
CELERY_BROKER_HOSTNAME: rabbitmq
CELERY_BROKER_PORT: 5672
x-scrapy-variables: &scrapy-variables
SCRAPY_API_HOSTNAME: scrapy
SCRAPY_API_PORT: 6800
x-django-user-variables: &django-user-variables
DJANGO_ADMIN_USERNAME: admin
DJANGO_ADMIN_PASSWORD: admin
DJANGO_ADMIN_EMAIL: [email protected]
services:
django:
build:
context: ./crawlerx_server
dockerfile: Dockerfile
ports:
- "8000:8000"
command: ["python3", "manage.py", "runserver", "0.0.0.0:8000"]
environment:
FIREBASE_APP_KEY: AIzaSyD88ucXoxhnfm3iNUA-FJ-zg-0GrJKT-Zo
<<: *mongo-variables
<<: *elasticsearch-variables
<<: *rabbitmq-variables
<<: *scrapy-variables
<<: *django-user-variables
depends_on:
- mongodb
- elasticsearch
- rabbitmq
celery-beat:
build:
context: ./crawlerx_server
dockerfile: Dockerfile
command: ["python3", '-m', "celery", "-A", "crawlerx_server", "beat", "-l", "info"]
environment:
<<: *rabbitmq-variables
depends_on:
- rabbitmq
celery-worker:
build:
context: ./crawlerx_server
dockerfile: Dockerfile
command: ["python3", '-m', "celery", "-A", "crawlerx_server", "worker", "-l", "info"]
environment:
<<: *mongo-variables
<<: *elasticsearch-variables
<<: *rabbitmq-variables
<<: *scrapy-variables
depends_on:
- rabbitmq
scrapy:
build:
context: ./scrapy_app
dockerfile: Dockerfile
expose:
- 6800
environment:
<<: *mongo-variables
<<: *elasticsearch-variables
depends_on:
- mongodb
- elasticsearch
- rabbitmq
rabbitmq:
image: "rabbitmq:3-management"
hostname: "rabbit"
restart: on-failure
ports:
- "15672:15672"
expose:
- 5672
labels:
NAME: "rabbitmq"
volumes:
- ./rabbitmq-isolated.conf:/etc/rabbitmq/rabbitmq.config
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:15672"]
interval: 30s
timeout: 10s
retries: 5
mongodb:
image: mongo
restart: on-failure
ports:
- 27017:27017
elasticsearch:
image: elasticsearch:7.8.1
environment:
discovery.type: single-node
ELASTIC_USERNAME: admin
ELASTIC_PASSWORD: admin
ports:
- 9200:9200
vue:
build:
context: ./crawlerx_app
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
VUE_APP_FIREBASE_API_KEY: "AIzaSyD88ucXoxhnfm3iNUA-FJ-zg-0GrJKT-Zo"
VUE_APP_FIREBASE_AUTH_DOMAIN: "crawlerx-b2ad1.firebaseapp.com"
VUE_APP_FIREBASE_DB_DOMAIN: "https://crawlerx-b2ad1.firebaseio.com"
VUE_APP_FIREBASE_PROJECT_ID: "crawlerx-b2ad1"
VUE_APP_FIREBASE_STORAGE_BUCKET: "crawlerx-b2ad1.appspot.com"
VUE_APP_FIREBASE_MESSAGING_SENDER_ID: "811171439353"
VUE_APP_FIREBASE_APP_ID: "1:811171439353:web:64e84b4fc347a5c37eb828"
VUE_APP_FIREBASE_MEASURMENT_ID: "G-CM2MX0CRRC"
VUE_APP_DJANGO_PROTOCOL: "http"
VUE_APP_DJANGO_HOSTNAME: "django"
VUE_APP_DJANGO_PORT: "8000"
depends_on:
- django