docker compose edit 2

This commit is contained in:
javad committed 2026-10-10 15:23:12 +03:30
1 parent f273c83a5e
commit 0fcb7632cb
1 file changed
+4 -18
+4 -18
View File
@@ -1,6 +1,5 @@
version: '3.8' version: '3.8'
# تنظیمات پایه مشترک برای تمام سرویس‌ها
x-app: &app x-app: &app
build: . build: .
image: khatibi-app:latest image: khatibi-app:latest
@@ -14,44 +13,31 @@ x-app: &app
services: services:
web: web:
<<: *app <<: *app
# در صورت استفاده از دامنه و پروکسی Coolify از expose استفاده کنید:
expose: expose:
- "8000" - "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: worker:
<<: *app <<: *app
command: ["python", "manage.py", "sms_worker", "--sleep", "3"] command: ["python", "manage.py", "sms_worker", "--sleep", "3"]
depends_on: depends_on:
web: - web
condition: service_healthy
scheduler: scheduler:
<<: *app <<: *app
command: ["python", "manage.py", "sms_scan", "--loop", "--interval", "300"] command: ["python", "manage.py", "sms_scan", "--loop", "--interval", "300"]
depends_on: depends_on:
web: - web
condition: service_healthy
delivery: delivery:
<<: *app <<: *app
command: ["python", "manage.py", "sms_delivery", "--sleep", "30"] command: ["python", "manage.py", "sms_delivery", "--sleep", "30"]
depends_on: depends_on:
web: - web
condition: service_healthy
volumes: volumes:
khatibi-sqlite-db: khatibi-sqlite-db:
external: true
name: tu9bnt8x4cd0hsmn8x6r5arf-khatibi-sqlite-db name: tu9bnt8x4cd0hsmn8x6r5arf-khatibi-sqlite-db
external: true
networks: networks:
coolify: coolify: