-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
101 lines (94 loc) · 3.84 KB
/
docker-compose.yaml
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
version: '3'
services:
risks: &base_app
image: "${IMAGE}"
command: python -m prozorro.risks.api
container_name: risks-api
environment:
MONGODB_URL: 'mongodb://root:example@mongo:27017/?replicaSet=rs0'
PYTHONUNBUFFERED: '1'
ports:
- 8080:8080
volumes:
- ./src/prozorro:/app/prozorro
- ./tests:/prozorro/tests
- ./swagger:/swagger
depends_on:
- mongo
- tenders-crawler
- contracts-crawler
- delay-crawler
tenders-crawler:
image: "${IMAGE}"
container_name: risks-tenders-crawler
environment:
MONGODB_URL: 'mongodb://root:example@mongo:27017/?replicaSet=rs0'
PYTHONUNBUFFERED: '1'
MONGODB_STATE_ID: 'prozorro-tenders-risks'
API_OPT_FIELDS: 'status,auctionPeriod,lots,next_check'
PUBLIC_API_HOST: 'https://api.prozorro.gov.ua'
FORWARD_CHANGES_COOLDOWN_SECONDS: '36000' # 10 hours in seconds
BACKWARD_OFFSET: '1423058400.69246' # 2015-02-23T12:00:00.756010+02:00
FORWARD_OFFSET: '1730325600.0' # 2024-10-31T00:00:00+02:00
command: python -m prozorro.risks.crawlers.tenders_crawler
volumes:
- ./src/prozorro:/app/prozorro
contracts-crawler:
image: "${IMAGE}"
container_name: risks-contracts-crawler
environment:
MONGODB_URL: 'mongodb://root:example@mongo:27017/?replicaSet=rs0'
PYTHONUNBUFFERED: '1'
MONGODB_STATE_ID: 'prozorro-contracts-risks'
API_RESOURCE: 'contracts'
PUBLIC_API_HOST: 'https://api.prozorro.gov.ua'
FORWARD_CHANGES_COOLDOWN_SECONDS: '36000' # 10 hours in seconds
BACKWARD_OFFSET: '1423058400.69246' # 2015-02-23T12:00:00.756010+02:00
FORWARD_OFFSET: '1730325600.0' # 2024-10-31T00:00:00+02:00
LOCK_PROCESS_NAME: 'contracts_crawler_lock'
command: python -m prozorro.risks.crawlers.contracts_crawler
volumes:
- ./src/prozorro:/app/prozorro
delay-crawler:
image: "${IMAGE}"
container_name: risks-delay-crawler
environment:
MONGODB_URL: 'mongodb://root:example@mongo:27017/?replicaSet=rs0'
PYTHONUNBUFFERED: '1'
MONGODB_STATE_ID: 'prozorro-delay-risks'
PUBLIC_API_HOST: 'http://api.prozorro.gov.ua'
FORWARD_CHANGES_COOLDOWN_SECONDS: '2678' # 31 days TEST_MODE (approximately 45 minutes in seconds)
# SLEEP_FORWARD_CHANGES_SECONDS: '86' # 1 day sleep before processing next chunk (in TEST_MODE is 1.3 minute)
BACKWARD_OFFSET: '1423058400.69246' # 2015-02-23T12:00:00.756010+02:00
FORWARD_OFFSET: '1730325600.0' # 2024-10-31T00:00:00+02:00
LOCK_PROCESS_NAME: 'delay_crawler_lock'
API_LIMIT: 1 # only for testing, default is 100
TEST_MODE: 'True'
command: python -m prozorro.risks.crawlers.delay_crawler
volumes:
- ./src/prozorro:/app/prozorro
mongo:
image: 'bitnami/mongodb:4.4.3'
environment:
MONGODB_ADVERTISED_HOSTNAME: mongo
MONGODB_ROOT_PASSWORD: example
MONGODB_REPLICA_SET_MODE: primary
MONGODB_REPLICA_SET_NAME: rs0
MONGODB_REPLICA_SET_KEY: replicaSetKey
ports:
- 27017:27017
frontend:
image: "${IMAGE_FRONTEND}"
ports:
- 9090:80
risks-test-integration: &test_app
<<: *base_app
image: "${IMAGE_TEST}"
container_name: risks-test-integration
depends_on:
- mongo
volumes:
- ./src/prozorro:/app/prozorro
- ./tests:/prozorro/tests
- ./swagger:/swagger
- ./pytest.ini:/app/pytest.ini