-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (33 loc) · 953 Bytes
/
Dockerfile
File metadata and controls
47 lines (33 loc) · 953 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Build frontend
FROM node:18-alpine as frontend-build
WORKDIR /app/frontend
COPY frontend/package*.json ./
RUN npm ci
COPY frontend/ ./
RUN npm run build
# Build backend
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
&& rm -rf /var/lib/apt/lists/*
# Copy backend
COPY backend/ ./
# Install Python dependencies
RUN pip install --no-cache-dir -e .
# Copy built frontend
COPY --from=frontend-build /app/frontend/build /app/frontend/build
# Create storage directory
RUN mkdir -p /root/.seq-fetch-web/downloads
# Expose port
EXPOSE 8000
# Set environment variables
ENV HOST=0.0.0.0
ENV PORT=8000
ENV DEBUG=false
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"
# Run server
CMD ["python", "-m", "app.main"]