-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (24 loc) · 809 Bytes
/
Dockerfile
File metadata and controls
34 lines (24 loc) · 809 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
FROM python:3.13.2-slim-bookworm
# Set environment variables
ENV FLASK_APP=ORCiD_API_App.py
ENV FLASK_ENV=production
WORKDIR /app
# Install system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends postgresql-client && \
rm -rf /var/lib/apt/lists/*
# Copy requirements first to leverage Docker cache
COPY requirements.txt .
RUN python -m pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY conf/init-dev.sh /usr/local/bin/init.sh
RUN chmod +x /usr/local/bin/init.sh
COPY . .
WORKDIR /app/SearchApp
# Create necessary directories and set permissions
RUN mkdir -p instance && \
chmod -R 755 instance/
EXPOSE 5000
ENTRYPOINT ["/usr/local/bin/init.sh"]
CMD ["flask", "run", "--host=0.0.0.0", "--port=5000"]