-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
112 lines (108 loc) · 2.67 KB
/
docker-compose.dev.yml
File metadata and controls
112 lines (108 loc) · 2.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
# docker-compose.dev.yml
services:
analyzer:
build:
context: .
dockerfile: Dockerfile
args:
PIP_TIMEOUT: 600
PIP_RETRIES: 10
BUILDKIT_INLINE_CACHE: 1
container_name: bioanalyzer-dev
restart: unless-stopped
ports:
- "8000:8000"
env_file:
- .env
environment:
# Explicitly pass important env vars into the container (override with values from .env)
- GEMINI_API_KEY=${GEMINI_API_KEY}
- NCBI_API_KEY=${NCBI_API_KEY}
- EMAIL=${EMAIL}
- DEBUG=${DEBUG:-true}
- ENVIRONMENT=${ENVIRONMENT:-development}
- PYTHONPATH=/app
- WATCHFILES_FORCE_POLLING=true
- API_TIMEOUT=${API_TIMEOUT:-60}
- GEMINI_TIMEOUT=${GEMINI_TIMEOUT:-20}
- ANALYSIS_TIMEOUT=${ANALYSIS_TIMEOUT:-50}
# helpful for tests and dev
- PIP_NO_CACHE_DIR=off
dns:
- 8.8.8.8
- 8.8.4.4
volumes:
# Mount source code for live reloading
- ./app:/app/app:rw
- ./config:/app/config:ro
- ./frontend:/app/frontend:rw
# Data and cache volumes
- ./data:/app/data:rw
- ./cache:/app/cache:rw
- ./results:/app/results:rw
- ./.env:/app/.env:ro
# Development volumes
- ./logs:/app/logs:rw
networks:
- bioanalyzer-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 15s
retries: 3
start_period: 60s
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
nginx:
build:
context: .
dockerfile: deployment/docker/nginx.Dockerfile
container_name: bioanalyzer-nginx-dev
restart: unless-stopped
ports:
- "80:80"
depends_on:
analyzer:
condition: service_healthy
volumes:
- nginx_logs:/var/log/nginx
- nginx_cache:/var/cache/nginx
- ./deployment/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./frontend:/usr/share/nginx/html:ro
networks:
- bioanalyzer-network
healthcheck:
test: ["CMD", "nginx", "-t"]
interval: 30s
timeout: 10s
retries: 3
redis:
image: redis:7-alpine
container_name: bioanalyzer-redis-dev
restart: unless-stopped
command: redis-server --appendonly yes
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- bioanalyzer-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 15s
timeout: 5s
retries: 3
volumes:
nginx_logs:
nginx_cache:
redis_data:
networks:
bioanalyzer-network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16