-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
183 lines (145 loc) · 4.67 KB
/
docker-compose.dev.yml
File metadata and controls
183 lines (145 loc) · 4.67 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# Development Docker Compose Configuration
# EMO Options Bot - Development Environment
version: '3.8'
services:
# =============================================================================
# SQLite Development (Local file)
# =============================================================================
# Note: SQLite runs locally, no container needed
# Database file will be at ./data/emo_options_dev.sqlite
# =============================================================================
# Redis Cache (Development)
# =============================================================================
redis:
image: redis:7-alpine
container_name: emo-redis-dev
restart: unless-stopped
ports:
- "6381:6379"
networks:
- emo-dev-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
command: redis-server --appendonly yes
# =============================================================================
# EMO Options Bot Application (Development)
# =============================================================================
app:
build:
context: .
dockerfile: Dockerfile
args:
EMO_ENV: dev
container_name: emo-app-dev
restart: unless-stopped
environment:
EMO_ENV: dev
DB_URL: sqlite:///app/data/emo_options_dev.sqlite
REDIS_URL: redis://redis:6379/0
ALPACA_KEY_ID: ${ALPACA_KEY_ID}
ALPACA_SECRET_KEY: ${ALPACA_SECRET_KEY}
ALPACA_BASE_URL: https://paper-api.alpaca.markets
OPENAI_API_KEY: ${OPENAI_API_KEY}
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
PYTHONDONTWRITEBYTECODE: 1
PYTHONUNBUFFERED: 1
TZ: America/New_York
volumes:
- ./src:/app/src
- ./scripts:/app/scripts
- ./alembic:/app/alembic
- ./alembic.ini:/app/alembic.ini
- ./data:/app/data
- ./logs:/app/logs
- ./config/dev.env:/app/.env.dev:ro
ports:
- "8084:8082" # Development port
- "5678:5678" # Debug port for VS Code
depends_on:
redis:
condition: service_healthy
networks:
- emo-dev-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8082/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
# Development mode - mount source code for hot reload
command: ["python", "-m", "uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8082", "--reload"]
# =============================================================================
# Development Tools
# =============================================================================
jupyter:
build:
context: .
dockerfile: Dockerfile
args:
EMO_ENV: dev
container_name: emo-jupyter-dev
restart: unless-stopped
environment:
EMO_ENV: dev
DB_URL: sqlite:///app/data/emo_options_dev.sqlite
REDIS_URL: redis://redis:6379/0
JUPYTER_ENABLE_LAB: "yes"
volumes:
- ./src:/app/src
- ./scripts:/app/scripts
- ./data:/app/data
- ./notebooks:/app/notebooks
- ./config/dev.env:/app/.env.dev:ro
ports:
- "8888:8888"
depends_on:
redis:
condition: service_healthy
networks:
- emo-dev-network
command: >
jupyter lab
--ip=0.0.0.0
--port=8888
--no-browser
--allow-root
--NotebookApp.token=''
--NotebookApp.password=''
# =============================================================================
# Database Administration (Development)
# =============================================================================
adminer:
image: adminer:latest
container_name: emo-adminer-dev
restart: unless-stopped
ports:
- "8080:8080"
networks:
- emo-dev-network
environment:
ADMINER_DEFAULT_SERVER: app
ADMINER_DESIGN: "hydra"
# =============================================================================
# Mail Server (Development - MailHog)
# =============================================================================
mailhog:
image: mailhog/mailhog:latest
container_name: emo-mailhog-dev
restart: unless-stopped
ports:
- "1025:1025" # SMTP
- "8025:8025" # Web UI
networks:
- emo-dev-network
# =============================================================================
# Networks and Volumes
# =============================================================================
networks:
emo-dev-network:
driver: bridge
volumes:
jupyter_data:
driver: local