-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (29 loc) · 1.18 KB
/
Dockerfile
File metadata and controls
39 lines (29 loc) · 1.18 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
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies for legendary-gl (Epic Games) and Nile
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better layer caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Install Nile (Amazon Games client) from GitHub
# Clone and patch pyproject.toml to fix packaging issues
RUN pip install --no-cache-dir pycryptodome zstandard requests protobuf json5 \
&& git clone --depth 1 https://github.com/imLinguin/nile.git /opt/nile \
&& cd /opt/nile \
&& sed -i 's/dynamic = \["version"\]/version = "1.1.1"/' pyproject.toml \
&& echo '[tool.setuptools.packages.find]' >> pyproject.toml \
&& echo 'include = ["nile*"]' >> pyproject.toml \
&& pip install --no-cache-dir .
# Copy application code
COPY web/ ./web/
# Create data directory for the database
RUN mkdir -p /data
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV DATABASE_PATH=/data/game_library.db
EXPOSE 5050
# Run the FastAPI application
CMD ["uvicorn", "web.main:app", "--host", "0.0.0.0", "--port", "5050"]