-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
88 lines (75 loc) · 2.18 KB
/
docker-compose.dev.yml
File metadata and controls
88 lines (75 loc) · 2.18 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
# Docker Compose for Development
# Minimal setup without queue workers for local development
services:
# Redis - Fast queue backend
redis:
image: redis:7-alpine
container_name: routemq-redis-dev
ports:
- "6379:6379"
networks:
- routemq-network
restart: unless-stopped
# MySQL - Persistent storage
mysql:
image: mysql:8.0
container_name: routemq-mysql-dev
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASS:-rootpassword}
MYSQL_DATABASE: ${DB_NAME:-mqtt_framework}
MYSQL_USER: ${DB_USER:-routemq}
MYSQL_PASSWORD: ${DB_PASS:-routemq}
ports:
- "3306:3306"
volumes:
- mysql-dev-data:/var/lib/mysql
networks:
- routemq-network
restart: unless-stopped
command: --default-authentication-plugin=mysql_native_password
# Main RouteMQ Application (for development only)
# Use `uv run python main.py --run` on host for hot reload
# This service is optional for development
routemq:
build:
context: .
args:
TIMEZONE: ${TIMEZONE:-Asia/Jakarta}
container_name: routemq-app-dev
environment:
MQTT_BROKER: ${MQTT_BROKER:-test.mosquitto.org}
MQTT_PORT: ${MQTT_PORT:-1883}
MQTT_USERNAME: ${MQTT_USERNAME:-}
MQTT_PASSWORD: ${MQTT_PASSWORD:-}
MQTT_GROUP_NAME: ${MQTT_GROUP_NAME:-mqtt_framework_group}
ENABLE_MYSQL: ${ENABLE_MYSQL:-true}
DB_HOST: ${DB_HOST:-mysql}
DB_PORT: ${DB_PORT:-3306}
DB_NAME: ${DB_NAME:-mqtt_framework}
DB_USER: ${DB_USER:-routemq}
DB_PASS: ${DB_PASS:-routemq}
ENABLE_REDIS: ${ENABLE_REDIS:-true}
REDIS_HOST: ${REDIS_HOST:-redis}
REDIS_PORT: ${REDIS_PORT:-6379}
REDIS_DB: ${REDIS_DB:-0}
QUEUE_CONNECTION: ${QUEUE_CONNECTION:-redis}
LOG_LEVEL: ${LOG_LEVEL:-DEBUG}
depends_on:
- mysql
- redis
networks:
- routemq-network
volumes:
- ./app:/app/app
- ./core:/app/core
- ./bootstrap:/app/bootstrap
- ./logs:/app/logs
- ./.env:/app/.env:ro
profiles:
- full # Use `docker compose --profile full up` to include this
volumes:
mysql-dev-data:
driver: local
networks:
routemq-network:
driver: bridge