-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yaml
executable file
·151 lines (150 loc) · 4.16 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
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
services:
backend:
restart: unless-stopped
image: vv8_backend_api
depends_on:
- task_queue_broker
- database
- mongodb
build:
context: ./backend
dockerfile: Dockerfile
network: host
ports:
- "4000:4000/tcp"
environment:
VV8_CELERY_BROKER: task_queue_broker
VV8_CELERY_BROKER_PORT: 6379
VV8_CELERY_ID: vv8_web_server
SQL_USERNAME: ${SQL_USER:-vv8}
SQL_PASSWORD: ${SQL_PASSWORD:-vv8}
SQL_HOST: ${SQL_HOST:-database}
SQL_PORT: ${SQL_PORT:-5432}
SQL_DATABASE: ${SQL_DB:-vv8_backend}
MONGO_HOST: ${MONGO_HOST:-mongodb}
MONGO_PORT: ${MONGO_PORT:-27017}
MONGO_USER: ${MONGO_USER:-vv8}
MONGO_PASSWORD: ${MONGO_PASSWORD:-vv8}
MONGO_DATABASE: ${MONGO_DATABASE:-admin}
database:
restart: unless-stopped
image: vv8_postgres
build:
context: ./vv8_backend_database
dockerfile: Dockerfile
network: host
command: postgres -c config_file=/etc/postgresql.conf
ports:
- "5434:5432/tcp"
environment:
POSTGRES_PASSWORD: vv8
POSTGRES_USER: vv8
POSTGRES_DB: vv8_backend
PGDATA: /var/lib/postgresql/data/pg_data
volumes:
- ./vv8db2:/var/lib/postgresql/data
task_queue_broker:
restart: unless-stopped
image: redis:6.2
volumes:
- ./redis_data:/data
ports:
- "6380:6379/tcp"
mongodb:
image: 'mongo:6'
environment:
MONGO_INITDB_ROOT_USERNAME: vv8
MONGO_INITDB_ROOT_PASSWORD: vv8
command: --wiredTigerCacheSizeGB 2.0
ports:
- 27017:27017
restart: unless-stopped
volumes:
- ./mongo/data:/data/db
- ./mongo/init/:/docker-entrypoint-initdb.d/:ro
# Celery Workers
vv8_worker:
restart: unless-stopped
depends_on:
- task_queue_broker
- database
ports:
- "5901:5901/tcp"
- "6901:6901/tcp"
build:
context: ./celery_workers
dockerfile: vv8_worker.dockerfile
network: host
image: vv8_crawler_worker
environment:
VV8_CELERY_BROKER: task_queue_broker
VV8_CELERY_BROKER_PORT: 6379
VV8_CELERY_ID: vv8_worker
CELERY_CONCURRENCY: ${CELERY_CONCURRENCY:-9}
MONGO_HOST: ${MONGO_HOST:-mongodb}
MONGO_PORT: ${MONGO_PORT:-27017}
MONGO_USER: ${MONGO_USER:-vv8}
MONGO_PASSWORD: ${MONGO_PASSWORD:-vv8}
MONGO_DATABASE: ${MONGO_DATABASE:-admin}
volumes:
- ./screenshots:/app/screenshots:rwx
- ./har:/app/har:rwx
- ./celery_workers/vv8_worker/vv8_crawler:/app/node:rwx
- '/app/node/node_modules'
- ./raw_logs:/app/vv8_worker/raw_logs:rwx
log_parser_worker:
restart: unless-stopped
depends_on:
- task_queue_broker
- database
- mongodb
build:
context: ./celery_workers
dockerfile: log_parser.dockerfile
network: host
args:
DOCKER_IMAGE: visiblev8/vv8-postprocessors:latest
image: vv8_log_parser_worker
volumes:
- ./raw_logs:/app/raw_logs:rwx
- ./parsed_logs:/app/parsed_logs:rwx
env_file:
- .env
environment:
VV8_CELERY_BROKER: task_queue_broker
VV8_CELERY_BROKER_PORT: 6379
VV8_CELERY_ID: vv8_log_parser
MONGODB_HOST: mongodb
MONGODB_PORT: 27017
MONGODB_USER: vv8
MONGODB_PWD: vv8
MONGODB_AUTHDB: admin
CELERY_CONCURRENCY: ${CELERY_CONCURRENCY:-9}
PGHOST: ${SQL_HOST:-database}
PGPORT: ${SQL_PORT:-5432}
PGUSER: ${SQL_USER:-vv8}
PGPASSWORD: ${SQL_PASSWORD:-vv8}
PGDATABASE: ${SQL_DATABASE:-vv8_backend}
ADBLOCK_BINARY: /app/post-processors/adblock
EASYPRIVACY_FILE: /app/post-processors/easyprivacy.txt
EASYLIST_FILE: /app/post-processors/easylist.txt
EMAP_FILE: /app/post-processors/entities.json
IDLDATA_FILE: /artifacts/idldata.json
flower:
restart: unless-stopped
depends_on:
- task_queue_broker
- database
image: vv8-vv8_crawler_flower_monitor
environment:
- FLOWER_UNAUTHENTICATED_API=True
build:
context: ./flower
dockerfile: Dockerfile
network: host
volumes:
- ./flower/data:/etc/db:rwx
ports:
- "5555:5555/tcp"
volumes:
vv8postgresdb: {}