-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (56 loc) · 1.66 KB
/
docker-compose.yml
File metadata and controls
59 lines (56 loc) · 1.66 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
version: '3.8'
services:
# Local PostgreSQL for development only
postgres:
image: postgres:15.7-alpine
container_name: pythonide-db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: pythonide
volumes:
# Persistent database storage
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
pythonide:
build: .
container_name: pythonide-app
ports:
- "10086:8080"
environment:
# For AWS deployment, this will be overridden with RDS endpoint
DATABASE_URL: ${DATABASE_URL:-postgresql://postgres:postgres@postgres:5432/pythonide}
IDE_SECRET_KEY: ${IDE_SECRET_KEY:-secure-key-change-in-production}
# CRITICAL: Set IDE_DATA_PATH to use Docker volume (not AWS EFS path)
IDE_DATA_PATH: /app/server/projects
MAX_CONCURRENT_EXECUTIONS: 60
EXECUTION_TIMEOUT: 60
MEMORY_LIMIT_MB: 128
TORNADO_PROCESSES: ${TORNADO_PROCESSES:-1}
volumes:
# CRITICAL: Mount persistent storage for user files
- user_files:/app/server/projects/ide
# Mount initialization script
- ./server/migrations:/app/server/migrations
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
command: >
sh -c "
echo 'Waiting for database...' &&
sleep 5 &&
echo 'Starting server...' &&
python server.py
"
volumes:
# Named volumes for persistent storage (works on both Mac and WSL2)
postgres_data:
user_files: