forked from ChainSafe/nodewatch-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
48 lines (43 loc) · 1.01 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
# Copyright 2021 ChainSafe Systems
# SPDX-License-Identifier: LGPL-3.0-only
version: '3.7'
volumes:
mongo_data: {}
networks:
crawler_net:
driver: bridge
services:
mongo-db:
image: library/mongo:bionic
ports:
- "27017:27017/tcp"
volumes:
- mongo_data:/data/db
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGODB_USR:-mongoUsr}
MONGO_INITDB_ROOT_PASSWORD: ${MONGODB_PWD:-mongoPwd}
networks:
- crawler_net
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo mongo-db:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
start_period: 40s
restart: on-failure
crawler:
image: "crawler-dev:latest"
build:
context: .
dockerfile: Dockerfile
env_file:
- .env
environment:
MONGODB_URI: mongodb://${MONGODB_USR:-mongoUsr}:${MONGODB_PWD:-mongoPwd}@mongo-db:27017
ports:
- "8080:8080/tcp"
depends_on:
- mongo-db
networks:
- crawler_net
restart: on-failure