-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (63 loc) · 1.38 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
version: '3.7'
services:
web:
container_name: found-offer
build:
context: .
dockerfile: Dockerfile
volumes:
- ./:/app/
environment:
- FLASK_DEBUG=1
ports:
- 5000:5000
env_file: ./.env
depends_on:
- mongo
- redis
tests:
build:
context: .
dockerfile: Dockerfile
env_file: ./.env
command: pytest tests
depends_on:
- mongo
- redis
mongo:
image: mongo:latest
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
MONGO_INITDB_DATABASE: found-offer
redis:
image: redis:latest
ports:
- 6379:6379
expose:
- 6379
celery_worker:
build:
context: .
dockerfile: Dockerfile
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
command: ["celery", "-A", "make_celery:celery_app", "worker", "--loglevel=info"]
depends_on:
- redis
restart: "on-failure:2"
celery_beat:
build:
context: .
dockerfile: Dockerfile
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
command: ["celery", "-A", "make_celery:celery_app", "beat", "--loglevel=INFO"]
depends_on:
- redis
- celery_worker
restart: "on-failure:2"