docker compose edit 2
This commit is contained in:
1 parent
f273c83a5e
commit
0fcb7632cb
1 file changed
+4
-18
+4
-18
@@ -1,6 +1,5 @@
|
||||
version: '3.8'
|
||||
|
||||
# تنظیمات پایه مشترک برای تمام سرویسها
|
||||
x-app: &app
|
||||
build: .
|
||||
image: khatibi-app:latest
|
||||
@@ -14,44 +13,31 @@ x-app: &app
|
||||
services:
|
||||
web:
|
||||
<<: *app
|
||||
# در صورت استفاده از دامنه و پروکسی Coolify از expose استفاده کنید:
|
||||
expose:
|
||||
- "8000"
|
||||
# اگر مایلید پورت مستقیماً روی سرور باز شود، خط بالا را کامنت کرده و دو خط زیر را فعال کنید:
|
||||
# ports:
|
||||
# - "8000:8000"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/').read()\""]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
|
||||
worker:
|
||||
<<: *app
|
||||
command: ["python", "manage.py", "sms_worker", "--sleep", "3"]
|
||||
depends_on:
|
||||
web:
|
||||
condition: service_healthy
|
||||
- web
|
||||
|
||||
scheduler:
|
||||
<<: *app
|
||||
command: ["python", "manage.py", "sms_scan", "--loop", "--interval", "300"]
|
||||
depends_on:
|
||||
web:
|
||||
condition: service_healthy
|
||||
- web
|
||||
|
||||
delivery:
|
||||
<<: *app
|
||||
command: ["python", "manage.py", "sms_delivery", "--sleep", "30"]
|
||||
depends_on:
|
||||
web:
|
||||
condition: service_healthy
|
||||
- web
|
||||
|
||||
volumes:
|
||||
khatibi-sqlite-db:
|
||||
external: true
|
||||
name: tu9bnt8x4cd0hsmn8x6r5arf-khatibi-sqlite-db
|
||||
external: true
|
||||
|
||||
networks:
|
||||
coolify:
|
||||
|
||||
Reference in new issue
Block a user