-
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) · 3.53 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
111 lines (103 loc) · 3.53 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
# =============================================================
# JUALAN (Blonjo + Sajen) - Production Docker Compose
# Target: VPS x86_64 (Linux amd64)
#
# Database & Redis: Shared dari jkk-infra (jkk-infra-postgres-1 & jkk-infra-redis-1)
# Network: jkk-backbone (shared) + bijexa-network (Traefik)
# Catatan: Untuk development lokal, gunakan docker-compose.yml
# =============================================================
services:
# ── Core API Engine (FastAPI) ──────────────────────────────
sajen-api:
container_name: sajen_backend_api
build:
context: ./sajen
dockerfile: Dockerfile
ports:
- "127.0.0.1:8005:8005"
env_file:
- .env.production
networks:
- jkk-backbone
- bijexa-network
volumes:
- uploads_data:/app/uploads
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:8005/health')\" || exit 1"]
interval: 3s
timeout: 2s
retries: 15
start_period: 3s
labels:
- "traefik.enable=true"
- "traefik.http.routers.sajen-api.rule=Host(`blonjo.samkarsa.com`) && PathPrefix(`/api`)"
- "traefik.http.routers.sajen-api.entrypoints=websecure"
- "traefik.http.routers.sajen-api.tls.certresolver=myresolver"
- "traefik.http.services.sajen-api.loadbalancer.server.port=8005"
- "traefik.http.services.sajen-api.loadbalancer.healthcheck.path=/health"
- "traefik.http.services.sajen-api.loadbalancer.healthcheck.interval=3s"
- "traefik.http.services.sajen-api.loadbalancer.healthcheck.timeout=2s"
- "traefik.docker.network=bijexa-network"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# ── Agentic Worker (Celery) ────────────────────────────────
sajen-worker:
container_name: sajen_agentic_worker
build:
context: ./sajen
dockerfile: Dockerfile
env_file:
- .env.production
depends_on:
- sajen-api
networks:
- jkk-backbone
volumes:
- uploads_data:/app/uploads
command: ["celery", "-A", "app.core.celery_app", "worker", "--loglevel=info", "--pool=threads", "--concurrency=2"]
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# ── Frontend Dashboard (Blonjo - nginx production) ─────────
blonjo-ui:
container_name: blonjo_frontend
build:
context: ./blonjo
dockerfile: Dockerfile.prod
args:
- VITE_API_URL=${VITE_API_URL}
ports:
- "127.0.0.1:7500:7500"
networks:
- bijexa-network
environment:
- VITE_API_URL=${VITE_API_URL}
depends_on:
- sajen-api
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.blonjo-ui.rule=Host(`blonjo.samkarsa.com`)"
- "traefik.http.routers.blonjo-ui.entrypoints=websecure"
- "traefik.http.routers.blonjo-ui.tls.certresolver=myresolver"
- "traefik.http.services.blonjo-ui.loadbalancer.server.port=7500"
- "traefik.docker.network=bijexa-network"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
jkk-backbone:
external: true # Shared network dengan jkk-infra (postgres & redis)
bijexa-network:
external: true # Traefik reverse proxy network
volumes:
uploads_data: