fix dockercompose name

This commit is contained in:
javad committed 2026-06-17 11:16:31 +03:30
1 parent 4b6b42947a
commit 4ee85a75e6
1 file changed
+28
View File
@@ -0,0 +1,28 @@
version: '3.8'
services:
web:
build:
context: .
dockerfile: Dockerfile
volumes:
- media_volume:/app/media:rw # جنگو باید بتواند فایل بنویسد
labels:
- "traefik.enable=true"
- "traefik.http.routers.django-router.rule=Host(`apibashgah.loolegostar.com`) && !PathPrefix(`/media/`)"
- "traefik.http.services.django-service.loadbalancer.server.port=8000"
nginx:
image: nginx:alpine
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- media_volume:/app/media:ro # ان‌جینکس فقط باید بخواند (امن‌تر)
labels:
- "traefik.enable=true"
- "traefik.http.routers.nginx-router.rule=Host(`apibashgah.loolegostar.com`) && PathPrefix(`/media/`)"
- "traefik.http.services.nginx-service.loadbalancer.server.port=80"
depends_on:
- web
volumes:
media_volume: