-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
75 lines (68 loc) · 1.56 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
version: '3.7'
services:
db:
image: postgres:15
container_name: ecommerce_db
volumes:
- postgresdata:/var/lib/postgresql/data
env_file:
- .env
ports:
- "5433:5432"
redis:
image: redis:7
container_name: ecommerce_redis
ecommerce:
build:
context: .
env_file:
- .env
container_name: ecommerce_app
depends_on:
- db
- redis
# command: [ "/ecommerce/docker/app.sh" ]
command: sh -c "alembic upgrade head && python3 src/utils/launch.py && python3 src/utils/insert_data.py && gunicorn src.main:app --workers 4 --worker-class uvicorn.workers.UvicornWorker --bind=0.0.0.0:8000"
ports:
- "8000:8000"
celery:
build:
context: .
container_name: ecommerce_celery
command: [ "/ecommerce/docker/celery.sh", "celery" ]
env_file:
- .env
depends_on:
- redis
flower:
build:
context: .
container_name: ecommerce_flower
command: [ "/ecommerce/docker/celery.sh", "flower" ]
env_file:
- .env
depends_on:
- redis
ports:
- "5555:5555"
prometheus:
image: prom/prometheus:v2.43.0
container_name: prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheusdata:/prometheus
restart: unless-stopped
ports:
- "9090:9090"
grafana:
image: grafana/grafana:9.4.7
container_name: grafana
volumes:
- grafanadata:/var/lib/grafana
restart: unless-stopped
ports:
- "3000:3000"
volumes:
postgresdata:
grafanadata:
prometheusdata: