-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (25 loc) · 1.01 KB
/
Dockerfile
File metadata and controls
32 lines (25 loc) · 1.01 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
# Use an official Python runtime as a parent image
FROM python:3.10-slim as base
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set work directory
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# --- Security Note ---
# The 'credentials' directory containing sensitive OAuth tokens
# SHOULD NOT be copied into the image in production.
# Mount it as a volume or use Docker secrets instead.
# For local dev, ensure credentials dir exists before building or running.
# Example: docker run -v $(pwd)/credentials:/app/credentials ...
# Ensure the 'memory' directory is also mounted as a volume to persist logs.
# Example: docker run -v $(pwd)/memory:/app/memory ...
# Ensure credentials and memory directories exist in the container context
# These will be mount points for volumes
RUN mkdir -p /app/credentials && mkdir -p /app/memory
# Command to run the application
CMD ["python", "main.py"]