-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (35 loc) · 1.38 KB
/
Dockerfile
File metadata and controls
48 lines (35 loc) · 1.38 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
# Use a lightweight Python base image
FROM python:3.13-slim
RUN apt-get update && apt-get install -y \
wget \
libfuse2 \
xvfb \
libc6 \
libfontconfig1 \
&& rm -rf /var/lib/apt/lists/*
# Download ODA File Converter AppImage (replace with the latest version)
# RUN wget -O /tmp/ODAFileConverter.AppImage \
# https://www.opendesign.com/guestfiles/get?filename=ODAFileConverter_QT6_lnxX64_8.3dll_26.8.AppImage
RUN wget -O /tmp/ODAFileConverter.AppImage \
https://s3.us-east-2.amazonaws.com/tendar.co/ODAFileConverter_QT6_lnxX64_8.3dll_26.10.AppImage
# Extract AppImage (avoids FUSE)
RUN chmod +x /tmp/ODAFileConverter.AppImage \
&& /tmp/ODAFileConverter.AppImage --appimage-extract \
&& mv squashfs-root /opt/ODAFileConverter \
&& ln -s /opt/ODAFileConverter/AppRun /usr/local/bin/ODAFileConverter \
&& rm /tmp/ODAFileConverter.AppImage
ENV ODAFILECONVERTER=/usr/local/bin/ODAFileConverter
ENV XDG_RUNTIME_DIR=/tmp/runtime-root
RUN mkdir -p /tmp/runtime-root && chmod 700 /tmp/runtime-root
# Set the working directory
WORKDIR /app
# Copy requirement files first (better caching)
COPY requirements.txt requirements.txt
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy app files
COPY . .
# Expose the port (Fly will map this automatically)
EXPOSE 8080
# Run with Gunicorn
CMD ["gunicorn", "-b", "0.0.0.0:8080", "app:app"]