File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,9 @@ WORKDIR /app
1212# Install system dependencies and clean up in one layer
1313RUN apt-get update \
1414 && apt-get install -y --no-install-recommends \
15- libpq5 \
16- curl \
17- postgresql-client \
15+ libpq5 \
16+ curl \
17+ postgresql-client \
1818 && rm -rf /var/lib/apt/lists/*
1919
2020# Install Python dependencies
@@ -32,14 +32,22 @@ COPY . .
3232# Make entrypoint script executable
3333RUN chmod +x /app/entrypoint.sh
3434
35+
3536# Create a non-root user
3637RUN useradd -m appuser && chown -R appuser:appuser /app
38+
39+ # Create data directory with correct permissions
40+ RUN mkdir -p /data && \
41+ chown -R appuser:appuser /data
42+
3743USER appuser
3844
3945# Add healthcheck
4046HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
4147 CMD curl -f http://localhost:8000/health/ || exit 1
4248
49+ VOLUME ["/data" ]
50+
4351# Expose port
4452EXPOSE 8000
4553
You can’t perform that action at this time.
0 commit comments