-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
87 lines (79 loc) · 1.86 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
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
version: '3.3'
services:
rabbitmq:
image: rabbitmq:3-management-alpine
container_name: 'video_analyzer_mq'
ports:
- 5672:5672
- 15672:15672
volumes:
- rabbit-mq-data:/var/lib
redis:
image: "redis"
command: redis-server
ports:
- "6380:6379"
volumes:
- redis-data:/var/lib/redis
environment:
- REDIS_REPLICATION_MODE=master
# producer:
# build:
# context: .
# dockerfile: ./dockerfiles/producer.dockerfile
# container_name: 'video_analyzer_producer'
# volumes:
# - .:/app
# working_dir: /app
# depends_on:
# - rabbitmq
# - redis
# environment:
# RABBIT_MQ_URL: 'rabbitmq:5672'
api:
build:
context: .
dockerfile: ./dockerfiles/api.dockerfile
ports:
- "8000:8000"
- "5000:5000"
volumes:
- .:/api
working_dir: /api
depends_on:
- postgres
environment:
RABBIT_MQ_URL: 'rabbitmq:5672'
FLASK_ENV: 'development'
DATABSE_URL: 'postgresql://postgres:postgres@postgres/stream_analyzer_db'
postgres:
image: 'postgres:latest'
ports:
- "5432:5432"
volumes:
- pg-data:/var/lib/postgresql/data
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
command: [ "postgres", "-c", "log_statement=all", "-c", "log_destination=stderr" ]
# consumer:
# image: python:3.8-alpine
# volumes:
# - .:/app
# working_dir: /app
# build:
# context: .
# dockerfile: ./dockerfiles/consumer.dockerfile
# container_name: 'video_analyzer_consumer'
# depends_on:
# - rabbitmq
# - redis
# - postgres
# environment:
# RABBIT_MQ_URL: 'rabbitmq:5672'
# DATABSE_URL: 'postgresql://postgres:postgres@postgres/stream_analyzer_db'
volumes:
rabbit-mq-data:
redis-data:
pg-data: