-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
28 lines (20 loc) · 928 Bytes
/
Dockerfile
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
# Use an official Python runtime as a parent image. Safe image 3.10.13-alpine3.17
FROM python:3.13-rc-alpine
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set the working directory to /app
WORKDIR /app
# Copy the requirements.txt file into the container at /app/
COPY requirements.txt /app/
# Update and install dependencies
# RUN apt-get update && apt-get install -y
RUN apk update && apk upgrade -U
# Install any needed packages specified in requirements.txt
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY . /app
# Make port 8000 available to the world outside this container
EXPOSE 8080
# Apply database migrations when the container starts
CMD ["sh", "-c", "python src/PetsFinder/manage.py migrate && python src/PetsFinder/manage.py migrate && python src/PetsFinder/manage.py runserver 0.0.0.0:8080"]