-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
111 lines (103 loc) · 2.56 KB
/
docker-compose.prod.yml
File metadata and controls
111 lines (103 loc) · 2.56 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
services:
# --- DATABASE ---
db:
image: postgres:15-alpine
restart: always
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
restart: always
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
minio:
image: minio/minio
restart: always
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio_data:/data
environment:
- MINIO_ROOT_USER=${MINIO_ROOT_USER}
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
createbuckets:
image: minio/mc
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
/usr/bin/mc alias set myminio http://minio:9000 ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD};
/usr/bin/mc mb myminio/${S3_BUCKET_NAME};
/usr/bin/mc anonymous set public myminio/${S3_BUCKET_NAME};
exit 0;
"
search:
image: getmeili/meilisearch:latest
restart: always
ports:
- "7700:7700"
environment:
- MEILI_MASTER_KEY=${MEILI_MASTER_KEY}
- MEILI_NO_ANALYTICS=true
volumes:
- meili_data:/meili_data
web:
image: rmusayevr/fastflix:latest
restart: always
ports:
- "8000:8000"
env_file:
- .env
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
minio:
condition: service_healthy
search:
condition: service_started
command: sh -c "./prestart.sh gunicorn -c gunicorn_conf.py app.main:app"
celery_worker:
image: rmusayevr/fastflix:latest
restart: always
command: sh -c "./prestart.sh celery -A app.core.celery_app worker --loglevel=info"
env_file:
- .env
depends_on:
- redis
- db
dashboard:
image: rmusayevr/fastflix:latest
restart: always
command: streamlit run dashboard/main.py --server.port=8501 --server.address=0.0.0.0
ports:
- "8501:8501"
environment:
- API_URL=http://web:8000/api/v1
depends_on:
- web
volumes:
postgres_data:
minio_data:
meili_data: