fix deployment folder permisions

This commit is contained in:
Marko Djordjevic 2026-02-18 22:33:25 +01:00
parent 385e7944b7
commit 86a8cc66b6
3 changed files with 7 additions and 2 deletions

3
services/ml/.env.example Normal file
View file

@ -0,0 +1,3 @@
DATABASE_URL=postgresql://pg_user:pg_password@localhost:5432/candle_annotator
# openssl rand -hex 32 add to main .env too
API_KEY=ML_API_KEY

View file

@ -29,8 +29,9 @@ COPY . .
EXPOSE 8001
# Create non-root user and set ownership
RUN useradd -r -s /bin/false appuser
RUN chown -R appuser:appuser /app
RUN useradd -r -s /bin/false appuser && \
mkdir -p /app/data/raw /app/data/processed && \
chown -R appuser:appuser /app
# Switch to non-root user
USER appuser