-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
23 lines (15 loc) · 707 Bytes
/
dockerfile
File metadata and controls
23 lines (15 loc) · 707 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM python:3.9-slim
# Install SQLite3 CLI
RUN apt-get update && apt-get install -y sqlite3 && rm -rf /var/lib/apt/lists/*
WORKDIR /code
# Create directories for mounted volumes
RUN mkdir -p /db /code/stores /code/floorplans && chmod 777 /db
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Copy only the application code
COPY ./backend /code/backend
EXPOSE 8000
# Run FastAPI on port 8000 (standard uvicorn port)
# --forwarded-allow-ips='*' tells uvicorn to trust proxy headers from any IP
CMD mkdir -p /db && chmod 777 /db && cd /code && \
uvicorn backend.main:app --host 0.0.0.0 --port 8000 --reload --forwarded-allow-ips='*'