-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.dev
More file actions
32 lines (23 loc) · 840 Bytes
/
Dockerfile.dev
File metadata and controls
32 lines (23 loc) · 840 Bytes
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
FROM python:3.9
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set work directory
WORKDIR /code
# Install Python dependencies first (for better caching)
COPY requirement.txt /code/
RUN pip install --no-cache-dir -r requirement.txt
# Install system dependencies (using apt instead of apt-get for consistency with original)
RUN apt update && apt install python3-dev -y
# Copy and install the wheel package
COPY web3_auth_django-0.7-py3-none-any.whl /code/
RUN pip install web3_auth_django-0.7-py3-none-any.whl
# Copy project files
COPY . /code/
# Run migrations (with error handling for development)
RUN python manage.py makemigrations || true
RUN python manage.py migrate || true
# Expose port
EXPOSE 8000
# Command to run the application
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]