Skip to content

Commit bfc06ab

Browse files
hendisantikaclaude
andcommitted
fix: make app dir writable and set UV_CACHE_DIR for dynamic UID
Container runs as deployer's UID via docker-compose user directive, so /.cache/uv (owned by root) is not writable. Set UV_CACHE_DIR to /app/.cache/uv and make /app writable for any user. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2e915aa commit bfc06ab

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ RUN mkdir -p /app/data
2020
# Copy remaining project files (code changes trigger new layer)
2121
COPY src/ ./src/
2222

23-
# Create non-root user and set ownership
24-
RUN useradd -m -u 1000 bot && chown -R bot:bot /app
23+
# Make app directory writable for any user (supports dynamic UID via docker-compose)
24+
RUN chmod -R a+rw /app
2525

26-
# Switch to non-root user
27-
USER bot
26+
# Set uv cache inside /app so any UID can write to it
27+
ENV UV_CACHE_DIR=/app/.cache/uv
2828

2929
# Run the bot
3030
CMD ["uv", "run", "pythonid-bot"]

0 commit comments

Comments
 (0)