Enhance Dockerfile to create SQLite data directory with proper ownership
This commit is contained in:
@@ -15,10 +15,13 @@ RUN apk del python3 make g++
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Create data directory for SQLite
|
# Create data directory for SQLite with proper ownership
|
||||||
RUN mkdir -p /data
|
RUN mkdir -p /data && chown node:node /data
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
# Run as non-root user for security
|
||||||
|
USER node
|
||||||
|
|
||||||
EXPOSE 3001
|
EXPOSE 3001
|
||||||
|
|
||||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||||
|
|||||||
Reference in New Issue
Block a user