-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
81 lines (76 loc) · 1.92 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
81 lines (76 loc) · 1.92 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
76
77
78
79
80
81
version: "3"
volumes:
bot_file_storage:
bot_elastic_storage:
services:
memeusbot_bot:
build: bot/
container_name: memeusbot_bot
hostname: memeusbot_bot
restart: unless-stopped
depends_on:
- elasticsearch
deploy:
restart_policy:
condition: on-failure
max_attempts: 3
window: 60s
volumes:
- bot_file_storage:/var/www/memeusbot
entrypoint: ["./wait-for-it.sh", "-t", "0", "memeusbot_elastic:9200", "--", "python", "main.py"]
environment:
- TZ=Europe/Moscow
- ES_HOST=memeusbot_elastic
- IS_SERVERLESS=False
- DEBUG=True
memeusbot_crawler:
build: crawler/
container_name: memeusbot_crawler
hostname: memeusbot_crawler
depends_on:
- elasticsearch
volumes:
- bot_file_storage:/var/www/memeusbot
entrypoint: ["./wait-for-it.sh", "-t", "0", "memeusbot_elastic:9200", "--", "scrapy", "crawl", "memepedia"]
environment:
- TZ=Europe/Moscow
- ES_HOST=memeusbot_elastic
- CRAWLER_OPTIMIZE_IMAGES=False
memeusbot_nginx:
build: nginx/
container_name: memeusbot_nginx
hostname: memeusbot_nginx
restart: unless-stopped
deploy:
restart_policy:
condition: on-failure
max_attempts: 3
window: 60s
ports:
- 8081:80
volumes:
- bot_file_storage:/var/www/memeusbot
environment:
- TZ=Europe/Moscow
elasticsearch:
build: elasticsearch/
container_name: memeusbot_elastic
hostname: memeusbot_elastic
restart: unless-stopped
deploy:
restart_policy:
condition: on-failure
max_attempts: 3
window: 120s
ports:
- 127.0.0.1:9200:9200
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- bot_elastic_storage:/usr/share/elasticsearch/data
environment:
- TZ=Europe/Moscow
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"