-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
52 lines (49 loc) · 1.09 KB
/
docker-compose.yml
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
version: "3.8"
services:
db:
build:
context: ./db
dockerfile: Dockerfile
container_name: observer-db
command: --auth
environment:
MONGO_INITDB_ROOT_USERNAME: ${OBSERVER_MONGO_USER:-default}
MONGO_INITDB_ROOT_PASSWORD: ${OBSERVER_MONGO_PASS:-default}
env_file: .env
volumes:
- "~/.habr_observer:/data/db/:rw"
restart: always
healthcheck:
interval: 10s
timeout: 10s
retries: 5
start_period: 30s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "1"
app:
build:
context: ./observer
dockerfile: Dockerfile
args:
SL_PORT: ${OBSERVER_SL_PORT:-8501}
container_name: observer-app
env_file: .env
ports:
- ${OBSERVER_SL_PORT:-8501}:${OBSERVER_SL_PORT:-8501}
depends_on:
db:
condition: service_healthy
restart: always
healthcheck:
interval: 10s
timeout: 10s
retries: 5
start_period: 10s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "1"