-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
45 lines (42 loc) · 995 Bytes
/
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
version: '3.8'
services:
server:
image: python:flask
volumes:
- ${PWD}/src:/app
- ${PWD}/logs:/app/logs
- ${PWD}/pickles:/app/pickles
working_dir: /app
ports:
- "3000:3000"
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 5s
timeout: 5s
retries: 3
entrypoint: /bin/sh
command: -c 'flask run -h 0.0.0.0 -p 3000'
redis:
image: redis:alpine
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 2s
timeout: 3s
retries: 3
log_reader:
image: python:flask
volumes:
- ${PWD}/src:/app
- ${PWD}/logs:/app/logs
- ${PWD}/pickles:/app/pickles
working_dir: /app
depends_on:
server:
condition: service_healthy
entrypoint: /bin/sh
command: -c 'while true; do python log_reader_cron.py; sleep 30; done'