-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathDockerfile.dev
More file actions
51 lines (39 loc) · 1.84 KB
/
Dockerfile.dev
File metadata and controls
51 lines (39 loc) · 1.84 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
# ================================
# Development Dockerfile
# ================================
# This Dockerfile is optimized for development with hot-reloading
# Use docker-compose.dev.yml to run this with volume mounts
FROM nikolaik/python-nodejs:python3.10-nodejs24
WORKDIR /app
# Install dependencies for both Python and Node
# These will be cached unless requirements.txt or package.json change
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Install watchdog for file change detection (optional for uvicorn --reload)
# Uvicorn uses watchfiles by default, but falls back to watchdog if unavailable
RUN pip install watchdog
# Copy package files for frontend
COPY client/package.json client/patch-buefy.sh ./client/
# Note: package-lock.json is excluded by .dockerignore for production
# For dev, we'll use npm install which regenerates the lock file
RUN cd client && npm install --legacy-peer-deps
# Copy the rest of the application
# (In dev mode, this will be overridden by volume mounts)
COPY . .
# Make scripts executable
RUN chmod +x run.sh verify_env.py verify_data_migrations.py 2>/dev/null || true
# Create config directory
RUN mkdir -p /app/config
# Install curl for healthcheck (skip if already present)
# The base image likely has curl, but ensure it's available
RUN which curl || (apt-get update --allow-releaseinfo-change 2>/dev/null || \
apt-get update --allow-insecure-repositories 2>/dev/null && \
apt-get install -y --no-install-recommends curl 2>/dev/null || \
apt-get install -y --allow-unauthenticated --no-install-recommends curl && \
rm -rf /var/lib/apt/lists/*) || true
# Expose ports
EXPOSE 8000 8080
# Use a dev-specific entrypoint that starts both services
COPY docker-entrypoint-dev.sh /docker-entrypoint-dev.sh
RUN chmod +x /docker-entrypoint-dev.sh
ENTRYPOINT ["/docker-entrypoint-dev.sh"]