-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
61 lines (57 loc) · 1.32 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
version: '3'
services:
scrapy:
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/app
depends_on:
- postgres_db
- mongodb
- redis
environment:
- POSTGRES_HOST=host.docker.internal
- POSTGRES_PORT=5432
- POSTGRES_DB=jobs_database
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=passWORD
- POSTGRES_TABLE_NAME=raw_table
- MONGO_HOST=host.docker.internal
- MONGO_PORT=27017
- MONGO_DB=mongodb_canaria
- MONGO_COLLECTION_NAME=raw_collection
- MONGO_USERNAME=ismail
- MONGO_PASSWORD=passWORD
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_DB=0
working_dir: /app/jobs_project
command: /bin/sh -c "../scraping_timer.sh"
postgres_db:
image: postgres:latest
environment:
POSTGRES_DB: 'jobs_database'
POSTGRES_USER: 'postgres'
POSTGRES_PASSWORD: 'passWORD'
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
mongodb:
image: mongo:4.4.6
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db
redis:
image: redis:latest
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: ["sh", "-c", "rm -rf /data/* && redis-server"]
volumes:
postgres_data:
mongo_data:
redis_data: