-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-r.yml
More file actions
96 lines (88 loc) · 2.3 KB
/
docker-r.yml
File metadata and controls
96 lines (88 loc) · 2.3 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
version: '3.8'
services:
# Servicio de traducción
translation:
build: ./translation
container_name: translation
ports:
- "5001:5000" # Considerar eliminar si no se necesita acceso externo
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- STORAGE_SERVICE_URL=http://storage:5000
- REDIS_URL=redis:${REDIS_URL} # Redis URL para manejar colas
# - REDIS_URL=redis://redis:6379/${REDIS_DB:-0}
depends_on:
- storage
- redis
networks:
- app_network
# Servicio de almacenamiento
storage:
build: ./storage
container_name: storage
ports:
- "5002:5000" # Considerar eliminar si no se necesita acceso externo
environment:
- STORAGE_PATH=${STORAGE_PATH}
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB} # PostgreSQL URL
- REDIS_URL=redis://redis:6379/${REDIS_DB:-0}
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- LOG_FILE=/app/logs/storage_service.log
volumes:
- ./data:${STORAGE_PATH}
- ./logs:/app/logs
depends_on:
- db
- redis
networks:
- app_network
# Servicio de notificación
notification:
build: ./notification
container_name: notification
ports:
- "5003:5000"
environment:
- NOTIFICATION_TYPE=${NOTIFICATION_TYPE}
- REDIS_URL=redis://redis:6379/${REDIS_DB:-0}
depends_on:
- redis
networks:
- app_network
- external_network
# Base de datos PostgreSQL
db:
image: postgres:13
container_name: postgres_db
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- app_network
# Redis para manejo de colas
redis:
image: redis:alpine
container_name: redis
networks:
- app_network
# RabbitMQ (opcional)
rabbitmq:
image: "rabbitmq:3-management"
container_name: rabbitmq
ports:
- "5672:5672" # Puerto para los consumidores
- "15672:15672" # Puerto de la interfaz web de administración
networks:
- app_network
- external_network
volumes:
postgres_data:
driver: local
networks:
app_network:
driver: bridge
external_network:
driver: bridge